diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/onplay.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 7ad22d5d70..88961a459e 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -173,11 +173,12 @@ static bool add_to_playlist(int position, bool queue) | |||
173 | playlist_create(NULL, NULL); | 173 | playlist_create(NULL, NULL); |
174 | 174 | ||
175 | /* always set seed before inserting shuffled */ | 175 | /* always set seed before inserting shuffled */ |
176 | if (position == PLAYLIST_INSERT_SHUFFLED || position == PLAYLIST_INSERT_LAST_SHUFFLED) | 176 | if (position == PLAYLIST_INSERT_SHUFFLED || |
177 | position == PLAYLIST_INSERT_LAST_SHUFFLED) | ||
177 | { | 178 | { |
178 | srand(current_tick); | 179 | srand(current_tick); |
179 | if (position == PLAYLIST_INSERT_LAST_SHUFFLED) | 180 | if (position == PLAYLIST_INSERT_LAST_SHUFFLED) |
180 | playlist_set_last_shuffled_start(); | 181 | playlist_set_last_shuffled_start(); |
181 | } | 182 | } |
182 | 183 | ||
183 | #ifdef HAVE_TAGCACHE | 184 | #ifdef HAVE_TAGCACHE |
@@ -439,7 +440,6 @@ static int treeplaylist_callback(int action, | |||
439 | } | 440 | } |
440 | else if (this_item == &i_shuf_pl_item) | 441 | else if (this_item == &i_shuf_pl_item) |
441 | { | 442 | { |
442 | |||
443 | if (audio_status() & AUDIO_STATUS_PLAY) | 443 | if (audio_status() & AUDIO_STATUS_PLAY) |
444 | { | 444 | { |
445 | return action; | 445 | return action; |
@@ -453,14 +453,18 @@ static int treeplaylist_callback(int action, | |||
453 | } | 453 | } |
454 | return ACTION_EXIT_MENUITEM; | 454 | return ACTION_EXIT_MENUITEM; |
455 | } | 455 | } |
456 | else if (this_item == &i_last_shuf_pl_item || this_item == &q_last_shuf_pl_item) | 456 | else if (this_item == &i_last_shuf_pl_item || |
457 | this_item == &q_last_shuf_pl_item) | ||
457 | { | 458 | { |
458 | if ((playlist_amount() > 0) && (audio_status() & AUDIO_STATUS_PLAY) && (selected_file_attr & ATTR_DIRECTORY)) | 459 | if ((playlist_amount() > 0) && |
459 | { | 460 | (audio_status() & AUDIO_STATUS_PLAY) && |
460 | return action; | 461 | ((selected_file_attr & ATTR_DIRECTORY) || |
461 | } | 462 | ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U))) |
462 | else | 463 | { |
463 | return ACTION_EXIT_MENUITEM; | 464 | return action; |
465 | } | ||
466 | else | ||
467 | return ACTION_EXIT_MENUITEM; | ||
464 | } | 468 | } |
465 | break; | 469 | break; |
466 | } | 470 | } |