Repository navigation
fix(originos): keep lyrics on the Origin Island and match the lyrics screen - #651
Open
JacksonJones2003 wants to merge 1 commit into
Open
JacksonJones2003 wants to merge 1 commit into
JacksonJones2003 wants to merge 1 commit into
Conversation
…screen - Resend the card lyrics every 4 s instead of 25 s: the island and the lock screen widget forget them each time they are drawn again and never ask the app again, while the card in the notification shade keeps its own copy. - Prefer the lines the lyrics screen settled on (sanitized, re-timed, from the provider the user picked), 2 s after its last update, as the card starts the lyrics over with every provider that answers. - The service's own fetch, used until then or with no screen open, waits for the track's duration like the lyrics screen and prepares the lines the same way; without the duration some providers return another cut of the song. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Follow-up to the OriginOS music card lyrics (802b4d5). On a vivo phone, the lyrics showed on the music card in the notification shade, but often not on the Origin Island or the lock screen, and the card sometimes showed a different, worse version of the lyrics than LastWave's own lyrics screen. This change fixes both.
The same behaviour has been running on a vivo phone (OriginOS,
com.vivo.musicwidgetmix17.0.8.3) as a patch to LastWave 5.2.1, through several days of testing. This PR is that behaviour written into the app.What was wrong
Changes
OriginOsMusicCard.LYRICS_RESEND_INTERVAL_MS: 25 s → 4 s.OriginOsMusicCard.playerLyrics: the lines the lyrics screen shows, published fromPlayerViewModel.publishLyricsfor synced lyrics, keyed by the track (trackKeyOf, the identitymediaIdOfalready used).publishOriginOsLyricsnow sends the lyrics screen's lines once they have not changed for 2 s (PLAYER_LYRICS_SETTLE_MS). Until then, or when no screen is open, it uses its own fetch.fetchOriginOsLrc) waits up to 8 s for the track's duration, as the lyrics screen does, and prepares the lines withLyricsSanitizer.sanitizeandLyricsRepository.normalizeLyricTiming. Instrumental results are skipped.trackKeyOf.Testing
./gradlew :app:testDebugUnitTest --tests '*OriginOsMusicCardTest': 12 tests pass (onmainat b457952 with this change).MusicPlaybackServiceuntil the card is opened (or one of its buttons is pressed), and the island shows no lyrics until then. Apple Music behaves the same way on this phone.🤖 Generated with Claude Code