diff --git a/main.py b/main.py index 32260cf..1a1f9a1 100644 --- a/main.py +++ b/main.py @@ -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, diff --git a/src/config.py b/src/config.py index f139547..6bac9f2 100644 --- a/src/config.py +++ b/src/config.py @@ -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", + )