[player/dacp/mpd/jsonapi] Combine seek commands into one with mode param

Also changes relative seeking behavior:
- seeking behind the the current track only switches to the previous
track, if we are not more than 3 seconds into the current track,
otherwise starts current track from the beginning
- seeking beyond the current track will start the next track from the
beginning
This commit is contained in:
chme
2019-09-22 09:18:53 +02:00
committed by ejurgensen
parent d69f328973
commit 6e5d6791ff
5 changed files with 134 additions and 100 deletions

View File

@@ -1865,7 +1865,7 @@ jsonapi_reply_player_seek(struct httpd_request *hreq)
if (ret < 0)
return HTTP_BADREQUEST;
ret = player_playback_seek(position_ms);
ret = player_playback_seek(position_ms, PLAYER_SEEK_POSITION);
}
else
{
@@ -1873,7 +1873,7 @@ jsonapi_reply_player_seek(struct httpd_request *hreq)
if (ret < 0)
return HTTP_BADREQUEST;
ret = player_playback_seek_rel(seek_ms);
ret = player_playback_seek(seek_ms, PLAYER_SEEK_RELATIVE);
}
if (ret < 0)