Skip to content

Restore Session: resume at exact playback position within the current track, not just the track start #317

@vicrodh

Description

@vicrodh

Split from #304 (reporter: @am4c130d).

Current behaviour

Restore Session (local) returns to the correct track on startup, but playback begins from 00:00 rather than from the timestamp where the app last closed. Qobuz Connect mirrors this — it only exposes a track pointer, not an in-track offset.

Ask

Persist the last known playback position (millisecond offset inside the current track) together with the track id, and seek to it on session restore. From the original report:

I would like QBZ to save the track (if not the position in the track) and the complete queue […]

i.e. the position inside the track is the secondary ask, but the one that makes the feature feel complete.

Acceptance

  • Playback position sampled at a modest interval (every 2–5 s, or on explicit pause / stop / app close) and written to the session store
  • On restore, the player seeks to the stored offset before announcing TrackStarted to downstream listeners (MPRIS, tray, etc.), so the UI never briefly displays 00:00
  • When the restored track is a streaming track, the seek happens after the first segment is buffered to avoid a second fetch round-trip
  • Setting toggle in Settings → Playback → "Resume exact position" so users who prefer starting the track fresh can opt out

Out of scope

  • Remote / Qobuz Connect position restore (Qobuz's own protocol doesn't expose this; would be a separate upstream feature request)

Thanks @am4c130d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions