Custom Patches json dl support

This commit is contained in:
Nikhil Badyal
2023-08-06 20:24:16 +05:30
parent 03da0d218e
commit d2f0a7baee
3 changed files with 13 additions and 2 deletions
+4 -1
View File
@@ -25,6 +25,9 @@ class APP(object):
self.integrations_dl = config.env.str(
f"{app_name}_INTEGRATION_DL".upper(), config.global_integrations_dl
)
self.patches_json_dl = config.env.str(
f"{app_name}_PATCHES_JSON_DL".upper(), config.global_patches_json_dl
)
self.exclude_request = config.env.list(f"{app_name}_EXCLUDE_PATCH".upper(), [])
self.include_request = config.env.list(f"{app_name}_INCLUDE_PATCH".upper(), [])
self.resource: Dict[str, str] = {}
@@ -73,7 +76,7 @@ class APP(object):
("cli", self.cli_dl, config, ".*jar"),
("integrations", self.integrations_dl, config, ".*apk"),
("patches", self.patches_dl, config, ".*jar"),
("patches_json", self.patches_dl, config, ".*json"),
("patches_json", self.patches_json_dl, config, ".*json"),
]
# Using a ThreadPoolExecutor for parallelism
+4
View File
@@ -9,6 +9,7 @@ from src.utils import default_build
default_cli = "https://github.com/revanced/revanced-cli/releases/latest"
default_patches = "https://github.com/revanced/revanced-patches/releases/latest"
default_patches_json = default_patches
default_integrations = (
"https://github.com/revanced/revanced-integrations/releases/latest"
)
@@ -77,6 +78,9 @@ class RevancedConfig(object):
self.dry_run = env.bool("DRY_RUN", False)
self.global_cli_dl = env.str("GLOBAL_CLI_DL", default_cli)
self.global_patches_dl = env.str("GLOBAL_PATCHES_DL", default_patches)
self.global_patches_json_dl = env.str(
"GLOBAL_PATCHES_JSON_DL", default_patches_json
)
self.global_integrations_dl = env.str(
"GLOBAL_INTEGRATIONS_DL", default_integrations
)