diff --git a/README.md b/README.md index 1455504..a22ba2a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Cartridges is a simple game launcher written in Python using GTK4 and Libadwaita - Bottles - itch - Legendary + - RetroArch - Flatpak - Hiding games - Searching and sorting by title, date added and last played diff --git a/src/importer/sources/heroic_source.py b/src/importer/sources/heroic_source.py index f31bbe7..6b8002b 100644 --- a/src/importer/sources/heroic_source.py +++ b/src/importer/sources/heroic_source.py @@ -115,8 +115,8 @@ class SubSourceIterable(Iterable): } game = Game(values) - # Get the image path from the heroic cache - # Filenames are derived from the URL that heroic used to get the file + # Get the image path from the Heroic cache + # Filenames are derived from the URL that Heroic used to get the file uri: str = entry["art_square"] + self.image_uri_params digest = sha256(uri.encode()).hexdigest() image_path = self.source.locations.config.root / "images-cache" / digest @@ -221,13 +221,10 @@ class LegendaryIterable(StoreSubSourceIterable): @cached_property def installed_path(self) -> Path: - """ - Get the right path depending on the Heroic version - - TODO after heroic 2.9 has been out for a while - We should use the commented out relative_installed_path - and remove this property override. - """ + """Get the right path depending on the Heroic version""" + # TODO after Heroic 2.9 has been out for a while + # We should use the commented out relative_installed_path + # and remove this property override. heroic_config_path = self.source.locations.config.root # Heroic >= 2.9 diff --git a/src/importer/sources/retroarch_source.py b/src/importer/sources/retroarch_source.py index 7e6beea..93b6065 100644 --- a/src/importer/sources/retroarch_source.py +++ b/src/importer/sources/retroarch_source.py @@ -176,7 +176,7 @@ class RetroarchSource(Source): invalid_subtitle=Location.CONFIG_INVALID_SUBTITLE, ) ) - # TODO enable when we get the Steam RetroArch games work + # TODO enable when we get the Steam RetroArch games working # self.add_steam_location_candidate() def add_steam_location_candidate(self) -> None: @@ -192,13 +192,13 @@ class RetroarchSource(Source): """ Get the RetroArch installed via Steam location - :raise UnresolvableLocationError: if steam isn't installed + :raise UnresolvableLocationError: if Steam isn't installed :raise KeyError: if there is no libraryfolders.vdf subpath :raise OSError: if libraryfolders.vdf can't be opened :raise ValueError: if RetroArch isn't installed through Steam """ - # Find steam location + # Find Steam location libraryfolders = SteamSource().locations.data["libraryfolders.vdf"] parse_apps = False with open(libraryfolders, "r", encoding="utf-8") as open_file: diff --git a/src/importer/sources/steam_source.py b/src/importer/sources/steam_source.py index 90460bd..75b8f69 100644 --- a/src/importer/sources/steam_source.py +++ b/src/importer/sources/steam_source.py @@ -35,7 +35,7 @@ class SteamSourceIterable(SourceIterable): source: "SteamSource" def get_manifest_dirs(self) -> Iterable[Path]: - """Get dirs that contain steam app manifests""" + """Get dirs that contain Steam app manifests""" libraryfolders_path = self.source.locations.data["libraryfolders.vdf"] with open(libraryfolders_path, "r", encoding="utf-8") as file: contents = file.read() diff --git a/src/store/managers/sgdb_manager.py b/src/store/managers/sgdb_manager.py index 5c002cb..4cba471 100644 --- a/src/store/managers/sgdb_manager.py +++ b/src/store/managers/sgdb_manager.py @@ -24,13 +24,13 @@ from requests.exceptions import HTTPError, SSLError from src.errors.friendly_error import FriendlyError from src.game import Game from src.store.managers.async_manager import AsyncManager -from src.store.managers.steam_api_manager import SteamAPIManager from src.store.managers.cover_manager import CoverManager +from src.store.managers.steam_api_manager import SteamAPIManager from src.utils.steamgriddb import SGDBAuthError, SGDBHelper class SGDBManager(AsyncManager): - """Manager in charge of downloading a game's cover from steamgriddb""" + """Manager in charge of downloading a game's cover from SteamGridDB""" run_after = (SteamAPIManager, CoverManager) retryable_on = (HTTPError, SSLError, ConnectionError, JSONDecodeError) diff --git a/src/store/managers/steam_api_manager.py b/src/store/managers/steam_api_manager.py index 1a62ddd..2dc88d5 100644 --- a/src/store/managers/steam_api_manager.py +++ b/src/store/managers/steam_api_manager.py @@ -23,8 +23,8 @@ from urllib3.exceptions import ConnectionError as Urllib3ConnectionError from src.game import Game from src.store.managers.async_manager import AsyncManager from src.utils.steam import ( - SteamGameNotFoundError, SteamAPIHelper, + SteamGameNotFoundError, SteamNotAGameError, SteamRateLimiter, ) @@ -44,7 +44,7 @@ class SteamAPIManager(AsyncManager): self.steam_api_helper = SteamAPIHelper(self.steam_rate_limiter) def main(self, game: Game, additional_data: dict) -> None: - # Skip non-steam games + # Skip non-Steam games appid = additional_data.get("steam_appid", None) if appid is None: return diff --git a/src/utils/steam.py b/src/utils/steam.py index bdc8d84..6e53f27 100644 --- a/src/utils/steam.py +++ b/src/utils/steam.py @@ -91,7 +91,7 @@ class SteamRateLimiter(RateLimiter): class SteamFileHelper: - """Helper for steam file formats""" + """Helper for Steam file formats""" def get_manifest_data(self, manifest_path: Path) -> SteamManifestData: """Get local data for a game from its manifest"""