summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/playlist.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 47bf6a9c88..93293d75ed 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -566,8 +566,7 @@ static int add_track_to_playlist(struct playlist_info* playlist,
566 switch (position) 566 switch (position)
567 { 567 {
568 case PLAYLIST_PREPEND: 568 case PLAYLIST_PREPEND:
569 insert_position = playlist->first_index; 569 position = insert_position = playlist->first_index;
570 flags = PLAYLIST_INSERT_TYPE_PREPEND;
571 break; 570 break;
572 case PLAYLIST_INSERT: 571 case PLAYLIST_INSERT:
573 /* if there are already inserted tracks then add track to end of 572 /* if there are already inserted tracks then add track to end of
@@ -595,11 +594,9 @@ static int add_track_to_playlist(struct playlist_info* playlist,
595 break; 594 break;
596 case PLAYLIST_INSERT_LAST: 595 case PLAYLIST_INSERT_LAST:
597 if (playlist->first_index > 0) 596 if (playlist->first_index > 0)
598 insert_position = playlist->first_index; 597 position = insert_position = playlist->first_index;
599 else 598 else
600 insert_position = playlist->amount; 599 position = insert_position = playlist->amount;
601
602 flags = PLAYLIST_INSERT_TYPE_APPEND;
603 break; 600 break;
604 case PLAYLIST_INSERT_SHUFFLED: 601 case PLAYLIST_INSERT_SHUFFLED:
605 { 602 {