mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🐛 Fix file not found
This commit is contained in:
@@ -31,17 +31,25 @@ def main() -> None:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception(f"Failed to build {app} because of {e}")
|
logger.exception(f"Failed to build {app} because of {e}")
|
||||||
if config.build_og_nd_branding_youtube:
|
if config.build_og_nd_branding_youtube:
|
||||||
|
logger.info("Rebuilding youtube")
|
||||||
all_patches = parser.get_all_patches()
|
all_patches = parser.get_all_patches()
|
||||||
branding_patch = "custom-branding"
|
branding_patch = "custom-branding"
|
||||||
if config.build_extended:
|
if config.build_extended:
|
||||||
branding_patch = "custom-branding-blue"
|
branding_patch = "custom-branding-blue"
|
||||||
branding_index = all_patches.index(branding_patch)
|
branding_index = all_patches.index(branding_patch)
|
||||||
was_og_build = True if all_patches[branding_index - 1] == "-e" else False
|
was_og_build = True if all_patches[branding_index - 1] == "-e" else False
|
||||||
app = "youtube-custom-icon" if was_og_build else "youtube"
|
output = "-custom-icon-" if was_og_build else ""
|
||||||
_, version, is_experimental = patcher.get_app_configs("youtube")
|
app = "youtube"
|
||||||
|
_, version, is_experimental = patcher.get_app_configs(app)
|
||||||
|
logger.info(parser.get_all_patches())
|
||||||
parser.invert_patch(branding_patch)
|
parser.invert_patch(branding_patch)
|
||||||
parser.patch_app(app=app, version=version, is_experimental=is_experimental)
|
logger.info(parser.get_all_patches())
|
||||||
logger.info(parser.get_all_patches())
|
parser.patch_app(
|
||||||
|
app=app,
|
||||||
|
version=version,
|
||||||
|
is_experimental=is_experimental,
|
||||||
|
output_prefix=output,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
+10
-2
@@ -59,12 +59,20 @@ class Parser(object):
|
|||||||
else:
|
else:
|
||||||
self._PATCHES[patch_index - 1] = "-e"
|
self._PATCHES[patch_index - 1] = "-e"
|
||||||
|
|
||||||
def patch_app(self, app: str, version: str, is_experimental: bool = False) -> None:
|
# noinspection IncorrectFormatting
|
||||||
|
def patch_app(
|
||||||
|
self,
|
||||||
|
app: str,
|
||||||
|
version: str,
|
||||||
|
is_experimental: bool = False,
|
||||||
|
output_prefix: str = "-",
|
||||||
|
) -> None:
|
||||||
"""Revanced APP Patcher.
|
"""Revanced APP Patcher.
|
||||||
|
|
||||||
:param app: Name of the app
|
:param app: Name of the app
|
||||||
:param version: Version of the application
|
:param version: Version of the application
|
||||||
:param is_experimental: Whether to enable experimental support
|
:param is_experimental: Whether to enable experimental support
|
||||||
|
:param output_prefix: Prefix to add to the output apks file name
|
||||||
"""
|
"""
|
||||||
logger.debug(f"Sending request to revanced cli for building {app} revanced")
|
logger.debug(f"Sending request to revanced cli for building {app} revanced")
|
||||||
cli = self.config.normal_cli_jar
|
cli = self.config.normal_cli_jar
|
||||||
@@ -84,7 +92,7 @@ class Parser(object):
|
|||||||
"-m",
|
"-m",
|
||||||
integrations,
|
integrations,
|
||||||
"-o",
|
"-o",
|
||||||
f"Re-{app}-{version}-output.apk",
|
f"Re-{app}-{version}{output_prefix}output.apk",
|
||||||
"--keystore",
|
"--keystore",
|
||||||
self.config.keystore_name,
|
self.config.keystore_name,
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user