🎨 Made OnlineCoverManager more general

- Does compositing of image with a blurred background
- Stretches the original image if it's not too much
- Handles images that are too wide and images that are too tall
- Removed ItchCoverManager
This commit is contained in:
GeoffreyCoulaud
2023-06-14 00:05:38 +02:00
parent 6dd8e3965f
commit 695cc88d76
5 changed files with 89 additions and 78 deletions

View File

@@ -4,7 +4,7 @@ from requests.exceptions import HTTPError, SSLError
from src.game import Game
from src.store.managers.async_manager import AsyncManager
from src.store.managers.itch_cover_manager import ItchCoverManager
from src.store.managers.online_cover_manager import OnlineCoverManager
from src.store.managers.local_cover_manager import LocalCoverManager
from src.store.managers.steam_api_manager import SteamAPIManager
from src.utils.steamgriddb import SGDBAuthError, SGDBHelper
@@ -13,7 +13,7 @@ from src.utils.steamgriddb import SGDBAuthError, SGDBHelper
class SGDBManager(AsyncManager):
"""Manager in charge of downloading a game's cover from steamgriddb"""
run_after = (SteamAPIManager, LocalCoverManager, ItchCoverManager)
run_after = (SteamAPIManager, LocalCoverManager, OnlineCoverManager)
retryable_on = (HTTPError, SSLError, ConnectionError, JSONDecodeError)
def manager_logic(self, game: Game, _additional_data: dict) -> None: