Skip to content

Read embedded MusicBrainz IDs, rotate the Daily Mix, improve shuffle, add mix gestures - #236

Merged
lostf1sh merged 6 commits into
mainfrom
fix/mix-shuffle-musicbrainz-gestures
Nov 15, 2026
Merged

lostf1sh merged 6 commits into
mainfrom
fix/mix-shuffle-musicbrainz-gestures

Conversation

@lostf1sh

Copy link
Copy Markdown
Collaborator

Fixes #223, #222, #205 and #213. There is one commit per issue, so they can be reviewed one at a time.

#223: read MusicBrainz IDs from embedded tags

  • Library scans now read MUSICBRAINZ_TRACKID, MUSICBRAINZ_ALBUMID and MUSICBRAINZ_ARTISTID. TagLib maps them from ID3 (UFID/TXXX), MP4 freeform atoms and Vorbis/Opus comments; JAudioTagger is the fallback. The IDs go into mb_recording_id / mb_release_id / mb_artist_id.
  • ListenBrainz scrobbles now carry the recording MBID without a manual lookup.
  • Malformed IDs are dropped, because ListenBrainz rejects listens with an invalid MBID. When several IDs are joined in one value (id1; id2), the first valid one is kept.
  • Also fixes a bug: a rescan used to wipe IDs set by a manual MusicBrainz lookup. They now stay unless the file's own tags provide IDs.
  • Existing libraries pick up the IDs on a full rescan, since incremental syncs only read changed files. .m4a tags are read only on a deep scan, as before.

#222: Daily Mix never changes

The per-day noise in the ranking was 0.005, too small to reorder anything. With little listening history, the mix came out the same every day; with none at all, it was just the newest songs. The noise is now 0.25. Songs with similar scores rotate between days, and the mix stays the same within a day.

#205: shuffle

I followed what other open-source players do:

  • Turning shuffle on moves the playing song to the front of the queue, so no song is left behind it until the queue repeats. Before, the song kept its position. Moving the playing item does not interrupt playback.
  • When a shuffled repeat-all queue starts over, a new order is drawn instead of looping the same one.
  • Not included: spreading out songs by the same artist or album, and a long-press menu on the shuffle button.

#213: gestures

  • Long-pressing a Your Mix cover or a Daily Mix row on Home opens the song options, like the Recently Played pills do. Behavior inside the Daily Mix screen is unchanged.
  • Swipe to queue: swiping a song row toward the end edge queues it in playlist, album, artist, genre, Daily Mix and Recently Played lists. A haptic fires when the swipe passes the threshold.
    • A new setting under Settings > Behavior > Song lists picks Add to queue (default), Play next or Off. The new strings are translated into every locale.
    • The swipe is off in Library tabs, where it would conflict with the pager, and in selection, reorder and remove modes.
  • The Play label in the song options sheet now shrinks to fit one line, so Italian "Riproduci" is no longer cut off.

Testing

  • :app:compileDebugKotlin passes.
  • New tests cover MBID parsing and the JAudioTagger fallback, keeping stored IDs across a rescan, Daily Mix rotation between days, and shuffle moving the playing song to the front without restarting it.
  • The Daily Mix test fails with the old 0.005 noise and passes with the new value.
  • Two existing shuffle tests asserted that the playing song stays in place; they now assert it moves to the front.
  • :app:testDebugUnitTest has 6 failures and :app:lintDebug fails with MissingTranslation. All of these come from values-pt-rBR (Add Brazilian Portuguese translation #232), which is already on main and only partly translated. None of them involve strings from this PR.
  • Not tested on a device yet. That covers the swipe gesture, reshuffling during crossfade, and TagLib reading a Picard-tagged file.

Library scans now store MUSICBRAINZ_TRACKID/ALBUMID/ARTISTID from ID3, MP4 and Vorbis/Opus tags, so ListenBrainz scrobbles carry the recording MBID without a manual lookup. Malformed IDs are dropped, and IDs from an earlier scan or manual lookup survive a rescan that reads no tags; previously every rescan wiped them.

Fixes #223
The per-day noise in the ranking was 0.005, too small to reorder anything, so with little listening history the mix came out the same every day (the newest songs when nothing had been played). It now varies enough to rotate songs with similar scores while staying stable within a day.

Fixes #222
Turning shuffle on now moves the playing song to the front, like other players, so no song is left behind it until the queue repeats; moving the playing item keeps playback going. When a shuffled repeat-all queue starts over, a new order is drawn instead of looping the same one.

Fixes #205
- Long-pressing a Your Mix cover or a Daily Mix row on Home opens the song options, like the Recently Played pills.
- Swiping a song row toward the end edge queues it in playlist, album, artist, genre, Daily Mix and Recently Played lists. Settings > Behavior > Song lists chooses add to queue (default), play next, or off. Library tabs keep it off since their pager swipes sideways, and it is off in selection, reorder and remove modes.
- The Play label in the song options sheet shrinks to one line, so long translations such as Italian "Riproduci" are no longer cut.

Fixes #213
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues established.

Summary

This PR reads embedded MusicBrainz IDs, preserves stored IDs during rescans, adds daily mix variety, updates shuffle behavior, and adds song gestures with translated settings.

  • Library scans save valid MusicBrainz IDs from audio tags.
  • Daily Mix ranking gives similar songs more room to rotate each day.
  • Shuffle starts with the playing song and repeat-all draws a fresh order.
  • Song rows can be swiped to queue a song in supported lists.
  • Home mix covers and rows open song options on a long press.
  • Pause fades report the paused state as soon as they begin.
  • The Play label fits on one line in the song options sheet.

Reviews (3) · Last reviewed commit: "Report a pause when its fade starts" · Reviewed by Greptile

When Home shows the library preview in place of Your Mix, tapping a cover queues the full library, but Play in the long-press options queued only the 48-song preview. Both now build the full library queue.
Pausing fades the audio out over 500 ms, and the session kept reporting
"playing" until the fade ended. That overwrote the pause the app had
already shown, so the pause button changed about 0.7 s after the tap,
and a second tap inside the fade paused again instead of resuming.

FadingPlayer now reports paused from the first fade step and reports
playing again when play cuts the fade short. The fade itself is
unchanged.

Fixes #238
@lostf1sh
lostf1sh merged commit 122a48f into main Nov 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Read MusicBrainz IDs from embedded track metadata daily mix never changes [Feature]: Possibly an improved music shuffle?

1 participant