Fix cover saving issue

This commit is contained in:
kramo
2023-04-10 20:05:41 +02:00
parent 7b4513913e
commit d136897c8c
4 changed files with 11 additions and 17 deletions

View File

@@ -31,14 +31,10 @@ def save_cover(parent_widget, game_id, cover_path=None, pixbuf=None):
str(cover_path), 400, 600, False
)
def cover_callback(*_unused):
pass
open_file = Gio.File.new_for_path(str(covers_dir / f"{game_id}.tiff"))
pixbuf.save_to_streamv_async(
pixbuf.save_to_streamv(
open_file.replace(None, False, Gio.FileCreateFlags.NONE),
"tiff",
["compression"],
["8"] if parent_widget.schema.get_boolean("high-quality-images") else ["7"],
callback=cover_callback,
)