Skip to content

Commit

Permalink
ignore .asc github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeloni-away committed Mar 3, 2024
1 parent 57dbedb commit 565e397
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions revanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def files_still_there():
f"https://api.github.com/repos/{fallback_repo}/revanced-patches/releases/latest"
)

patches_json, dl_url, patches_version, dl_url1 = get_github_download_links(
file_url, fallback_url, fallback_url1
)
temp = get_github_download_links(file_url, fallback_url, fallback_url1)
temp = list(filter(lambda x: ".asc" not in x, temp))
patches_json, dl_url, patches_version, dl_url1 = temp
if patches_version in localfiles:
print("patches.jar is up-to-date")
else:
Expand All @@ -125,9 +125,9 @@ def files_still_there():
)
fallback_url1 = f"https://api.github.com/repos/{fallback_repo}/revanced-integrations/releases/latest"

integrations_version, dl_url = get_github_download_links(
file_url, fallback_url, fallback_url1
)
temp = get_github_download_links(file_url, fallback_url, fallback_url1)
temp = list(filter(lambda x: ".asc" not in x, temp))
integrations_version, dl_url = temp
if integrations_version in localfiles:
print("integrations.apk is up-to-date")
else:
Expand Down Expand Up @@ -415,8 +415,8 @@ def apkpure():
print(
f"Warning: Local app ({localversion[0]}) differs from current one ({package_name})"
)
fn = (
lambda x: f"Download {package_name}"
fn = lambda x: (
f"Download {package_name}"
if x
else "Patch anyways (only universal patches will apply, if any, and buld name will be wrong)"
)
Expand Down Expand Up @@ -704,8 +704,8 @@ def main():
)

print('"(-)" prefix means not used by default')
filter_function = (
lambda x: f'{x["name"]} - {x["description"]}'
filter_function = lambda x: (
f'{x["name"]} - {x["description"]}'
if x["use"]
else f'(-) {x["name"]} - {x["description"]}'
)
Expand Down Expand Up @@ -790,9 +790,11 @@ def main():

# quotes around patch names that contain spaces
printable_command = [
f'{item.split("=")[0]}="{item.split("=")[1]}"'
if " " in item and "=" in item and item.startswith("--")
else item
(
f'{item.split("=")[0]}="{item.split("=")[1]}"'
if " " in item and "=" in item and item.startswith("--")
else item
)
for item in base_command
]
# for user-provided apks that have spaces
Expand Down

0 comments on commit 565e397

Please sign in to comment.