better cover art loading

This commit is contained in:
Erica Z 2024-10-20 12:05:48 +02:00
parent f97b8ab17c
commit 0fd5298a31

View file

@ -67,7 +67,7 @@ class Ui.Window : Adw.ApplicationWindow {
}
this.cancel_loading_art = new GLib.Cancellable ();
if (this.song != null) {
this.playing_cover_art = null; // TODO: preload next art somehow
this.cover_art_loading = true;
string song_id = this.song.id;
@ -82,11 +82,10 @@ class Ui.Window : Adw.ApplicationWindow {
}
}
});
}
});
this.playbin.stopped.connect (() => {
this.playing_cover_art = Gdk.Paintable.empty (1, 1);
this.playing_cover_art = null;
this.song = null;
});