mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🐛 Removed duplicate patches
This commit is contained in:
@@ -40,7 +40,11 @@ def main() -> None:
|
|||||||
logger.exception(f"Failed to build {app} because of {e}")
|
logger.exception(f"Failed to build {app} because of {e}")
|
||||||
if len(config.alternative_youtube_patches) and "youtube" in config.apps:
|
if len(config.alternative_youtube_patches) and "youtube" in config.apps:
|
||||||
for alternative_patch in config.alternative_youtube_patches:
|
for alternative_patch in config.alternative_youtube_patches:
|
||||||
_, version, is_experimental = patcher.get_app_configs("youtube")
|
parser = Parser(patcher, config)
|
||||||
|
app_all_patches, version, is_experimental = patcher.get_app_configs(
|
||||||
|
"youtube"
|
||||||
|
)
|
||||||
|
patcher.include_exclude_patch("youtube", parser, app_all_patches)
|
||||||
was_inverted = parser.invert_patch(alternative_patch)
|
was_inverted = parser.invert_patch(alternative_patch)
|
||||||
if was_inverted:
|
if was_inverted:
|
||||||
logger.info(
|
logger.info(
|
||||||
@@ -58,7 +62,11 @@ def main() -> None:
|
|||||||
)
|
)
|
||||||
if len(config.alternative_youtube_music_patches) and "youtube_music" in config.apps:
|
if len(config.alternative_youtube_music_patches) and "youtube_music" in config.apps:
|
||||||
for alternative_patch in config.alternative_youtube_music_patches:
|
for alternative_patch in config.alternative_youtube_music_patches:
|
||||||
_, version, is_experimental = patcher.get_app_configs("youtube_music")
|
parser = Parser(patcher, config)
|
||||||
|
app_all_patches, version, is_experimental = patcher.get_app_configs(
|
||||||
|
"youtube_music"
|
||||||
|
)
|
||||||
|
patcher.include_exclude_patch("youtube_music", parser, app_all_patches)
|
||||||
was_inverted = parser.invert_patch(alternative_patch)
|
was_inverted = parser.invert_patch(alternative_patch)
|
||||||
if was_inverted:
|
if was_inverted:
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
+6
-4
@@ -50,10 +50,12 @@ class Parser(object):
|
|||||||
patches."""
|
patches."""
|
||||||
try:
|
try:
|
||||||
patch_index = self._PATCHES.index(name)
|
patch_index = self._PATCHES.index(name)
|
||||||
if self._PATCHES[patch_index - 1] == "-e":
|
indices = [i for i in range(len(self._PATCHES)) if self._PATCHES[i] == name]
|
||||||
self._PATCHES[patch_index - 1] = "-i"
|
for patch_index in indices:
|
||||||
else:
|
if self._PATCHES[patch_index - 1] == "-e":
|
||||||
self._PATCHES[patch_index - 1] = "-e"
|
self._PATCHES[patch_index - 1] = "-i"
|
||||||
|
else:
|
||||||
|
self._PATCHES[patch_index - 1] = "-e"
|
||||||
return True
|
return True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user