diff options
author | 2009-08-11 21:46:09 +0200 | |
---|---|---|
committer | 2009-08-11 21:46:09 +0200 | |
commit | b338d34b68b138f05b2f2ef6feef2df9d08d61bd (patch) | |
tree | 3385ea40ad5722f3c9c6f693db2eaaa7e6612ae0 /playlist.c | |
parent | 245463dbe00a95e3c1ba3d841e31a63509883915 (diff) |
better handling of "end of playlist"
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -710,7 +710,8 @@ pl_nextsong (int reason) { it = playlist_head[PL_SHUFFLE]; } else { - return -1; + streamer_set_nextsong (-2, 1); + return 0; } } if (!it) { @@ -735,6 +736,10 @@ pl_nextsong (int reason) { if (pl_loop_mode == 0) { it = playlist_head[PL_MAIN]; } + else { + streamer_set_nextsong (-2, 1); + return 0; + } } if (!it) { return -1; @@ -881,6 +886,17 @@ pl_delete_selected (void) { } void +pl_crop_selected (void) { + playItem_t *next = NULL; + for (playItem_t *it = playlist_head[PL_MAIN]; it; it = next) { + next = it->next[PL_MAIN]; + if (!it->selected) { + pl_remove (it); + } + } +} + +void pl_set_order (int order) { pl_order = order; } @@ -1153,3 +1169,9 @@ load_fail: return -1; } +void +pl_select_all (void) { + for (playItem_t *it = playlist_head[PL_MAIN]; it; it = it->next[PL_MAIN]) { + it->selected = 1; + } +} |