summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 729fe40f0a..4ffa6deece 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -504,8 +504,8 @@ static int add_to_playlist(void* arg)
504{ 504{
505 struct add_to_pl_param* param = arg; 505 struct add_to_pl_param* param = arg;
506 int position = param->position; 506 int position = param->position;
507 bool new_playlist = param->replace ? true : false; 507 bool new_playlist = !!param->replace;
508 bool queue = param->queue ? true : false; 508 bool queue = !!param->queue;
509 509
510 /* warn if replacing the playlist */ 510 /* warn if replacing the playlist */
511 if (new_playlist && !warn_on_pl_erase()) 511 if (new_playlist && !warn_on_pl_erase())
@@ -519,6 +519,15 @@ static int add_to_playlist(void* arg)
519 519
520 splash(0, ID2P(LANG_WAIT)); 520 splash(0, ID2P(LANG_WAIT));
521 521
522 if (new_playlist && global_settings.keep_current_track_on_replace_playlist)
523 {
524 if (audio_status() & AUDIO_STATUS_PLAY)
525 {
526 playlist_remove_all_tracks(NULL);
527 new_playlist = false;
528 }
529 }
530
522 if (new_playlist) 531 if (new_playlist)
523 playlist_create(NULL, NULL); 532 playlist_create(NULL, NULL);
524 533