diff options
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index c64fc229b5..3eb0949cc2 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -855,14 +855,14 @@ static int directory_search_callback(char* filename, void* context) | |||
855 | 855 | ||
856 | if (insert_pos < 0) | 856 | if (insert_pos < 0) |
857 | return -1; | 857 | return -1; |
858 | 858 | ||
859 | (c->count)++; | 859 | (c->count)++; |
860 | 860 | ||
861 | /* Make sure tracks are inserted in correct order if user requests | 861 | /* After first INSERT_FIRST switch to INSERT so that all the |
862 | INSERT_FIRST */ | 862 | rest of the tracks get inserted one after the other */ |
863 | if (c->position == PLAYLIST_INSERT_FIRST || c->position >= 0) | 863 | if (c->position == PLAYLIST_INSERT_FIRST) |
864 | c->position = insert_pos + 1; | 864 | c->position = PLAYLIST_INSERT; |
865 | 865 | ||
866 | if (((c->count)%PLAYLIST_DISPLAY_COUNT) == 0) | 866 | if (((c->count)%PLAYLIST_DISPLAY_COUNT) == 0) |
867 | { | 867 | { |
868 | unsigned char* count_str; | 868 | unsigned char* count_str; |
@@ -3179,7 +3179,7 @@ int playlist_insert_playlist(struct playlist_info* playlist, const char *filenam | |||
3179 | result = -1; | 3179 | result = -1; |
3180 | break; | 3180 | break; |
3181 | } | 3181 | } |
3182 | 3182 | ||
3183 | insert_pos = add_track_to_playlist(playlist, trackname, position, | 3183 | insert_pos = add_track_to_playlist(playlist, trackname, position, |
3184 | queue, -1); | 3184 | queue, -1); |
3185 | 3185 | ||
@@ -3189,13 +3189,13 @@ int playlist_insert_playlist(struct playlist_info* playlist, const char *filenam | |||
3189 | break; | 3189 | break; |
3190 | } | 3190 | } |
3191 | 3191 | ||
3192 | /* Make sure tracks are inserted in correct order if user | 3192 | /* After first INSERT_FIRST switch to INSERT so that all the |
3193 | requests INSERT_FIRST */ | 3193 | rest of the tracks get inserted one after the other */ |
3194 | if (position == PLAYLIST_INSERT_FIRST || position >= 0) | 3194 | if (position == PLAYLIST_INSERT_FIRST) |
3195 | position = insert_pos + 1; | 3195 | position = PLAYLIST_INSERT; |
3196 | 3196 | ||
3197 | count++; | 3197 | count++; |
3198 | 3198 | ||
3199 | if ((count%PLAYLIST_DISPLAY_COUNT) == 0) | 3199 | if ((count%PLAYLIST_DISPLAY_COUNT) == 0) |
3200 | { | 3200 | { |
3201 | display_playlist_count(count, count_str, false); | 3201 | display_playlist_count(count, count_str, false); |