/
/
# What does this implement/fix? Seeking or resuming a Spotify track (Soloist backend) could restart it from the beginning and then cut it off partway through, jumping to the next track in the queue. A fresh Soloist session restores the account's last playback state before it accepts commands. When the seek target is the track that was already playing — which is exactly what a resume or a seek of the current track is — that restored position *is* the seek target, so it confirmed a seek the engine had not made yet. Playback then started from the beginning while Music Assistant assumed it started at the seek point, and the stuck-item watchdog cut the track 30s past where it thought it should have ended. - A seek is only confirmed once the engine has been seen back below where it was when the seek went out, so the state a session restores can no longer pass for the seek landing. - A seeked item is sized from the position the engine reported as the seek landed, rather than the one it was asked for. That stops an ignored seek cutting a track that is still playing, and stops a seek that landed slightly short truncating the tail of the last track in a queue. ## Types of changes - [x] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.