fix Spotify queue modifications - release

This commit is contained in:
philippe44
2023-10-18 17:07:29 -07:00
parent d03678ea81
commit 2a77d09f11
2 changed files with 24 additions and 12 deletions

View File

@@ -204,8 +204,13 @@ void SpircHandler::handleFrame(std::vector<uint8_t>& data) {
CSPOT_LOG(debug, "Got replace frame");
playbackState->syncWithRemote();
trackQueue->updateTracks(playbackState->remoteFrame.state.position_ms,
false);
// 1st track is the current one, but update the position
trackQueue->updateTracks(
playbackState->remoteFrame.state.position_ms +
ctx->timeProvider->getSyncedTimestamp() -
playbackState->innerFrame.state.position_measured_at,
false);
this->notify();
sendEvent(EventType::FLUSH);