fix: error handling

This commit is contained in:
aclist committed 2026-11-05 21:26:20 +09:00
1 parent e7cef215c6
commit 895e08d228
1 file changed
+8 -2
+8 -2
View File
@@ -392,13 +392,19 @@ def get_running_app() -> int | None:
def get_last_updated(path: Path, appid: int) -> str | None: def get_last_updated(path: Path, appid: int) -> str | None:
root_path = get_app_path(path, appid) root_path = get_app_path(path, appid)
acf = root_path.joinpath(f"steamapps/appmanifest_{appid}.acf") acf = root_path.joinpath(f"steamapps/appmanifest_{appid}.acf")
return ACF(acf).get_last_updated() try:
return ACF(acf).get_last_updated()
except Exception as e:
logger.critical(e)
def get_last_played(path: Path, appid: int) -> str | None: def get_last_played(path: Path, appid: int) -> str | None:
root_path = get_app_path(path, appid) root_path = get_app_path(path, appid)
acf = root_path.joinpath(f"steamapps/appmanifest_{appid}.acf") acf = root_path.joinpath(f"steamapps/appmanifest_{appid}.acf")
return ACF(acf).get_last_played() try:
return ACF(acf).get_last_played()
except Exception as e:
logger.critical(e)
def get_app_allows_downloads(path: Path, appid: int) -> bool: def get_app_allows_downloads(path: Path, appid: int) -> bool: