mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-24 19:38:36 +09:00
✨ Supports Custom branding now
This commit is contained in:
@@ -33,15 +33,12 @@ def main() -> None:
|
||||
if config.build_og_nd_branding_youtube:
|
||||
logger.info("Rebuilding youtube")
|
||||
all_patches = parser.get_all_patches()
|
||||
branding_patch = "custom-branding"
|
||||
if config.build_extended:
|
||||
branding_patch = "custom-branding-icon-blue"
|
||||
branding_index = all_patches.index(branding_patch)
|
||||
branding_index = all_patches.index(config.branding_patch)
|
||||
was_og_build = True if all_patches[branding_index - 1] == "-e" else False
|
||||
output = "-custom-icon-" if was_og_build else ""
|
||||
output = "-custom-icon-" if was_og_build else "-original-icon-"
|
||||
app = "youtube"
|
||||
_, version, is_experimental = patcher.get_app_configs(app)
|
||||
parser.invert_patch(branding_patch)
|
||||
parser.invert_patch(config.branding_patch)
|
||||
parser.patch_app(
|
||||
app=app,
|
||||
version=version,
|
||||
|
||||
@@ -57,3 +57,7 @@ class RevancedConfig:
|
||||
"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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user