playlist viewer: fix track info for first track of a stopped current playlist

A playlist that hasn't finished and is resumed without starting
playback has its index set to 0 by empty_playlist_unlocked.
So ignore the index for stopped playlists.

Change-Id: I575ceacbcd2369eaa3ae4e47de7b2f7e999248f5
This commit is contained in:
Christian Soffke 2024-04-16 22:56:43 +02:00
parent b06073f771
commit 9af812c320

View file

@ -516,6 +516,7 @@ static enum pv_onplay_result show_track_info(const struct playlist_entry *curren
bool id3_retrieval_successful = false; bool id3_retrieval_successful = false;
if (!viewer.playlist && if (!viewer.playlist &&
(audio_status() & AUDIO_STATUS_PLAY) &&
(playlist_get_resume_info(&viewer.current_playing_track) == current_track->index)) (playlist_get_resume_info(&viewer.current_playing_track) == current_track->index))
{ {
copy_mp3entry(&id3, audio_current_track()); /* retrieve id3 from RAM */ copy_mp3entry(&id3, audio_current_track()); /* retrieve id3 from RAM */