🐛 Failing to fetch latest release

This commit is contained in:
Nikhil Badyal
2023-08-05 21:46:19 +05:30
parent 2680881e20
commit f37815fdf9
2 changed files with 9 additions and 4 deletions
+4 -4
View File
@@ -51,7 +51,7 @@ class APP(object):
return ", ".join("%s: %s" % item for item in attrs.items()) return ", ".join("%s: %s" % item for item in attrs.items())
@staticmethod @staticmethod
def download(url: str, config: RevancedConfig, assets_filter: str = None) -> str: # type: ignore def download(url: str, config: RevancedConfig, assets_filter: str) -> str:
"""Downloader.""" """Downloader."""
from src.downloader.download import Downloader from src.downloader.download import Downloader
@@ -70,14 +70,14 @@ class APP(object):
logger.info("Downloading resources for patching.") logger.info("Downloading resources for patching.")
# Create a list of resource download tasks # Create a list of resource download tasks
download_tasks = [ download_tasks = [
("cli", self.cli_dl, config), ("cli", self.cli_dl, config, ".*jar"),
("integrations", self.integrations_dl, config), ("integrations", self.integrations_dl, config, ".*apk"),
("patches", self.patches_dl, config, ".*jar"), ("patches", self.patches_dl, config, ".*jar"),
("patches_json", self.patches_dl, config, ".*json"), ("patches_json", self.patches_dl, config, ".*json"),
] ]
# Using a ThreadPoolExecutor for parallelism # Using a ThreadPoolExecutor for parallelism
with ThreadPoolExecutor() as executor: with ThreadPoolExecutor(4) as executor:
futures = { futures = {
resource_name: executor.submit(self.download, *args) resource_name: executor.submit(self.download, *args)
for resource_name, *args in download_tasks for resource_name, *args in download_tasks
+5
View File
@@ -58,6 +58,11 @@ class Patches(object):
key: (value, "_" + value) for key, value in _revanced_app_ids.items() key: (value, "_" + value) for key, value in _revanced_app_ids.items()
} }
@staticmethod
def support_app() -> Dict[str, str]:
"""Return supported apps."""
return Patches._revanced_app_ids
def scrap_patches(self, file_name: str) -> Any: def scrap_patches(self, file_name: str) -> Any:
"""Scrap Patches.""" """Scrap Patches."""
if os.path.exists(file_name): if os.path.exists(file_name):