Yandex Music: My Wave Browse folder and locale-based names (#3122)
authorMikhail Nevskiy <139659391+trudenboy@users.noreply.github.com>
Tue, 10 Feb 2026 17:31:03 +0000 (20:31 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Feb 2026 17:31:03 +0000 (18:31 +0100)
commit885f7a9f4386f157b947221753faac9c3f985115
tree57bb3e579de0e6209237dceebfae073ce3df16ff
parent348b622e05256bb3e311d2dd8ac7bd7a127c3a44
Yandex Music: My Wave Browse folder and locale-based names (#3122)

* Yandex Music: add My Wave (Моя волна) Browse folder

- Add ROTOR_STATION_MY_WAVE constant (user:onyourwave)
- Add get_my_wave_tracks() to api_client using rotor_station_tracks API
- Add My Wave folder to Browse root (first in list)
- When opening My Wave, return tracks from Rotor API as Track items
- Order: Моя волна, Мои исполнители, Мои альбомы, Мне нравится, Мои плейлисты
- On API errors, log and return [] to keep Browse working

Co-authored-by: Cursor <cursoragent@cursor.com>
* Yandex Music: locale-based Browse folder names (EN/RU)

- Add BROWSE_NAMES_RU and BROWSE_NAMES_EN in constants (My Favorites for tracks)
- In browse(), use Russian names when locale starts with ru, else English
- Fallback to English if metadata.locale unavailable
- Test: assert first root folder name is from locale mapping

Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: sort imports in yandex_music provider (I001)

Co-authored-by: Cursor <cursoragent@cursor.com>
* Yandex Music: My Wave — browse, recommendations, similar tracks, virtual playlist, rotor feedback

- My Wave in Browse: root folder (up to 3 batches) and Load more pagination
- Recommendations (Discover): My Wave section with first batch
- Similar tracks (radio mode): Rotor station track:{id} for radio queue
- Virtual playlist My Wave in library (get_playlist / get_playlist_tracks with page)
- My Wave listed first in get_library_playlists
- Rotor feedback: radioStarted, trackStarted, trackFinished, skip
- Reconnect and retry on Server disconnected in api_client

Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(yandex_music): resolve ruff/mypy — duplicate methods, line length, type for browse tracks

Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor(yandex_music): use constants instead of string literals, extract locale helper

Replace all "my_wave" string literals with MY_WAVE_PLAYLIST_ID constant
and extract _get_browse_names() helper to deduplicate locale detection
logic across browse(), get_playlist(), and recommendations().

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: Claude Opus 4.6 <noreply@anthropic.com>
music_assistant/providers/yandex_music/__init__.py
music_assistant/providers/yandex_music/api_client.py
music_assistant/providers/yandex_music/constants.py
music_assistant/providers/yandex_music/provider.py
music_assistant/providers/yandex_music/streaming.py
tests/providers/yandex_music/test_api_client.py
tests/providers/yandex_music/test_integration.py
tests/providers/yandex_music/test_my_wave.py [new file with mode: 0644]