* feat: add caching support with track metadata
* feat(settings): add cache music toggle
* fix(mobile): cache dir not open-able
* feat(local folder): add cache export/clear actions and size of the folder
* chore: ios deps upgrades
* chore: upgrade lint flutter version
* chore: lint secrets causing error
* cd: invalid value for env var
Key Improvements:
SpotubeMediaFactory: Handles the logic of creating SpotubeMedia instances, allowing for easier scalability and reducing repetitive code.
Dependency Injection (DI): CustomPlayer is injected into the AudioPlayerInterface, improving testability and modularity.
Helper Methods: Functions like getNetworkAddress() and getUriForTrack() simplify and centralize repeated logic, improving maintainability.
Playback Control Methods: Added play(), pause(), stop(), and seek() methods for better playback control with error handling.
PlaybackStateManager: Manages the state-related properties (isPlaying, duration, etc.), keeping the AudioPlayerInterface cleaner and more focused on playback control.
Advantages:
Separation of Concerns: The code is now better structured with clear separation between media management (SpotubeMedia), playback state management (PlaybackStateManager), and playback controls (AudioPlayerInterface).
Extensibility: The code is more scalable with the factory pattern, making it easy to add new track types or other media sources.
Testability: With dependency injection, you can easily mock the CustomPlayer and test the logic of AudioPlayerInterface independently.
Clean Code: Centralized logic and helper methods reduce code duplication, improving readability and maintainability.
* feat: add invidious audio source with automatic track switch even on server playback endpoint
* fix: switching to different source on playback endpoint error not working
* chore: update invidious version
* feat: invidious instances customizability
commit e160d4f561ff2e945fd67bf12b223c012da58b1e
Author: Kingkor Roy Tirtho <krtirtho@gmail.com>
Date: Sat Sep 14 10:48:08 2024 +0600
fix: pagination issues in playlist and album pages