diff options
author | Hardeep Sidhu <dyp@pobox.com> | 2006-05-09 14:43:49 +0000 |
---|---|---|
committer | Hardeep Sidhu <dyp@pobox.com> | 2006-05-09 14:43:49 +0000 |
commit | 83d1a5eabe32a18da2afd59e819cedadeb8289d5 (patch) | |
tree | 2be4525d54d8546e11b3b5361c7ff4e65c09d677 /apps/playlist.c | |
parent | 67faac4368246df878a0667c7dd11573b3682b60 (diff) | |
download | rockbox-83d1a5eabe32a18da2afd59e819cedadeb8289d5.tar.gz rockbox-83d1a5eabe32a18da2afd59e819cedadeb8289d5.zip |
Only flush and reload tracks after the playlist has started. Fixes B#5312.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9895 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 7942bac1ca..a63d974a7f 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -785,7 +785,8 @@ static int add_directory_to_playlist(struct playlist_info* playlist, display_playlist_count(*count, count_str); if (*count == PLAYLIST_DISPLAY_COUNT && - (audio_status() & AUDIO_STATUS_PLAY)) + (audio_status() & AUDIO_STATUS_PLAY) && + playlist->started) audio_flush_and_reload_tracks(); } @@ -2796,7 +2797,7 @@ int playlist_insert_track(struct playlist_info* playlist, if (result != -1) { sync_control(playlist, false); - if (audio_status() & AUDIO_STATUS_PLAY) + if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started) audio_flush_and_reload_tracks(); } @@ -2841,7 +2842,7 @@ int playlist_insert_directory(struct playlist_info* playlist, display_playlist_count(count, count_str); - if (audio_status() & AUDIO_STATUS_PLAY) + if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started) audio_flush_and_reload_tracks(); #ifdef HAVE_DIRCACHE @@ -2939,7 +2940,8 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename, display_playlist_count(count, count_str); if (count == PLAYLIST_DISPLAY_COUNT && - (audio_status() & AUDIO_STATUS_PLAY)) + (audio_status() & AUDIO_STATUS_PLAY) && + playlist->started) audio_flush_and_reload_tracks(); } } @@ -2957,7 +2959,7 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename, display_playlist_count(count, count_str); - if (audio_status() & AUDIO_STATUS_PLAY) + if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started) audio_flush_and_reload_tracks(); #ifdef HAVE_DIRCACHE @@ -2989,7 +2991,8 @@ int playlist_delete(struct playlist_info* playlist, int index) result = remove_track_from_playlist(playlist, index, true); - if (result != -1 && (audio_status() & AUDIO_STATUS_PLAY)) + if (result != -1 && (audio_status() & AUDIO_STATUS_PLAY) && + playlist->started) audio_flush_and_reload_tracks(); return result; @@ -3077,7 +3080,7 @@ int playlist_move(struct playlist_info* playlist, int index, int new_index) } } - if (audio_status() & AUDIO_STATUS_PLAY) + if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started) audio_flush_and_reload_tracks(); } } @@ -3102,7 +3105,8 @@ int playlist_randomise(struct playlist_info* playlist, unsigned int seed, result = randomise_playlist(playlist, seed, start_current, true); - if (result != -1 && (audio_status() & AUDIO_STATUS_PLAY)) + if (result != -1 && (audio_status() & AUDIO_STATUS_PLAY) && + playlist->started) audio_flush_and_reload_tracks(); return result; @@ -3120,7 +3124,8 @@ int playlist_sort(struct playlist_info* playlist, bool start_current) result = sort_playlist(playlist, start_current, true); - if (result != -1 && (audio_status() & AUDIO_STATUS_PLAY)) + if (result != -1 && (audio_status() & AUDIO_STATUS_PLAY) && + playlist->started) audio_flush_and_reload_tracks(); return result; |