ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
1.39k stars 152 forks source link

bug(YouTube - Hide Shorts components): Subscribe button is not hidden #3030

Closed ILoveOpenSourceApplications closed 3 weeks ago

ILoveOpenSourceApplications commented 1 month ago

Bug description

Hide subscribe button no longer hides it in shorts. Meanwhile, turning on Hide channel bar is hiding it in shorts. I have my doubts that this could be an A/B testing as when I went into incognito mode and played the same shorts, there wasn't any subscribe button. Settings Outcome
Screenshot_2024-04-17-13-04-23-989_app revanced android youtube Screenshot_2024-04-17-13-05-52-701_app revanced android youtube

Error logs

No response

Solution

No response

Additional context

No response

Acknowledgements

LisoUseInAIKyrios commented 1 month ago

It looks like it's part of the channel bar and an a/b test.

Turn on debug and protobuffer logging and post the log entries for the channel bar and/or subscribe button.

ILoveOpenSourceApplications commented 1 month ago

It looks like it's part of the channel bar and an a/b test.

Yes it's indeed a part of channel bar as toggling on hide channel bar hides the subscribe button as well.

ILoveOpenSourceApplications commented 1 month ago
04-17 14:45:16.370 19992 19992 D revanced: LithoFilterPatch: Searching ID: null Path: reel_metapanel.eml|510ea3c8ab26c965|ContainerType|reel_channel_bar.eml|282c120d9965d55e|reel_channel_bar_inner.eml|cb7965c5020198c7|ContainerType| BufferStrings: Key_ReelChannelBarInnerWithControllerΓ¥Öreel_subscribe_buttonΓ¥ÖKey_SubscribeButtonWithControllerΓ¥Ösubscribe_button.eml|5479dbde336bb700Γ¥Ö@mkbhdΓ¥Ösans-serif-mediumΓ¥ÖUCBJycsmduvYEL83R_U4JriQΓ¥Ö8gYKCgiaAQCiAQIIAQ%3D%3D"Γ¥Ö/@mkbhdΓ¥Ödecorated_avatar.eml|5c6ca1f502890e70Γ¥ÖUCBJycsmduvYEL83R_U4JriQΓ¥Ö8gYKCgiaAQCiAQIIAQ%3D%3D"Γ¥Ö/@mkbhdΓ¥Ö
LisoUseInAIKyrios commented 1 month ago

Does subscribe_button.eml appear in any log statements after that?

ILoveOpenSourceApplications commented 1 month ago
04-17 14:45:16.379 19992 19992 D revanced: LithoFilterPatch: Searching ID: null Path: reel_metapanel.eml|510ea3c8ab26c965|ContainerType|reel_channel_bar.eml|282c120d9965d55e|reel_channel_bar_inner.eml|cb7965c5020198c7|ContainerType|ContainerType|ContainerType|subscribe_button.eml|5479dbde336bb700| BufferStrings: Key_SubscribeButtonWithControllerΓ¥Öcompact_subscribe_button.eml|74c4ba50b9baf501Γ¥Ö
LisoUseInAIKyrios commented 1 month ago

For now a custom filter of subscribe_button.eml might hide it.

The patch can do additional checks like only hiding if the path also starts with reel_metapanel.eml

ILoveOpenSourceApplications commented 1 month ago

For now a custom filter of subscribe_button.eml might hide it.

This hides the subscribe button for the entire YouTube layout though, right?

LisoUseInAIKyrios commented 1 month ago

It'll hide it everywhere else that uses that same path component name, yeah. Not sure where else that is. A custom filter would only be temporarily.

LisoUseInAIKyrios commented 1 month ago

Try and see if that hides it in Shorts.

ILoveOpenSourceApplications commented 1 month ago

Try and see if that hides it in Shorts.

It does, but it also hides the subscribe button in the channel page and under a normal video as well, Pretty much everywhere, where there is a subscribe button.

ILoveOpenSourceApplications commented 1 month ago

Can't we try a litho$buffer string combo here?

LisoUseInAIKyrios commented 1 month ago

If filter only the path works, it's more efficient to use that.

Does filtering subscribe_button.eml hide the button?

ILoveOpenSourceApplications commented 1 month ago

Yes.

ILoveOpenSourceApplications commented 1 month ago

It does, but it also hides the subscribe button in the channel page and under a normal video as well, Pretty much everywhere, where there is a subscribe button.

.

ILoveOpenSourceApplications commented 1 month ago

Found it. compact_subscribe_button.eml only hides it for shorts.

LisoUseInAIKyrios commented 1 month ago

I just made a change on dev using the reel_metapanel.eml and subscribe_button.eml check.

Try patching with the dev release when it finishes building, and see if that fixes it.

ILoveOpenSourceApplications commented 1 month ago

Did you test and see if it doesn't hide it for the general layout?

LisoUseInAIKyrios commented 1 month ago

It won't hide for general layout because it only filters if the path also starts with reel_metapanel.eml (which is a Shorts specific component)

ILoveOpenSourceApplications commented 1 month ago

How long does it take for patching with CLI?

image
LisoUseInAIKyrios commented 1 month ago

About 1 minute.

Be sure you have Zulu or OpenJDK described here: https://github.com/ReVanced/revanced-cli/blob/main/docs/0_prerequisites.md

Use java -version to verify you are running the correct java (and not some other in the command path)

ILoveOpenSourceApplications commented 1 month ago

Use java -version to verify you are running the correct java (and not some other in the command path)

D:\Files\platform-tools\CLI>java -version
openjdk version "11.0.23" 2024-04-16 LTS
OpenJDK Runtime Environment Zulu11.72+19-CA (build 11.0.23+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.72+19-CA (build 11.0.23+9-LTS, mixed mode)
ILoveOpenSourceApplications commented 1 month ago

Yes, it works @LisoUseInAIKyrios.