diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-01-21 07:28:37 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-01-21 07:28:37 +0000 |
| commit | d0729abb9667feacddd5a6e413728090f5353c41 (patch) | |
| tree | 1dd121b0a72cc1937212c33c7192ca1a3a6ff329 /apps | |
| parent | f18b9d9d780ad9b49719c7663dc5a2b23c86b87e (diff) | |
| download | rockbox-d0729abb9667feacddd5a6e413728090f5353c41.zip rockbox-d0729abb9667feacddd5a6e413728090f5353c41.tar.gz rockbox-d0729abb9667feacddd5a6e413728090f5353c41.tar.bz2 rockbox-d0729abb9667feacddd5a6e413728090f5353c41.tar.xz | |
fix FS#10288 by Tomasz Kowalczyk. Fixes issues where resuming a "insert shuffled" playlist doesnt recreate the same playlist that was stopped.. (I'm tipsy still... read the task for more info :p )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24303 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playlist.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 133820e..fd34cbe 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -783,15 +783,16 @@ static int add_track_to_playlist(struct playlist_info* playlist, } /* update stored indices if needed */ - if (playlist->amount > 0 && insert_position <= playlist->index && - playlist->started) - playlist->index++; - if (playlist->amount > 0 && insert_position <= playlist->first_index && - orig_position != PLAYLIST_PREPEND && playlist->started) + if (orig_position < 0) { - playlist->first_index++; + if (playlist->amount > 0 && insert_position <= playlist->index && + playlist->started) + playlist->index++; + if (playlist->amount > 0 && insert_position <= playlist->first_index && + orig_position != PLAYLIST_PREPEND && playlist->started) + playlist->first_index++; } if (insert_position < playlist->last_insert_pos || |