mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
Merge pull request #66 from nikhilbadyal/alternative-builds
Alternative builds
This commit is contained in:
@@ -30,21 +30,17 @@ def main() -> None:
|
|||||||
parser.patch_app(app=app, version=version, is_experimental=is_experimental)
|
parser.patch_app(app=app, version=version, is_experimental=is_experimental)
|
||||||
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_alternative_youtube:
|
||||||
logger.info("Rebuilding youtube")
|
for alternative_patch in config.alternative_youtube_patches:
|
||||||
all_patches = parser.get_all_patches()
|
logger.info(f"Rebuilding youtube with ${alternative_patch}")
|
||||||
branding_index = all_patches.index(config.branding_patch)
|
_, version, is_experimental = patcher.get_app_configs("youtube")
|
||||||
was_og_build = True if all_patches[branding_index - 1] == "-e" else False
|
parser.invert_patch(alternative_patch)
|
||||||
output = "-custom-icon-" if was_og_build else "-original-icon-"
|
parser.patch_app(
|
||||||
app = "youtube"
|
app="youtube",
|
||||||
_, version, is_experimental = patcher.get_app_configs(app)
|
version=version,
|
||||||
parser.invert_patch(config.branding_patch)
|
is_experimental=is_experimental,
|
||||||
parser.patch_app(
|
output_prefix="-" + alternative_patch + "-",
|
||||||
app=app,
|
)
|
||||||
version=version,
|
|
||||||
is_experimental=is_experimental,
|
|
||||||
output_prefix=output,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
+2
-5
@@ -57,9 +57,6 @@ class RevancedConfig:
|
|||||||
"youtube": f"{self.apk_mirror_urls.get('youtube')}youtube",
|
"youtube": f"{self.apk_mirror_urls.get('youtube')}youtube",
|
||||||
"youtube_music": f"{self.apk_mirror_urls.get('youtube_music')}youtube-music",
|
"youtube_music": f"{self.apk_mirror_urls.get('youtube_music')}youtube-music",
|
||||||
}
|
}
|
||||||
self.build_og_nd_branding_youtube = env.bool("BUILD_OG_BRANDING_YOUTUBE", False)
|
|
||||||
self.branding_patch = env.str(
|
|
||||||
"BRANDING_PATCH",
|
|
||||||
"custom-branding-icon-blue" if self.build_extended else "custom-branding",
|
|
||||||
)
|
|
||||||
self.archs_to_build = env.list("ARCHS_TO_BUILD", [])
|
self.archs_to_build = env.list("ARCHS_TO_BUILD", [])
|
||||||
|
self.build_alternative_youtube = env.bool("BUILD_ALTERNATIVE_YOUTUBE", False)
|
||||||
|
self.alternative_youtube_patches = env.list("ALTERNATIVE_YOUTUBE_PATCHES", [])
|
||||||
|
|||||||
Reference in New Issue
Block a user