Two related bugs in ServerPlaybackRoutes:
1. _getSourcedTrack looked up the requested media in
audioPlayer.playlist.medias by URI, but MPV issues its HTTP request
before media_kit's Dart-side state has synced with the native
player, so the lookup threw "Bad state: No element" and the proxy
returned 500 ("Failed to open" in MPV). Now resolves the track
directly from playlist.tracks by trackId via firstWhereOrNull,
independent of the player's media list.
2. MPV opens multiple concurrent range requests for the same track
(buffering/seek/reconnect), each opening its own writeOnlyAppend
sink to the same .part cache file; the final rename would then fail
with a file-in-use error (or corrupt the cache from concurrent
appends). Added a _cachingInProgress guard so only one request
caches a given track at a time, cache only full requests
(contentRange.start == 0), write with truncate instead of append,
and clean up the in-progress marker/partial file in finally.
Fixes#3089
* feat: add youtube engine abstraction and yt-dlp integration
* chore: add yt-dlp as optional dependency
* feat: implement custom path support for youtube engines
* chore: check for custom path in setting engine select dropdown
* chore: update yt_dlp_dart
* chore: setting video url instead of video id in fetchSiblings
* feat: implement NewPipe engine
* chore: update local path to git url for flutter_new_pipe_extractor package
* chore: fix android build isn't working
* chore: fix routes not working when initially signing in
* refactor: drop fallback support to different sources
* feat: add android home widget support
* feat: style widget player and add intent and callbacks on action
* feat: responsive and working android home widget
* fix(android): models stripping causing it to not work for release apks
* chore: ios lockfile update
* feat: config for iOS widget
* cd: upgrade xcode
* cd: reduce xcode version
* feat: add a christmas background
* 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
* 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