mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
Merge pull request #51 from nikhilbadyal/custom-branding
Custom Branding
This commit is contained in:
@@ -33,15 +33,12 @@ def main() -> None:
|
|||||||
if config.build_og_nd_branding_youtube:
|
if config.build_og_nd_branding_youtube:
|
||||||
logger.info("Rebuilding youtube")
|
logger.info("Rebuilding youtube")
|
||||||
all_patches = parser.get_all_patches()
|
all_patches = parser.get_all_patches()
|
||||||
branding_patch = "custom-branding"
|
branding_index = all_patches.index(config.branding_patch)
|
||||||
if config.build_extended:
|
|
||||||
branding_patch = "custom-branding-icon-blue"
|
|
||||||
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
|
||||||
output = "-custom-icon-" if was_og_build else ""
|
output = "-custom-icon-" if was_og_build else "-original-icon-"
|
||||||
app = "youtube"
|
app = "youtube"
|
||||||
_, version, is_experimental = patcher.get_app_configs(app)
|
_, version, is_experimental = patcher.get_app_configs(app)
|
||||||
parser.invert_patch(branding_patch)
|
parser.invert_patch(config.branding_patch)
|
||||||
parser.patch_app(
|
parser.patch_app(
|
||||||
app=app,
|
app=app,
|
||||||
version=version,
|
version=version,
|
||||||
|
|||||||
@@ -57,3 +57,7 @@ class RevancedConfig:
|
|||||||
"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.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