Merge pull request #1042 from chme/player-prev-next

[player/jsonapi] Do not report error on skip next/prev if end/start of queue is reached
This commit is contained in:
Christian Meffert
2020-07-05 10:58:50 +02:00
committed by GitHub
2 changed files with 14 additions and 11 deletions

View File

@@ -1889,8 +1889,10 @@ jsonapi_reply_player_next(struct httpd_request *hreq)
ret = player_playback_next();
if (ret < 0)
{
DPRINTF(E_LOG, L_WEB, "Error switching to next item.\n");
return HTTP_INTERNAL;
// If skipping to the next song failed, it is most likely we reached the end of the queue,
// ignore the error (play status change will be reported to the client over the websocket)
DPRINTF(E_DBG, L_WEB, "Error switching to next item (possibly end of queue reached).\n");
return HTTP_NOCONTENT;
}
ret = player_playback_start();