Add Yandex Music Connect (Ynison) plugin provider#3614
Add Yandex Music Connect (Ynison) plugin provider#3614trudenboy wants to merge 9 commits intomusic-assistant:devfrom
Conversation
🔒 Dependency Security Report📦 Modified Dependencies
|
There was a problem hiding this comment.
Pull request overview
Adds a new yandex_ynison plugin provider that exposes Music Assistant players as Yandex Music Connect (Ynison) devices, including QR-based authentication, a WebSocket client for Ynison state sync, and PCM streaming via the existing yandex_music provider.
Changes:
- Introduce the Ynison WebSocket client (redirector → state service) with reconnect and state parsing/sending helpers.
- Add the plugin provider that maps Ynison state/control to Music Assistant player/source selection and streaming via ffmpeg conversion.
- Add QR authentication helpers and a unit test suite for client/provider behavior.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
music_assistant/providers/yandex_ynison/__init__.py |
Provider setup and config flow (QR auth actions, player selection options). |
music_assistant/providers/yandex_ynison/constants.py |
Centralized protocol/config constants for Ynison. |
music_assistant/providers/yandex_ynison/manifest.json |
Declares the plugin provider metadata and docs link. |
music_assistant/providers/yandex_ynison/icon.svg |
Provider icon asset. |
music_assistant/providers/yandex_ynison/yandex_auth.py |
Yandex Passport QR auth + token exchange helpers. |
music_assistant/providers/yandex_ynison/ynison_client.py |
Core Ynison WebSocket client implementation (connect, message loop, reconnect, send/state parsing). |
music_assistant/providers/yandex_ynison/provider.py |
PluginProvider implementation bridging Ynison state to MA playback/source and streaming. |
tests/providers/yandex_ynison/__init__.py |
Test package marker. |
tests/providers/yandex_ynison/test_ynison_client.py |
Unit tests for protocol header/state parsing/sending/disconnect/device-id generation. |
tests/providers/yandex_ynison/test_provider.py |
Unit tests for provider init, player selection, source selection behavior, provider matching, and Ynison state handling. |
Makes Music Assistant players appear as devices in the Yandex Music app via the Ynison protocol (similar to Spotify Connect). - Ynison WebSocket client with two-step connection and reconnect - Audio streaming via linked yandex_music provider with FFmpeg PCM - Bidirectional playback control (play/pause/seek/next/prev) - QR-code authentication via ya-passport-auth - Radio queue management with proactive prefetch - Echo detection to prevent state sync feedback loops - 179 unit tests Depends on: yandex_music MusicProvider Requires: ya-passport-auth==1.2.3 Source: trudenboy/ma-provider-yandex-ynison v1.5.2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Add new Yandex Music Connect (Ynison) plugin provider that makes Music Assistant players appear as playback devices in the Yandex Music app — similar to how Spotify Connect works.
When a user selects the MA device in the Yandex Music app, the plugin receives track IDs via the Ynison WebSocket protocol, fetches audio from Yandex Music CDN (via the linked
yandex_musicMusicProvider), and streams PCM to the selected MA player.Architecture
Key features
yandex_musicMusicProvider with FFmpeg PCM conversion (-rerealtime pacing) and byte-accurate progress syncya-passport-auth==1.2.3— QR code flow with automatic music-token refresh from x_token (self-healing)SyncStateFromEOVfor queue replenishment, bounds-validated queue advancementin_use_bylifecycle — released on pause, re-acquired on resume vianeeds_reselectflaginstance_name_postfixStreamMetadataChanged files
providers/yandex_ynison/__init__.pyproviders/yandex_ynison/provider.pyproviders/yandex_ynison/ynison_client.pyproviders/yandex_ynison/streaming.pyproviders/yandex_ynison/yandex_auth.pyya-passport-authfor QR auth and token refreshproviders/yandex_ynison/constants.pyproviders/yandex_ynison/protocols.pyproviders/yandex_ynison/config_helpers.pyproviders/yandex_ynison/manifest.jsonya-passport-auth==1.2.3,depends_on: yandex_music)providers/yandex_ynison/icon.svgrequirements_all.txtya-passport-auth==1.2.3tests/.../test_provider.pytests/.../test_ynison_client.pytests/.../test_yandex_auth.pytests/.../test_streaming.pyTest plan
pytest)Dependencies
ya-passport-auth==1.2.3— Yandex passport authentication (QR login, token management)yandex_musicMusicProvider (depends_onin manifest) — hard requirement for audio streaming; the plugin will not load without it. Runtime detection via_check_yandex_provider_match()handles the edge case where the provider is unloaded while the plugin is running.