Skip to content

Commit

Permalink
changed the track feedback a little, so it'll skip to the next track …
Browse files Browse the repository at this point in the history
…if there are any missreads in the stream
  • Loading branch information
tobiasguyer committed Jul 21, 2024
1 parent b0c62c0 commit 4fc99ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cspot/src/TrackPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ void TrackPlayer::runTask() {
bool endOfQueueReached = false;

while (isRunning) {
bool properStream = true;
// Ensure we even have any tracks to play
if (!this->trackQueue->hasTracks() ||
(!pendingReset && endOfQueueReached && trackQueue->isFinished())) {
Expand Down Expand Up @@ -297,6 +298,7 @@ void TrackPlayer::runTask() {
if (ret < 0) {
CSPOT_LOG(error, "An error has occured in the stream %d", ret);
currentSongPlaying = false;
properStream = false;
} else {
if (ret == 0) {
CSPOT_LOG(info, "EOF");
Expand Down Expand Up @@ -352,9 +354,8 @@ void TrackPlayer::runTask() {
if (trackQueue->isFinished()) {
endOfQueueReached = true;
}

this->eofCallback(true);
}
this->eofCallback(properStream);
}
}

Expand Down

0 comments on commit 4fc99ce

Please sign in to comment.