feat(jukebox): add sountracks playing center - #4197
Open
wadiebs wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new v2 “Jukebox” feature that lets users browse and play soundtrack tracks across the full RomM library, backed by new/extended music APIs and enhancements to the shared soundtrack player (shuffle, favorites, artwork fallbacks).
Changes:
- Introduces a new v2 Jukebox view (home + multiple browse/playlist modes) and wires it into routing and the user menu.
- Enhances the shared soundtrack player/panels (persistent shuffle, track actions menu, mini-player behavior, artwork resolution).
- Extends backend music track responses and permissions, and updates generated frontend API types and locales.
Reviewed changes
Copilot reviewed 30 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/v2/views/Jukebox.vue | New v2 Jukebox view implementing playlist/library browsing modes and integrating SoundtrackPanel. |
| frontend/src/v2/utils/freeRadio.ts | Adds Free Radio session builder and duration helpers for randomized, album-balanced playback. |
| frontend/src/v2/router/routes.ts | Registers the v2 route component for the new “music” route. |
| frontend/src/v2/components/Soundtrack/MiniPlayer.vue | Updates mini-player visibility logic for Jukebox + adds shuffle control and artwork fallback. |
| frontend/src/v2/components/GameDetails/SoundtrackPanel.vue | Reworks panel to support both ROM-based and catalog-based track lists, adds actions (favorite/download/delete), shuffle UX, and scrolling. |
| frontend/src/v2/components/AppShell/UserMenu.vue | Adds a beta Jukebox entry under the Tools group in the user menu. |
| frontend/src/stores/soundtrackPlayer.ts | Adds playlist-level shuffle support, playlist restoration behavior, and game artwork resolution helper. |
| frontend/src/services/api/music.ts | Introduces music API client helpers including chunked getAllTracks and favorites endpoints. |
| frontend/src/plugins/router.ts | Adds the /music route and ROUTES constant for Jukebox navigation. |
| frontend/src/locales/zh_TW/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/zh_CN/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/tr_TR/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/ru_RU/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/ro_RO/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/pt_BR/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/pl_PL/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/ko_KR/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/ja_JP/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/it_IT/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/hu_HU/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/fr_FR/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/es_ES/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/en_US/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/en_GB/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/de_DE/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/cs_CZ/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/locales/bg_BG/common.json | Adds common labels/messages for Jukebox and player actions. |
| frontend/src/generated/models/MusicTrackSchema.ts | Updates generated schema to include genres, added_at, and game cover URL. |
| frontend/src/generated/models/ActionKey.ts | Updates generated ActionKey union to include playlist.edit. |
| backend/handler/database/roms_handler.py | Extends music track query with game genres and file creation date, plus metadata join. |
| backend/endpoints/responses/permission.py | Adds playlist.edit action key and maps it from playlist write permission. |
| backend/endpoints/responses/music.py | Extends music response schema with genres, added_at, and game cover URL generation. |
Files not reviewed (2)
- frontend/src/generated/models/ActionKey.ts: Generated file
- frontend/src/generated/models/MusicTrackSchema.ts: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+133
to
+145
| if (preserveShuffle && wasShuffled) { | ||
| const tracksByKey = new Map( | ||
| tracks.map((item) => [item.romId + ":" + item.fileId, item]), | ||
| ); | ||
| const restored = previousOrder.flatMap((item) => { | ||
| const next = tracksByKey.get(item.romId + ":" + item.fileId); | ||
| if (!next) return []; | ||
| tracksByKey.delete(item.romId + ":" + item.fileId); | ||
| return [next]; | ||
| }); | ||
| playlist.value = [...restored, ...tracksByKey.values()]; | ||
| return; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
resolved the review note : Shuffle state can become misleading
Comment on lines
+14
to
+23
| export function buildFreeRadioSession( | ||
| tracks: MusicTrackSchema[], | ||
| random: () => number = Math.random, | ||
| ): MusicTrackSchema[] { | ||
| const eligibleTracks = tracks.filter( | ||
| (track) => | ||
| typeof track.duration_seconds === "number" && | ||
| Number.isFinite(track.duration_seconds) && | ||
| track.duration_seconds > 0, | ||
| ); |
Contributor
Author
|
Copilot comment addressed |
gantoine
self-requested a review
August 16, 2026 18:11
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.
Description
This change introduces a Jukebox for browsing and playing soundtracks across the entire RomM library. The Jukebox is available from the user menu as a beta feature. Its home screen provides curated playlists and several ways to browse the soundtrack library.
Playlists:
Library:
Player Changes
Backend Changes
playlist.editUI permission derived from playlist-write accessLocalization
Jukebox labels and messages were added for every supported locale.
Testing
Screenshots