diff options
| author | Ryan Jackson <rdjackso@rockbox.org> | 2005-10-07 22:55:30 +0000 |
|---|---|---|
| committer | Ryan Jackson <rdjackso@rockbox.org> | 2005-10-07 22:55:30 +0000 |
| commit | 7d0b7e9378fe7ee11fa9b8643851616972a8d83f (patch) | |
| tree | a4bb0fe5233cf6b4f2a5bd12f56bf377f42ba698 | |
| parent | f23ab031a1206d965a38d5051f723d95087d78ea (diff) | |
| download | rockbox-7d0b7e9378fe7ee11fa9b8643851616972a8d83f.zip rockbox-7d0b7e9378fe7ee11fa9b8643851616972a8d83f.tar.gz rockbox-7d0b7e9378fe7ee11fa9b8643851616972a8d83f.tar.bz2 rockbox-7d0b7e9378fe7ee11fa9b8643851616972a8d83f.tar.xz | |
Temporary trivial workaround for empty/invalid playlists
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7595 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/playback.c | 12 |
1 files changed, 11 insertions, 1 deletions
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: |