mirror of
https://github.com/aclist/dztui.git
synced 2026-10-29 22:22:52 +01:00
chore: drop legacy functions
This commit is contained in:
1 parent
f4aa6c749e
commit
e8d991ccb5
5 files changed
+14
-113
No files matched your search
@@ -405,32 +405,6 @@ def get_pefile_path(steam_path: Path, appid: int) -> Path:
|
||||
return pe_path
|
||||
|
||||
|
||||
# TODO: move to dzgui.api.steam
|
||||
def _get_app_path(folders_path: Path, appid: int) -> Path:
|
||||
app_path = None
|
||||
|
||||
try:
|
||||
j = json.loads(vdf2json(folders_path))
|
||||
except Exception:
|
||||
raise VDFLoadError("Failed to parse libraryfolders")
|
||||
|
||||
for obj in j["libraryfolders"]:
|
||||
if str(appid) in j["libraryfolders"][obj]["apps"]:
|
||||
app_path = j["libraryfolders"][obj]["path"]
|
||||
if Path(app_path).exists():
|
||||
break
|
||||
|
||||
if app_path is None:
|
||||
raise AppNotInstalledError(
|
||||
f"Failed to find a libraryfolder for the appid {appid}"
|
||||
)
|
||||
if Path(app_path).exists() is False:
|
||||
raise AppMovedError(
|
||||
f"The location '{app_path}' pointed to by '{appid}' no longer exists and may have been changed on the disk."
|
||||
)
|
||||
|
||||
return Path(app_path)
|
||||
|
||||
|
||||
def get_pretty_version(steam_path: Path, appid: int) -> str | None:
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user