Skip to content

Migration for new icons for picker - #5306

Merged
chrisuthe merged 1 commit into
devfrom
icon-migration
Aug 4, 2026
Merged

Migration for new icons for picker#5306
chrisuthe merged 1 commit into
devfrom
icon-migration

Conversation

@stvncode

@stvncode stvncode commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What does this implement/fix?

Related issue (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • New music/player/metadata/plugin provider — new-provider
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • For changes to shared models, the companion PR in music-assistant/models is linked.
  • For changes affecting the UI, the companion PR in music-assistant/frontend is linked.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.
  • I have raised a PR against the documentation repository targeting the main or beta branch as appropriate.

@stvncode stvncode self-assigned this Aug 4, 2026
Copilot AI lite review requested due to automatic review settings August 4, 2026 14:05
@musicassistant-bot

musicassistant-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

✅ The title and description are good to go. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates player icon handling to use the Music Assistant shared icon set, including a config migration to rewrite legacy stored icon values (old picker ids and mdi-* values) into canonical shared-icon-set ids and aligning defaults and UI strings accordingly.

Changes:

  • Add a config migration that maps legacy player icon values to canonical shared-icon-set ids (dropping unmappable mdi-* selections to fall back to defaults).
  • Update player icon defaults and runtime fallback behavior to ensure a valid icon id is always served.
  • Update the icon description strings to point users to the shared-icons repository, and add unit tests for the migration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/controllers/config/test_migrations.py Adds test coverage for the new player icon migration behavior (rewrite, drop, noop, idempotency, malformed input).
music_assistant/translations/en.json Updates the icon config entry description to reference the shared Music Assistant icon set.
music_assistant/strings.json Updates the source string for the icon config entry description (basis for translations).
music_assistant/models/player.py Ensures players without an icon config entry return the configured icon or the config entry default.
music_assistant/controllers/config/migrations.py Implements _migrate_player_icons and wires it into the overall config migration flow.
music_assistant/constants.py Bumps API schema version and changes default player/group icon ids to shared-icon-set ids.

Copilot AI review requested due to automatic review settings August 4, 2026 15:08
@chrisuthe
chrisuthe self-requested a review August 4, 2026 15:09
@chrisuthe

Copy link
Copy Markdown
Member

LGTM!

@chrisuthe
chrisuthe enabled auto-merge August 4, 2026 15:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@chrisuthe
chrisuthe added this pull request to the merge queue Aug 4, 2026
Merged via the queue into dev with commit 222ac3f Aug 4, 2026
15 checks passed
@chrisuthe
chrisuthe deleted the icon-migration branch August 4, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants