fix(YouTube): Patching fails under certain conditions

This commit is contained in:
inotia00
2024-12-15 17:53:57 +09:00
parent 59b0c7168c
commit 21acf6f003
17 changed files with 18 additions and 17 deletions

View File

@ -51,11 +51,11 @@ val adsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
baseAdsPatch("$ADS_PATH/MusicAdsPatch;", "hideMusicAds"), baseAdsPatch("$ADS_PATH/MusicAdsPatch;", "hideMusicAds"),
lithoFilterPatch, lithoFilterPatch,
navigationBarComponentsPatch, // for 'Hide upgrade button' setting navigationBarComponentsPatch, // for 'Hide upgrade button' setting
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
) )
execute { execute {

View File

@ -77,11 +77,11 @@ val flyoutMenuComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
flyoutMenuComponentsResourcePatch, flyoutMenuComponentsResourcePatch,
flyoutMenuHookPatch, flyoutMenuHookPatch,
lithoFilterPatch, lithoFilterPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
versionCheckPatch, versionCheckPatch,
videoInformationPatch, videoInformationPatch,
videoTypeHookPatch, videoTypeHookPatch,

View File

@ -53,9 +53,9 @@ val layoutComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
lithoFilterPatch, lithoFilterPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
settingsMenuPatch, settingsMenuPatch,
versionCheckPatch, versionCheckPatch,
) )

View File

@ -35,8 +35,8 @@ val shareSheetPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
lithoFilterPatch,
settingsPatch, settingsPatch,
lithoFilterPatch,
sharedResourceIdPatch sharedResourceIdPatch
) )

View File

@ -183,9 +183,9 @@ val playerComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
playerComponentsResourcePatch, playerComponentsResourcePatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
lithoFilterPatch, lithoFilterPatch,
mainActivityResolvePatch, mainActivityResolvePatch,
videoTypeHookPatch, videoTypeHookPatch,

View File

@ -43,11 +43,11 @@ val adsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
baseAdsPatch(ADS_CLASS_DESCRIPTOR, "hideVideoAds"), baseAdsPatch(ADS_CLASS_DESCRIPTOR, "hideVideoAds"),
doubleBackToClosePatch, doubleBackToClosePatch,
lithoFilterPatch, lithoFilterPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
swipeRefreshPatch, swipeRefreshPatch,
) )

View File

@ -50,9 +50,9 @@ val layoutComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
lithoFilterPatch, lithoFilterPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
settingsMenuPatch, settingsMenuPatch,
viewGroupMarginLayoutParamsHookPatch, viewGroupMarginLayoutParamsHookPatch,
) )

View File

@ -36,9 +36,9 @@ val shareSheetPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
lithoFilterPatch, lithoFilterPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
) )
execute { execute {

View File

@ -20,8 +20,8 @@ val actionButtonsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
lithoFilterPatch,
settingsPatch, settingsPatch,
lithoFilterPatch,
) )
execute { execute {

View File

@ -36,10 +36,10 @@ val commentsComponentPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
inclusiveSpanPatch, inclusiveSpanPatch,
lithoFilterPatch, lithoFilterPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
) )
execute { execute {

View File

@ -268,12 +268,12 @@ val playerComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
controlsOverlayConfigPatch, controlsOverlayConfigPatch,
inclusiveSpanPatch, inclusiveSpanPatch,
lithoFilterPatch, lithoFilterPatch,
playerTypeHookPatch, playerTypeHookPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
speedOverlayPatch, speedOverlayPatch,
suggestedVideoEndScreenPatch, suggestedVideoEndScreenPatch,
videoInformationPatch, videoInformationPatch,

View File

@ -42,11 +42,11 @@ val descriptionComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
bottomSheetRecyclerViewPatch, bottomSheetRecyclerViewPatch,
lithoFilterPatch, lithoFilterPatch,
playerTypeHookPatch, playerTypeHookPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
versionCheckPatch, versionCheckPatch,
) )

View File

@ -43,10 +43,10 @@ val playerFlyoutMenuPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
lithoFilterPatch, lithoFilterPatch,
playerTypeHookPatch, playerTypeHookPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
versionCheckPatch versionCheckPatch
) )

View File

@ -55,10 +55,10 @@ val fullscreenComponentsPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
lithoFilterPatch, lithoFilterPatch,
mainActivityResolvePatch, mainActivityResolvePatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
versionCheckPatch, versionCheckPatch,
) )

View File

@ -537,6 +537,8 @@ val shortsComponentPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
shortsAnimationPatch, shortsAnimationPatch,
shortsCustomActionsPatch, shortsCustomActionsPatch,
shortsNavigationBarPatch, shortsNavigationBarPatch,
@ -547,7 +549,6 @@ val shortsComponentPatch = bytecodePatch(
lithoFilterPatch, lithoFilterPatch,
playerTypeHookPatch, playerTypeHookPatch,
sharedResourceIdPatch, sharedResourceIdPatch,
settingsPatch,
textComponentPatch, textComponentPatch,
versionCheckPatch, versionCheckPatch,
videoInformationPatch, videoInformationPatch,

View File

@ -231,10 +231,10 @@ val returnYouTubeDislikePatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
returnYouTubeDislikeRollingNumberPatch, returnYouTubeDislikeRollingNumberPatch,
returnYouTubeDislikeShortsPatch, returnYouTubeDislikeShortsPatch,
lithoFilterPatch, lithoFilterPatch,
settingsPatch,
videoInformationPatch, videoInformationPatch,
) )

View File

@ -79,6 +79,7 @@ val videoPlaybackPatch = bytecodePatch(
compatibleWith(COMPATIBLE_PACKAGE) compatibleWith(COMPATIBLE_PACKAGE)
dependsOn( dependsOn(
settingsPatch,
bottomSheetRecyclerViewPatch, bottomSheetRecyclerViewPatch,
customPlaybackSpeedPatch( customPlaybackSpeedPatch(
"$VIDEO_PATH/CustomPlaybackSpeedPatch;", "$VIDEO_PATH/CustomPlaybackSpeedPatch;",
@ -87,7 +88,6 @@ val videoPlaybackPatch = bytecodePatch(
flyoutMenuHookPatch, flyoutMenuHookPatch,
lithoFilterPatch, lithoFilterPatch,
playerTypeHookPatch, playerTypeHookPatch,
settingsPatch,
shortsPlaybackPatch, shortsPlaybackPatch,
videoIdPatch, videoIdPatch,
videoInformationPatch, videoInformationPatch,