Make sure same cover isn't loaded twice

This commit is contained in:
Jonas Kvinge 2020-09-29 17:51:31 +02:00
parent e390f3a399
commit 4614cb5ec1
1 changed files with 5 additions and 1 deletions

View File

@ -188,6 +188,9 @@ void PlayingWidget::SetVisible(bool visible) {
timeline_show_hide_->toggleDirection();
return;
}
else {
timeline_show_hide_->stop();
}
}
if (visible != visible_) {
@ -268,6 +271,7 @@ void PlayingWidget::Stopped() {
active_ = false;
song_playing_ = Song();
song_ = Song();
image_original_ = QImage();
SetVisible(false);
}
@ -290,7 +294,7 @@ void PlayingWidget::SongChanged(const Song &song) {
void PlayingWidget::AlbumCoverLoaded(const Song &song, const QImage &image) {
if (!playing_ || song != song_playing_ || (timeline_fade_->state() == QTimeLine::Running && image == image_original_)) return;
if (!playing_ || song != song_playing_ || image == image_original_) return;
active_ = true;
downloading_covers_ = false;