music-assistant-server
Branch:dev-lidarr-plugin
Commit Details
Add KION Music (MTS Music) provider (#3100)
* feat(kion_music): add KION Music (MTS Music) provider Add a new music provider for KION Music (music.mts.ru), the MTS telecom music streaming service. The provider adapts the Yandex Music API client (yandex-music library) to work with KION's API endpoint at music.mts.ru/ya_api. Features: - Search (tracks, albums, artists, playlists) - Library access (liked artists, albums, tracks; user playlists) - Add/remove library items (like/unlike) - Streaming with quality selection (High 320kbps / Lossless FLAC) - Lossless streaming via get-file-info API with flac-mp4 codec support - Playlist track loading with pagination fix and batch fetching - Retry on NetworkError to handle transient failures The provider reuses the same yandex-music==2.2.0 dependency already present for the Yandex Music provider — no new dependencies required. Co-authored-by: Cursor <[email protected]> * chore(kion_music): update documentation URL in manifest Co-authored-by: Cursor <[email protected]> * fix(kion_music): fix missing album cover art in library - In parse_track(), use parse_album() instead of ItemMapping so albums get full metadata (including cover_uri) when tracks are synced - In get_liked_albums(), fetch full album details via client.albums() in batches of 50 (likes endpoint returns minimal data without cover_uri) - Remove unused noqa in provider.py (ruff) Co-authored-by: Cursor <[email protected]> * Address PR #3100 review: fix base_url, performance, redundant condition, docstrings; add tests - Pass KION_BASE_URL to ClientAsync in connect() so API calls go to music.mts.ru - Use set(batch) for O(1) lookups in get_liked_albums() fallback path - Remove redundant `track_count > 0` check already guaranteed by outer condition - Replace "Yandex Music" with "KION Music" in docstrings/comments - Add full test suite: 5 api_client unit tests, 18 parser tests, 11 integration tests Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Михаил Невский <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
Author
Mikhail Nevskiy<[email protected]>
February 10, 2026 at 01:42 PM UTC
Committer
GitHub<[email protected]>
February 10, 2026 at 01:42 PM UTC
247additions
0deletions
22files changed
Parent commits
Changes
22 files
+247-0
Changed Files (22)
music_assistant/providers/kion_music/
tests/providers/kion_music/
tests/providers/kion_music/__snapshots__/
tests/providers/kion_music/fixtures/albums/
tests/providers/kion_music/fixtures/artists/
tests/providers/kion_music/fixtures/playlists/
tests/providers/kion_music/fixtures/tracks/
music_assistant/providers/kion_music/__init__.py
music_assistant/providers/kion_music/api_client.py
music_assistant/providers/kion_music/constants.py
music_assistant/providers/kion_music/icon.svg
music_assistant/providers/kion_music/icon_monochrome.svg
music_assistant/providers/kion_music/manifest.json
music_assistant/providers/kion_music/parsers.py
music_assistant/providers/kion_music/provider.py
music_assistant/providers/kion_music/streaming.py
tests/providers/kion_music/__init__.py
tests/providers/kion_music/__snapshots__/test_parsers.ambr
tests/providers/kion_music/conftest.py
tests/providers/kion_music/fixtures/albums/minimal.json
tests/providers/kion_music/fixtures/artists/minimal.json
tests/providers/kion_music/fixtures/artists/with_cover.json
tests/providers/kion_music/fixtures/playlists/minimal.json
tests/providers/kion_music/fixtures/playlists/other_user.json
tests/providers/kion_music/fixtures/tracks/minimal.json
tests/providers/kion_music/fixtures/tracks/with_artist_and_album.json
tests/providers/kion_music/test_api_client.py
tests/providers/kion_music/test_integration.py
tests/providers/kion_music/test_parsers.py
+247