Fix animatied covers not updating in time

This commit is contained in:
kramo
2023-07-05 14:13:16 +02:00
parent 253bef9507
commit 9ed1f84879

View File

@@ -61,8 +61,8 @@ class GameCover:
if path:
if path.suffix == ".gif":
task = Gio.Task.new()
task.run_in_thread(self.create_func(self.path))
self.task = Gio.Task.new()
self.task.run_in_thread(self.create_func(self.path))
else:
self.texture = Gdk.Texture.new_from_filename(str(path))
@@ -108,6 +108,8 @@ class GameCover:
self.pictures.add(picture)
if not self.animation:
self.set_texture(self.texture)
else:
self.update_animation((self.task, self.animation))
def set_texture(self, texture):
self.pictures.discard(