Revert animation support due to performance issues

This commit is contained in:
kramo
2023-04-11 00:58:42 +02:00
parent 9e60aad7f3
commit 3e495283b0
6 changed files with 6 additions and 118 deletions

View File

@@ -18,14 +18,10 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from shutil import copyfile
from gi.repository import GdkPixbuf, Gio
def save_cover(
parent_widget, game_id, cover_path=None, pixbuf=None, animation_path=None
):
def save_cover(parent_widget, game_id, cover_path=None, pixbuf=None):
covers_dir = parent_widget.data_dir / "cartridges" / "covers"
covers_dir.mkdir(parents=True, exist_ok=True)
@@ -42,13 +38,3 @@ def save_cover(
["compression"],
["8"] if parent_widget.schema.get_boolean("high-quality-images") else ["7"],
)
animated_covers_dir = parent_widget.data_dir / "cartridges" / "animated_covers"
(animated_covers_dir / game_id).unlink(missing_ok=True)
if animation_path:
if animation_path == animated_covers_dir / game_id:
return
animated_covers_dir.mkdir(parents=True, exist_ok=True)
with animated_covers_dir / game_id as open_file:
copyfile(animation_path, open_file)