diff options
author | waker <wakeroid@gmail.com> | 2012-05-18 14:37:29 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-05-18 14:37:29 +0200 |
commit | 90f04ec939616a417d7eba5045104cf1da641f34 (patch) | |
tree | 71baee014edba4a9602661ba883073d65527e53b | |
parent | c96c9014eea9d21b9d499ee9b63600a20a2d8bf4 (diff) |
fixed prev/next handling when playback is stopped
-rw-r--r-- | streamer.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -461,6 +461,13 @@ streamer_move_to_nextsong (int reason) { } else if (pl_order == PLAYBACK_ORDER_LINEAR) { // linear playItem_t *it = NULL; + if (!curr) { + int cur = plt_get_cursor (streamer_playlist, PL_MAIN); + if (cur != -1) { + curr = plt_get_item_for_idx (streamer_playlist, cur, PL_MAIN); + pl_item_unref (curr); + } + } if (curr) { it = curr->next[PL_MAIN]; } @@ -578,6 +585,13 @@ streamer_move_to_prevsong (void) { } else if (pl_order == PLAYBACK_ORDER_LINEAR) { // linear playItem_t *it = NULL; + if (!playlist_track) { + int cur = plt_get_cursor (streamer_playlist, PL_MAIN); + if (cur != -1) { + playlist_track = plt_get_item_for_idx (streamer_playlist, cur, PL_MAIN); + pl_item_unref (playlist_track); + } + } if (playlist_track) { it = playlist_track->prev[PL_MAIN]; } |