Skip to content

History shows duplicates and missing tracks when Qobuz Connect is enabled #316

@vicrodh

Description

@vicrodh

Split from #304 (reporter: @am4c130d).

Symptom

When Qobuz Connect is enabled, the History tab in QBZ stops being an accurate reflection of what was actually played:

  • Some tracks appear duplicated (listed more than once for a single listen)
  • Some tracks are missing entirely even though they were played end-to-end

With Qobuz Connect disabled, History behaves correctly. The issue appears to be in how we ingest play events while a remote session is active.

Likely root cause (hypothesis — needs verification)

We probably record a History entry both when:

  1. The local player emits TrackStarted
  2. The QConnect state feed reports a current_track change

…and those two fire independently for the same listen. Conversely, when QConnect is the controller and the local player only sees state echoes, we may skip the local insert, losing the entry.

Acceptance

  • Reproduce with QConnect enabled on two devices (one driving, one following)
  • Identify the duplicated / lost insertion paths
  • Single source of truth for History writes when QConnect is active (tentative: derive strictly from CoreEvent::TrackEnded or equivalent)
  • Backfill-safe — do not corrupt existing history rows
  • Unit / integration test that exercises the QConnect-controlled listen path

Thanks @am4c130d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions