Fix: Android Auto queue context bug (issue #500)#530
Open
EIHEI2 wants to merge 1 commit intoeddyizm:mainfrom
Open
Fix: Android Auto queue context bug (issue #500)#530EIHEI2 wants to merge 1 commit intoeddyizm:mainfrom
EIHEI2 wants to merge 1 commit intoeddyizm:mainfrom
Conversation
- Modified getItems() in MediaBrowserTree.kt to return only the selected track instead of expanding based on timestamp lookup - This prevents loading the wrong queue context (e.g., playlist instead of album) when the same track exists in multiple sources - The queue expansion is now handled by the browsing context rather than timestamp-based metadata lookup Fixes: eddyizm#500
Contributor
|
Hello, I was wondering why I'd missed such a simple fix, so I tested it. How did you test it? |
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 PR fixes the Android Auto bug where selecting a track from an album incorrectly loads a previously played playlist queue instead of the album queue.
Root Cause
The
getItems()method inMediaBrowserTree.ktwas using timestamp-based lookup to expand a single track selection into a full queue. However, when the same track exists in multiple contexts (album, playlist, etc.), the timestamp lookup would return tracks from the wrong context.Fix
Modified
getItems()to return only the selected track without timestamp-based expansion. The queue expansion is now handled by the browsing context rather than metadata timestamp lookup.Changes
app/src/tempus/java/com/cappielloantonio/tempo/service/MediaBrowserTree.kt: SimplifiedgetItems()to return single tracksTesting
Fixes #500