From 7d0b7e9378fe7ee11fa9b8643851616972a8d83f Mon Sep 17 00:00:00 2001 From: Ryan Jackson Date: Fri, 7 Oct 2005 22:55:30 +0000 Subject: Temporary trivial workaround for empty/invalid playlists git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7595 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/playback.c b/apps/playback.c index 4ef497d..6a6461c 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1596,7 +1596,9 @@ bool codec_request_next_track_callback(void) void audio_invalidate_tracks(void) { if (track_count == 0) { - queue_post(&audio_queue, AUDIO_PLAY, 0); + /* This call doesn't seem necessary anymore. Uncomment it + if things break */ + /* queue_post(&audio_queue, AUDIO_PLAY, 0); */ return ; } @@ -1664,7 +1666,15 @@ void audio_thread(void) while (audio_codec_loaded) yield(); audio_play_start((int)ev.data); + playlist_update_resume_info(audio_current_track()); + + /* If there are no tracks in the playlist, then the playlist + was empty or none of the filenames were valid. No point + in playing an empty playlist. */ + if (playlist_amount() == 0) { + audio_stop_playback(); + } break ; case AUDIO_STOP: -- cgit v1.1