diff options
author | waker <wakeroid@gmail.com> | 2011-01-24 21:59:40 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-01-24 21:59:40 +0100 |
commit | 7f874f0e16d9b527869a0695fbaa6d78482c73d0 (patch) | |
tree | 56abe6385c3c097cd76e903a2c5800e2abdcb008 | |
parent | 35e543c8f7ed33c40d2c7b241c1eb20cc7524092 (diff) |
deleting current playlist now attempts to select next playlist, before selecting previous
-rw-r--r-- | playlist.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -409,12 +409,18 @@ plt_remove (int plt) { prev->next = p->next; } } + playlist_t *next = p->next; playlist_t *old = playlist; playlist = p; pl_clear (); playlist = old; if (p == playlist) { - playlist = prev ? prev : playlists_head; + if (next) { + playlist = next; + } + else { + playlist = prev ? prev : playlists_head; + } } free (p->title); free (p); |