Skip to content

fix(play): follow a song found for a link though its app has it some seconds longer - #1313

Merged
astrovm merged 2 commits into
mainfrom
fix/remaster-name-follow
Nov 29, 2026
Merged

astrovm merged 2 commits into
mainfrom
fix/remaster-name-follow

Conversation

@astrovm

@astrovm astrovm commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

A song opened from a link was played in its app and then taken for another song: the card's Lyrics didn't move with it, and its practice cards made no sound. Reported with a Deezer link to WINK's "愛が止まらない ~Turn it into love~ (Original Remastered 2018)" played in YouTube Music.

Cause

Measured on the Samsung with that link and a logging build.

  1. Deezer says the song is 3:28 (208.000 s). The song the matcher finds for it in YouTube Music is 3:32.9 (212.903 s). ExactMatcher takes a pick up to 8 s off (SAME_LENGTH_MS), so it opens it. That's right.
  2. MediaController.anotherRecording in Playback.kt had a rule of its own: more than 3 s off is another recording. So plays(song) was false for the song Crosstune had just opened: another=true names=true in the log.
  3. With nothing followed, the words had no clock, and a practice card waited for a song that never played.
flowchart LR
  link[Deezer link, 208.0 s] --> matcher[ExactMatcher: up to 8 s off]
  matcher --> app[YouTube Music plays 212.9 s]
  app --> follower{follower: how far off?}
  follower -->|before: over 3 s| no[another recording, not followed]
  follower -->|now: up to 8 s| yes[followed: words move, cards play]
Loading

Fix

The follower uses the matcher's limit. A song the matcher can pick for a link is then a song Crosstune follows, however it got to the app: Play, Open, Recent, a practice card, or the app's own queue after a restart.

Tests

  1. PlaybackTest.aSongFoundForALinkIsFollowedThoughItsAppHasItSomeSecondsLonger: the reported song, by both names and lengths.
  2. anotherVersionOfASongPausedInItsAppIsntTheOneAskedFor holds the new limit from both sides: 8 s off is the song, 8.001 s isn't.

Version

2.29.1 (2290100), with its changelog line.

Done when

  • :app:ci passes locally (ea39637, BUILD SUCCESSFUL in 30m 23s; the later commit only bumps the version)
  • CI and mutation testing pass (ec31738: every check passed, mutants included)
  • Checked on the Samsung, perf build of ea39637, the reported Deezer link, YouTube Music: before the fix the player stayed on Play while YouTube Music played; after it, the words moved line by line with the song, and a practice card of the song moved YouTube Music to its line (1:41.9), played to 1:46.0 and paused.
  • Agent review

Review

One Sonnet review of the full diff. No defect in the follower. Two trade-offs it named:

  1. "A paused take 3 to 8 s off is now carried on, where main started the linked one." Kept on purpose. By length alone that take can't be told from the reported case, which has to be carried on: a practice card of the song finds YouTube Music paused on the 212.9 s take. The matcher would pick either take for the link.
  2. "Words kept for the link's length may be turned down for the app's take." Not checked beyond the reported song, whose words came timed: Issue Words for a song its app has 3 to 8 s longer than its link may lose their times #1312.

Known issues

Issue #1312.

@astrovm
astrovm marked this pull request as ready for review November 29, 2026 04:21
@astrovm
astrovm merged commit 8b507d7 into main Nov 29, 2026
20 checks passed
@astrovm
astrovm deleted the fix/remaster-name-follow branch November 29, 2026 04:22
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.

1 participant