From 9ed1f848790995bce11218904d1e85307a8571b6 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:13:16 +0200 Subject: [PATCH] Fix animatied covers not updating in time --- src/game_cover.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game_cover.py b/src/game_cover.py index 32a3b25..036a0df 100644 --- a/src/game_cover.py +++ b/src/game_cover.py @@ -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(