fix(yandex_music): fix playlist loading and missing album cover art (#3099)
* fix(yandex_music): fix playlist tracks not loading in UI
- Return empty list for page > 0 since Yandex Music API returns all
tracks in a single call; without this the controller pagination loop
never terminates
- Add fetch_tracks_async() fallback when API returns playlist metadata
without tracks
- Raise ResourceTemporarilyUnavailable instead of returning empty list
when tracks are expected but unavailable, preventing cache of empty
results
- Fetch full track details in batches of 50 to reduce timeout risk
- Retry get_tracks once on NetworkError in api_client
- Raise ResourceTemporarilyUnavailable on NetworkError in get_playlist
to prevent caching None as empty result
- Suppress yandex_music library DEBUG logs to avoid huge API dumps
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: apply ruff fixes and update snapshot
- Remove unused noqa comment (RUF100) in provider.py
- Update test_parsers snapshot for upstream model changes (year/style fields)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(yandex_music): fix missing album cover art in library
- In parse_track(), use parse_album() instead of ItemMapping for the
track's album reference so albums are created with full metadata
(including cover_uri) when tracks are synced to the library
- In get_liked_albums(), fetch full album details via client.albums()
in batches of 50, since the users_likes_albums endpoint returns
minimal data without cover_uri
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore(yandex_music): regenerate parser snapshots after models bump
Co-authored-by: Cursor <cursoragent@cursor.com>
* Update music_assistant/providers/yandex_music/api_client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update music_assistant/providers/yandex_music/provider.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add tests for api_client batching/retry and playlist edge cases
Cover the 3 unresolved Copilot review comments from PR #3099:
- get_liked_albums() batch fetching and NetworkError fallback
- get_tracks() retry-on-NetworkError logic
- get_playlist_tracks() page>0, fetch_tracks_async fallback, empty batch error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Михаил Невский <renso@MacBook-Pro-Mihail.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>