Refactory of the code (#19)

* Refactory of the code

* Autoformatting with black

---------

Co-authored-by: Domefemia <domefemia@hotmail.com>
This commit is contained in:
Domenico
2023-03-24 20:26:55 +01:00
committed by GitHub
parent df45ef411a
commit 053d5791a4
11 changed files with 34 additions and 53 deletions

View File

@@ -42,7 +42,7 @@ def save_cover(game, parent_widget, file_path, pixbuf=None, game_id=None):
if not os.path.exists(covers_dir):
os.makedirs(covers_dir)
open_file = Gio.File.new_for_path(os.path.join(covers_dir, game_id + ".tiff"))
open_file = Gio.File.new_for_path(os.path.join(covers_dir, f"{game_id}.tiff"))
parent_widget.pixbufs[game_id] = pixbuf
pixbuf.save_to_streamv_async(
open_file.replace(None, False, Gio.FileCreateFlags.NONE),