diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-09 13:23:38 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-09 13:23:38 +0200 |
commit | 124dcfdf666484c0797d25b37c08999404eda026 (patch) | |
tree | 9648419ddab8d1dd3fbe71f85a5e09cf43064c33 /streamer.c | |
parent | 1b79344476e2050a80f1b190ecb0ad8665c49318 (diff) |
fixed shuffle in don't loop mode
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -329,13 +329,16 @@ streamer_move_to_nextsong (int reason) { } playItem_t *it = pmin; if (!it) { - trace ("all songs played! reshuffle\n"); // all songs played, reshuffle and try again - if (pl_loop_mode == PLAYBACK_MODE_LOOP_ALL) { // loop + if (pl_loop_mode == PLAYBACK_MODE_LOOP_ALL || reason == 1) { // loop + trace ("all songs played! reshuffle\n"); plt_reshuffle (streamer_playlist, &it, NULL); } } if (!it) { + playItem_t *temp; + plt_reshuffle (streamer_playlist, &temp, NULL); + streamer_set_nextsong (-2, 1); pl_global_unlock (); return -1; } @@ -890,7 +893,7 @@ streamer_thread (void *ctx) { dec = plug_get_decoder_for_id (streaming_track->decoder_id); if (dec) { fileinfo = dec->open (); - if (fileinfo && dec->init (fileinfo, DB_PLAYITEM (streaming_track) < 0)) { + if (fileinfo && dec->init (fileinfo, DB_PLAYITEM (streaming_track)) < 0) { dec->free (fileinfo); fileinfo = NULL; } |