summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-01-21 07:28:37 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-01-21 07:28:37 +0000
commitd0729abb9667feacddd5a6e413728090f5353c41 (patch)
tree1dd121b0a72cc1937212c33c7192ca1a3a6ff329
parentf18b9d9d780ad9b49719c7663dc5a2b23c86b87e (diff)
downloadrockbox-d0729abb9667feacddd5a6e413728090f5353c41.tar.gz
rockbox-d0729abb9667feacddd5a6e413728090f5353c41.zip
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
-rw-r--r--apps/playlist.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 133820ebc4..fd34cbe0cf 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -783,15 +783,16 @@ static int add_track_to_playlist(struct playlist_info* playlist,
783 } 783 }
784 784
785 /* update stored indices if needed */ 785 /* update stored indices if needed */
786 if (playlist->amount > 0 && insert_position <= playlist->index &&
787 playlist->started)
788 playlist->index++;
789 786
790 if (playlist->amount > 0 && insert_position <= playlist->first_index && 787 if (orig_position < 0)
791 orig_position != PLAYLIST_PREPEND && playlist->started)
792 { 788 {
793 playlist->first_index++; 789 if (playlist->amount > 0 && insert_position <= playlist->index &&
790 playlist->started)
791 playlist->index++;
794 792
793 if (playlist->amount > 0 && insert_position <= playlist->first_index &&
794 orig_position != PLAYLIST_PREPEND && playlist->started)
795 playlist->first_index++;
795 } 796 }
796 797
797 if (insert_position < playlist->last_insert_pos || 798 if (insert_position < playlist->last_insert_pos ||