Ability to download the specific version from uptodown

This commit is contained in:
Nikhil Badyal
2023-07-01 15:49:51 +05:30
parent c3acab826b
commit a727a32bed
4 changed files with 42 additions and 11 deletions
+3 -7
View File
@@ -148,14 +148,10 @@ class Patches(object):
if not (app_name := app_names.get(app)):
raise AppNotFound(app)
patches = getattr(self, app_name)
version = ""
version = "latest"
try:
if app in ("youtube", "youtube_music"):
version = next(i["version"] for i in patches if i["version"] != "all")
logger.debug(f"Recommended Version for patching {app} is {version}")
else:
logger.debug("No recommended version.")
# No recommended version available
version = next(i["version"] for i in patches if i["version"] != "all")
logger.debug(f"Recommended Version for patching {app} is {version}")
except StopIteration:
pass
return patches, version