Skip to content

Commit

Permalink
choose innerFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Oct 5, 2023
1 parent 351d279 commit 35dd15a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cspot/src/TrackQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,10 @@ bool TrackQueue::queueNextTrack(int offset, uint32_t positionMs) {
bool TrackQueue::skipTrack(SkipDirection dir, bool expectNotify) {
bool canSkipNext = currentTracks.size() > currentTracksIndex + 1;
bool canSkipPrev = currentTracksIndex > 0;
uint64_t position = !playbackState->remoteFrame.state.has_position_ms ? 0 :
playbackState->remoteFrame.state.position_ms +
uint64_t position = !playbackState->innerFrame.state.has_position_ms ? 0 :
playbackState->innerFrame.state.position_ms +
ctx->timeProvider->getSyncedTimestamp() -
playbackState->remoteFrame.state.position_measured_at;
playbackState->innerFrame.state.position_measured_at;

if (dir == SkipDirection::PREV && (currentTracksIndex == 0 || position > 3000)) {
queueNextTrack(0);
Expand Down

0 comments on commit 35dd15a

Please sign in to comment.