mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-07 03:55:21 +00:00
ulwgl_dl_util: format
This commit is contained in:
parent
f666c8f8d0
commit
679cbffc2a
@ -111,9 +111,7 @@ def _fetch_proton(
|
|||||||
"""Download the latest ULWGL-Proton and set it as PROTONPATH."""
|
"""Download the latest ULWGL-Proton and set it as PROTONPATH."""
|
||||||
hash, hash_url = files[0]
|
hash, hash_url = files[0]
|
||||||
proton, proton_url = files[1]
|
proton, proton_url = files[1]
|
||||||
proton_dir: str = proton[
|
proton_dir: str = proton[: proton.find(".tar.gz")] # Proton dir
|
||||||
: proton.find(".tar.gz")
|
|
||||||
] # Proton dir without suffixes/dashes
|
|
||||||
|
|
||||||
# TODO: Parallelize this
|
# TODO: Parallelize this
|
||||||
print(f"Downloading {hash} ...")
|
print(f"Downloading {hash} ...")
|
||||||
@ -169,9 +167,7 @@ def _get_from_steamcompat(
|
|||||||
proton_dir: str = "" # Latest Proton
|
proton_dir: str = "" # Latest Proton
|
||||||
|
|
||||||
if len(files) == 2:
|
if len(files) == 2:
|
||||||
proton_dir: str = files[1][0][
|
proton_dir: str = files[1][0][: files[1][0].find(".tar.gz")] # Proton dir
|
||||||
: files[1][0].find(".tar.gz")
|
|
||||||
] # Proton dir without suffixes/dashes
|
|
||||||
|
|
||||||
for proton in steam_compat.glob("ULWGL-Proton*"):
|
for proton in steam_compat.glob("ULWGL-Proton*"):
|
||||||
print(f"{proton.name} found in: {steam_compat.as_posix()}")
|
print(f"{proton.name} found in: {steam_compat.as_posix()}")
|
||||||
@ -215,9 +211,7 @@ def _get_from_cache(
|
|||||||
break
|
break
|
||||||
|
|
||||||
if path:
|
if path:
|
||||||
proton_dir: str = name[
|
proton_dir: str = name[: name.find(".tar.gz")] # Proton dir
|
||||||
: name.find(".tar.gz")
|
|
||||||
] # Proton dir without suffixes/dashes
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_extract_dir(path, steam_compat)
|
_extract_dir(path, steam_compat)
|
||||||
@ -252,9 +246,7 @@ def _get_latest(
|
|||||||
return None
|
return None
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
tarball: str = files[1][0]
|
tarball: str = files[1][0]
|
||||||
proton_dir: str = tarball[
|
proton_dir: str = tarball[: tarball.find(".tar.gz")] # Proton dir
|
||||||
: tarball.find(".tar.gz")
|
|
||||||
] # Proton dir without suffixes/dashes
|
|
||||||
|
|
||||||
# Exit cleanly
|
# Exit cleanly
|
||||||
# Clean up extracted data and cache to prevent corruption/errors
|
# Clean up extracted data and cache to prevent corruption/errors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user