diff options
-rw-r--r-- | apps/playlist_viewer.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 1d8b1b1b03..61a765ca9e 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -515,12 +515,21 @@ static enum pv_onplay_result show_track_info(const struct playlist_entry *curren | |||
515 | struct mp3entry id3; | 515 | struct mp3entry id3; |
516 | bool id3_retrieval_successful = false; | 516 | bool id3_retrieval_successful = false; |
517 | 517 | ||
518 | int fd = open(current_track->name, O_RDONLY); | 518 | if (!viewer.playlist && |
519 | if (fd >= 0) | 519 | (playlist_get_resume_info(&viewer.current_playing_track) == current_track->index)) |
520 | { | 520 | { |
521 | if (get_metadata(&id3, fd, current_track->name)) | 521 | copy_mp3entry(&id3, audio_current_track()); /* retrieve id3 from RAM */ |
522 | id3_retrieval_successful = true; | 522 | id3_retrieval_successful = true; |
523 | close(fd); | 523 | } |
524 | else | ||
525 | { | ||
526 | int fd = open(current_track->name, O_RDONLY); | ||
527 | if (fd >= 0) | ||
528 | { | ||
529 | if (get_metadata(&id3, fd, current_track->name)) | ||
530 | id3_retrieval_successful = true; | ||
531 | close(fd); | ||
532 | } | ||
524 | } | 533 | } |
525 | 534 | ||
526 | return id3_retrieval_successful && | 535 | return id3_retrieval_successful && |