Managers refactor (#164)

The main reason for this is the compositing of both local and online covers with the same logic.  
It was a problem raised in #146 with some covers getting stretched.

Changes:
- Renamed and simplified managers methods
- Created a generic `cover manager`
- Added more retryable errors to `steam api manager`
- Removed `local cover manager` and `online cover manager`
- Reduced dependency on `PIL`
This commit is contained in:
Geoffrey Coulaud
2023-07-31 18:44:18 +02:00
committed by GitHub
parent e4dc1253ae
commit 1aff1347e3
12 changed files with 215 additions and 220 deletions

View File

@@ -103,11 +103,11 @@ class SGDBHelper:
image_trunk = shared.covers_dir / game.game_id
still = image_trunk.with_suffix(".tiff")
uri_kwargs = image_trunk.with_suffix(".gif")
animated = image_trunk.with_suffix(".gif")
prefer_sgdb = shared.schema.get_boolean("sgdb-prefer")
# Do nothing if file present and not prefer SGDB
if not prefer_sgdb and (still.is_file() or uri_kwargs.is_file()):
if not prefer_sgdb and (still.is_file() or animated.is_file()):
return
# Get ID for the game