Make sure same cover isn't loaded twice
This commit is contained in:
@@ -188,6 +188,9 @@ void PlayingWidget::SetVisible(bool visible) {
|
|||||||
timeline_show_hide_->toggleDirection();
|
timeline_show_hide_->toggleDirection();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
timeline_show_hide_->stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (visible != visible_) {
|
if (visible != visible_) {
|
||||||
@@ -268,6 +271,7 @@ void PlayingWidget::Stopped() {
|
|||||||
active_ = false;
|
active_ = false;
|
||||||
song_playing_ = Song();
|
song_playing_ = Song();
|
||||||
song_ = Song();
|
song_ = Song();
|
||||||
|
image_original_ = QImage();
|
||||||
SetVisible(false);
|
SetVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -290,7 +294,7 @@ void PlayingWidget::SongChanged(const Song &song) {
|
|||||||
|
|
||||||
void PlayingWidget::AlbumCoverLoaded(const Song &song, const QImage &image) {
|
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;
|
active_ = true;
|
||||||
downloading_covers_ = false;
|
downloading_covers_ = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user