Fix animatied covers not updating in time
This commit is contained in:
@@ -61,8 +61,8 @@ class GameCover:
|
|||||||
|
|
||||||
if path:
|
if path:
|
||||||
if path.suffix == ".gif":
|
if path.suffix == ".gif":
|
||||||
task = Gio.Task.new()
|
self.task = Gio.Task.new()
|
||||||
task.run_in_thread(self.create_func(self.path))
|
self.task.run_in_thread(self.create_func(self.path))
|
||||||
else:
|
else:
|
||||||
self.texture = Gdk.Texture.new_from_filename(str(path))
|
self.texture = Gdk.Texture.new_from_filename(str(path))
|
||||||
|
|
||||||
@@ -108,6 +108,8 @@ class GameCover:
|
|||||||
self.pictures.add(picture)
|
self.pictures.add(picture)
|
||||||
if not self.animation:
|
if not self.animation:
|
||||||
self.set_texture(self.texture)
|
self.set_texture(self.texture)
|
||||||
|
else:
|
||||||
|
self.update_animation((self.task, self.animation))
|
||||||
|
|
||||||
def set_texture(self, texture):
|
def set_texture(self, texture):
|
||||||
self.pictures.discard(
|
self.pictures.discard(
|
||||||
|
|||||||
Reference in New Issue
Block a user