Skip to content

Fix: Android Auto queue context bug (issue #500)#530

Open
EIHEI2 wants to merge 1 commit intoeddyizm:mainfrom
EIHEI2:fix-issue-8
Open

Fix: Android Auto queue context bug (issue #500)#530
EIHEI2 wants to merge 1 commit intoeddyizm:mainfrom
EIHEI2:fix-issue-8

Conversation

@EIHEI2
Copy link
Copy Markdown

@EIHEI2 EIHEI2 commented Mar 30, 2026

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 in MediaBrowserTree.kt was 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: Simplified getItems() to return single tracks

Testing

  1. Play a track from a playlist in Android Auto
  2. Navigate to an album containing the same track
  3. Select the track from the album
  4. Verify the album queue is loaded (not the playlist)

Fixes #500

- 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
@MaFo-28
Copy link
Copy Markdown
Contributor

MaFo-28 commented Mar 30, 2026

Hello,

I was wondering why I'd missed such a simple fix, so I tested it.
On DHU and my car, it doesn't work. It becomes impossible to start playing a track.

How did you test it?

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.

[BUG] - Android Auto: Selecting a track from an album reloads a previously played playlist instead of the album queue

2 participants