mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-09 12:48:09 -05:00
Remove dead code: playback_next_bh and playback_prev_bh are only called
during playback_pause. In playback_pause "cur_playing" is always set to NULL so that in playback_next_bh and playback_prev_bh only the else-clause can become true.
This commit is contained in:
parent
79646c78e4
commit
7e43a42c88
38
src/player.c
38
src/player.c
@ -2633,19 +2633,18 @@ playback_prev_bh(struct player_command *cmd)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (cur_playing)
|
if (!cur_streaming)
|
||||||
{
|
{
|
||||||
if (cur_playing->end > cur_playing->stream_start)
|
DPRINTF(E_LOG, L_PLAYER, "Could not get current stream source\n");
|
||||||
history_add(cur_playing->id);
|
return -1;
|
||||||
source_stop(cur_playing);
|
|
||||||
}
|
|
||||||
else if (cur_streaming)
|
|
||||||
{
|
|
||||||
if (cur_streaming->end > cur_streaming->stream_start)
|
|
||||||
history_add(cur_streaming->id);
|
|
||||||
source_stop(cur_streaming);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only add to history if playback started. */
|
||||||
|
if (cur_streaming->end > cur_streaming->stream_start)
|
||||||
|
history_add(cur_streaming->id);
|
||||||
|
|
||||||
|
source_stop(cur_streaming);
|
||||||
|
|
||||||
ret = source_prev();
|
ret = source_prev();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
@ -2673,19 +2672,18 @@ playback_next_bh(struct player_command *cmd)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (cur_playing)
|
if (!cur_streaming)
|
||||||
{
|
{
|
||||||
if (cur_playing->end > cur_playing->stream_start)
|
DPRINTF(E_LOG, L_PLAYER, "Could not get current stream source\n");
|
||||||
history_add(cur_playing->id);
|
return -1;
|
||||||
source_stop(cur_playing);
|
|
||||||
}
|
|
||||||
else if (cur_streaming)
|
|
||||||
{
|
|
||||||
if (cur_streaming->end > cur_streaming->stream_start)
|
|
||||||
history_add(cur_streaming->id);
|
|
||||||
source_stop(cur_streaming);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only add to history if playback started. */
|
||||||
|
if (cur_streaming->end > cur_streaming->stream_start)
|
||||||
|
history_add(cur_streaming->id);
|
||||||
|
|
||||||
|
source_stop(cur_streaming);
|
||||||
|
|
||||||
ret = source_next(1);
|
ret = source_next(1);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user