Address review comments: simplify Yandex Music provider configuration#41
Merged
trudenboy merged 3 commits intorefactor/yandex-config-categoriesfrom Feb 16, 2026
Conversation
Co-authored-by: trudenboy <139659391+trudenboy@users.noreply.github.com>
- Keep only 8 essential config entries: token, clear auth, quality, streaming mode, preload buffer, My Wave max tracks, Liked Tracks max tracks, and base URL - Remove 20+ config entries and hardcode sane defaults - Remove all category attributes from config entries - Remove conditional recommendation check in setup() - Replace all f-string logging with %s formatting (17 instances) - Update constants.py to keep only necessary constants Co-authored-by: trudenboy <139659391+trudenboy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix documentation URL and update requirements in manifest.json
Address review comments: simplify Yandex Music provider configuration
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses review feedback on PR music-assistant#3147 to reduce configuration complexity and follow logging conventions.
Changes
Configuration simplification
MY_WAVE_BATCH_SIZE = 3TRACK_BATCH_SIZE = 50DISCOVERY_INITIAL_TRACKS = 5BROWSE_INITIAL_TRACKS = 15Dependency management
pycryptodome==3.23.0from globalpyproject.tomlto provider'smanifest.jsonLogging format
%sformatting (17 instances):Net impact: -304 lines of code
Original prompt
Summary
Address all review comments from @MarvinSchenkel on PR music-assistant#3147.
Changes Required
1. Fix documentation URL in
manifest.jsonFile:
music_assistant/providers/yandex_music/manifest.jsonChange
"documentation": "https://beta.music-assistant.io/music-providers/yandex-music/"back to"documentation": "https://music-assistant.io/music-providers/yandex-music/".Also add
pycryptodome==3.23.0to therequirementsarray in the same file (see step 2).The result should be:
{ "type": "music", "domain": "yandex_music", "stage": "beta", "name": "Yandex Music", "description": "Stream music from Yandex Music service.", "codeowners": ["@TrudenBoy"], "documentation": "https://music-assistant.io/music-providers/yandex-music/", "requirements": ["yandex-music==2.2.0", "pycryptodome==3.23.0"], "multi_instance": true }2. Move
pycryptodomedependency frompyproject.tomlto provider'smanifest.jsonFile:
pyproject.tomlRemove the line
"pycryptodome==3.23.0",from the globaldependencieslist inpyproject.toml. Provider-specific dependencies belong in the provider'smanifest.jsonrequirementsarray (done in step 1).3. Drastically reduce the number of ConfigEntry — keep only essential ones
Review comment: "Why do we need all these ConfigEntries? I think we can just pick some sane values that work for the users instead of exposing 25+ config entries?"
File:
music_assistant/providers/yandex_music/__init__.pyKeep the following ConfigEntry items (total ~8):
CONF_TOKEN— authentication (required)CONF_ACTION_CLEAR_AUTH— reset authentication actionCONF_QUALITY— audio quality selection (user-facing)CONF_STREAMING_MODE— FLAC streaming mode (advanced)CONF_PRELOAD_BUFFER_MB— preload max file size (advanced, depends_on streaming mode)CONF_MY_WAVE_MAX_TRACKS— My Wave maximum tracks (advanced)CONF_LIKED_TRACKS_MAX_TRACKS— Liked Tracks maximum tracks (advanced)CONF_BASE_URL— API Base URL (advanced)Remove ALL other ConfigEntry items and hardcode their sane default values as constants. Specifically, remove these config entries from
get_config_entries()and hardcode them:CONF_ENABLE_RECOMMENDATIONS→ hardcodeTrueCONF_ENABLE_MY_WAVE_BROWSE→ hardcodeTrueCONF_ENABLE_MY_WAVE_PLAYLIST→ hardcodeTrueCONF_ENABLE_MY_WAVE_RADIO→ hardcodeTrueCONF_MY_WAVE_BATCH_SIZE→ hardcode3CONF_ENABLE_LIKED_TRACKS_BROWSE→ hardcodeTrueCONF_ENABLE_LIKED_TRACKS_PLAYLIST→ hardcodeTrueCONF_ENABLE_FEED_RECOMMENDATIONS→ hardcodeTrueCONF_ENABLE_CHART→ hardcodeTrueCONF_ENABLE_NEW_RELEASES→ hardcodeTrueCONF_ENABLE_NEW_PLAYLISTS→ hardcodeTrueCONF_ENABLE_PICKS_BROWSE→ hardcodeTrueCONF_ENABLE_MIXES_BROWSE→ hardcodeTrueCONF_ENABLE_TOP_PICKS→ hardcodeTrueCONF_ENABLE_MOOD_MIXES→ hardcodeTrueCONF_ENABLE_ACTIVITY_MIXES→ hardcodeTrueCONF_ENABLE_SEASONAL_MIXES→ hardcodeTrueCONF_TRACK_BATCH_SIZE→ hardcode50CONF_DISCOVERY_INITIAL_TRACKS→ hardcode5CONF_BROWSE_INITIAL_TRACKS→ hardcode15In
constants.py: For the removed config keys, keep only the default value constants (e.g.,MY_WAVE_BATCH_SIZE = 3,TRACK_BATCH_SIZE = 50, etc.) and remove theCONF_*key strings that are no longer needed.In
provider.py: Replace allself.config.get_value(CONF_REMOVED_KEY)calls with the hardcoded constant values. For example:self.config.get_value(CONF_ENABLE_RECOMMENDATIONS, True)→ justTrue(remove the if-check or always execute the block)self.config.get_value(CONF_MY_WAVE_BATCH_SIZE) or 3→MY_WAVE_BATCH_SIZE(a constant= 3)self.config.get_value(CONF_TRACK_BATCH_SIZE) or 50→TRACK_BATCH_SIZE(a constant= 50)For the kept config entries (
CONF_MY_WAVE_MAX_TRACKS,CONF_LIKED_TRACKS_MAX_TRACKS,CONF_BASE_URL), keep usingself.config.get_value(...).In
__init__.pysetup(): Remove the conditional checkif not config.get_value(CONF_ENABLE_RECOMMENDATIONS, True)since recommendations are now always enabled.Remove category attributes from the remaining ConfigEntry items since there will be so few entries that categories are unnecessary. The remaining advanced entries should just use
advanced=Truewithoutcategory=.4. Replace ALL f-string logging with
%sformattingReview comment: "Use
%sformatting when logging. There's quite a few more of these in this PR. Always use%soverf-stringlogging."Search ALL files in
music_assistant/providers/yandex_music/for patterns like:self.logger.debug(f"...")self.logger.info(f"...")self.logger.warning(f"...")self.logger.error(f"...")And replace them ALL with
%s-style formatting.Known locations in
provider.py:This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.