From 1c9a966354243dd1a106e1fc767227c1b025125e Mon Sep 17 00:00:00 2001 From: MarcaD <152095496+MarcaDian@users.noreply.github.com> Date: Sat, 19 Oct 2024 15:39:00 +0300 Subject: [PATCH 1/7] feat(YouTube - Hide Shorts components): Hide `Hashtag` button (#717) --- .../patches/components/ShortsFilter.java | 22 ++++++++++++++++++- .../youtube/settings/Settings.java | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/ShortsFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/ShortsFilter.java index f48d10cf8b..41369c2fa5 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/ShortsFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/ShortsFilter.java @@ -247,10 +247,24 @@ public ShortsFilter() { new ByteArrayFilterGroup( Settings.HIDE_SHORTS_GREEN_SCREEN_BUTTON, "greenscreen_temp" + ), + new ByteArrayFilterGroup( + Settings.HIDE_SHORTS_HASHTAG_BUTTON, + "yt_outline_hashtag_" ) ); } + private boolean isEverySuggestedActionFilterEnabled() { + for (ByteArrayFilterGroup group : suggestedActionsGroupList) { + if (!group.isEnabled()) { + return false; + } + } + + return true; + } + @Override boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBufferArray, StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) { @@ -279,7 +293,13 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff } if (matchedGroup == suggestedAction) { - // Suggested actions can be at the start or in the middle of a path. + // Skip searching the buffer if all suggested actions are set to hidden. + // This has a secondary effect of hiding all new un-identified actions + // under the assumption that the user wants all actions hidden. + if (isEverySuggestedActionFilterEnabled()) { + return super.isFiltered(path, identifier, protobufBufferArray, matchedGroup, contentType, contentIndex); + } + if (suggestedActionsGroupList.check(protobufBufferArray).isFiltered()) { return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex); } diff --git a/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java b/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java index 85af3e46f9..cdf05b9178 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java +++ b/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java @@ -230,6 +230,7 @@ public class Settings extends BaseSettings { public static final BooleanSetting HIDE_SHORTS_USE_TEMPLATE_BUTTON = new BooleanSetting("revanced_hide_shorts_use_template_button", TRUE); public static final BooleanSetting HIDE_SHORTS_UPCOMING_BUTTON = new BooleanSetting("revanced_hide_shorts_upcoming_button", TRUE); public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE); + public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE); public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", FALSE); public static final BooleanSetting HIDE_SHORTS_STICKERS = new BooleanSetting("revanced_hide_shorts_stickers", TRUE); public static final BooleanSetting HIDE_SHORTS_SUPER_THANKS_BUTTON = new BooleanSetting("revanced_hide_shorts_super_thanks_button", TRUE); From e3317e6f5681f2f641df7e28eb86c8c2948d71b1 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 19 Oct 2024 12:42:03 +0000 Subject: [PATCH 2/7] chore: Release v1.16.0-dev.11 [skip ci] # [1.16.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.10...v1.16.0-dev.11) (2024-10-19) ### Features * **YouTube - Hide Shorts components:** Hide `Hashtag` button ([#717](https://github.com/ReVanced/revanced-integrations/issues/717)) ([1c9a966](https://github.com/ReVanced/revanced-integrations/commit/1c9a966354243dd1a106e1fc767227c1b025125e)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02f621a02f..7e57f47742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.16.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.10...v1.16.0-dev.11) (2024-10-19) + + +### Features + +* **YouTube - Hide Shorts components:** Hide `Hashtag` button ([#717](https://github.com/ReVanced/revanced-integrations/issues/717)) ([1c9a966](https://github.com/ReVanced/revanced-integrations/commit/1c9a966354243dd1a106e1fc767227c1b025125e)) + # [1.16.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.9...v1.16.0-dev.10) (2024-10-19) diff --git a/gradle.properties b/gradle.properties index b65c8e765c..22f7605c5f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true android.useAndroidX = true -version = 1.16.0-dev.10 +version = 1.16.0-dev.11 From 53d5a94bfa16a74276c69252212ee6bc1a163027 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 20 Oct 2024 01:40:13 +0000 Subject: [PATCH 3/7] chore: Release v1.16.0 [skip ci] # [1.16.0](https://github.com/ReVanced/revanced-integrations/compare/v1.15.0...v1.16.0) (2024-10-20) ### Bug Fixes * **YouTube - Hide layout components:** Adjust settings text ([#713](https://github.com/ReVanced/revanced-integrations/issues/713)) ([119c416](https://github.com/ReVanced/revanced-integrations/commit/119c416bc5c24f2455bfe70adccd51234b165d25)) * **YouTube - Hide layout components:** Hide new type of Playable ([1a58a40](https://github.com/ReVanced/revanced-integrations/commit/1a58a406db76e4deaea070d077a31714f270e479)) * **YouTube - Spoof video streams:** Fix playback for Android VR by removing invalid body as well ([#716](https://github.com/ReVanced/revanced-integrations/issues/716)) ([8ad3f78](https://github.com/ReVanced/revanced-integrations/commit/8ad3f78865836fbe38a832ef6395c6eb8d0edbf2)) * **YouTube - Spoof video streams:** Handle app left open for a long time ([#709](https://github.com/ReVanced/revanced-integrations/issues/709)) ([ea4b073](https://github.com/ReVanced/revanced-integrations/commit/ea4b073f5c21b0fea4e3922488e8bbf69cfcb421)) ### Features * **Sync for Reddit:** Add `Fix video downloads` patch ([#710](https://github.com/ReVanced/revanced-integrations/issues/710)) ([888de49](https://github.com/ReVanced/revanced-integrations/commit/888de49edd39913116028ac1d173f2b6e0feab09)) * **Twitter:** Add `Change link sharing domain` patch ([#715](https://github.com/ReVanced/revanced-integrations/issues/715)) ([c673951](https://github.com/ReVanced/revanced-integrations/commit/c6739517f179bf8e811e869640a24f433d729f42)) * **YouTube - Hide layout components:** Add option to hide Yoodles (YouTube Doodles) ([#712](https://github.com/ReVanced/revanced-integrations/issues/712)) ([4b5f3de](https://github.com/ReVanced/revanced-integrations/commit/4b5f3deef9c3a8c700e23a0f4d9ce999013ec9d4)) * **YouTube - Hide Shorts components:** Add option to hide like fountain ([#708](https://github.com/ReVanced/revanced-integrations/issues/708)) ([16c3ef7](https://github.com/ReVanced/revanced-integrations/commit/16c3ef7ee5a32ec22db6da876dcf19fc02bc9aac)) * **YouTube - Hide Shorts components:** Add options to hide `Use template`, `Upcoming`, `Green screen` buttons ([#714](https://github.com/ReVanced/revanced-integrations/issues/714)) ([faad754](https://github.com/ReVanced/revanced-integrations/commit/faad7548df2091c24d41dad98a589745ce8a6b73)) * **YouTube - Hide Shorts components:** Hide `Hashtag` button ([#717](https://github.com/ReVanced/revanced-integrations/issues/717)) ([1c9a966](https://github.com/ReVanced/revanced-integrations/commit/1c9a966354243dd1a106e1fc767227c1b025125e)) * **YouTube:** Support versions `19.25` and `19.34` ([#689](https://github.com/ReVanced/revanced-integrations/issues/689)) ([61569ba](https://github.com/ReVanced/revanced-integrations/commit/61569ba111af82aaff60d11863bc57221a295fe8)) --- CHANGELOG.md | 21 +++++++++++++++++++++ gradle.properties | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e57f47742..0b75564746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +# [1.16.0](https://github.com/ReVanced/revanced-integrations/compare/v1.15.0...v1.16.0) (2024-10-20) + + +### Bug Fixes + +* **YouTube - Hide layout components:** Adjust settings text ([#713](https://github.com/ReVanced/revanced-integrations/issues/713)) ([119c416](https://github.com/ReVanced/revanced-integrations/commit/119c416bc5c24f2455bfe70adccd51234b165d25)) +* **YouTube - Hide layout components:** Hide new type of Playable ([1a58a40](https://github.com/ReVanced/revanced-integrations/commit/1a58a406db76e4deaea070d077a31714f270e479)) +* **YouTube - Spoof video streams:** Fix playback for Android VR by removing invalid body as well ([#716](https://github.com/ReVanced/revanced-integrations/issues/716)) ([8ad3f78](https://github.com/ReVanced/revanced-integrations/commit/8ad3f78865836fbe38a832ef6395c6eb8d0edbf2)) +* **YouTube - Spoof video streams:** Handle app left open for a long time ([#709](https://github.com/ReVanced/revanced-integrations/issues/709)) ([ea4b073](https://github.com/ReVanced/revanced-integrations/commit/ea4b073f5c21b0fea4e3922488e8bbf69cfcb421)) + + +### Features + +* **Sync for Reddit:** Add `Fix video downloads` patch ([#710](https://github.com/ReVanced/revanced-integrations/issues/710)) ([888de49](https://github.com/ReVanced/revanced-integrations/commit/888de49edd39913116028ac1d173f2b6e0feab09)) +* **Twitter:** Add `Change link sharing domain` patch ([#715](https://github.com/ReVanced/revanced-integrations/issues/715)) ([c673951](https://github.com/ReVanced/revanced-integrations/commit/c6739517f179bf8e811e869640a24f433d729f42)) +* **YouTube - Hide layout components:** Add option to hide Yoodles (YouTube Doodles) ([#712](https://github.com/ReVanced/revanced-integrations/issues/712)) ([4b5f3de](https://github.com/ReVanced/revanced-integrations/commit/4b5f3deef9c3a8c700e23a0f4d9ce999013ec9d4)) +* **YouTube - Hide Shorts components:** Add option to hide like fountain ([#708](https://github.com/ReVanced/revanced-integrations/issues/708)) ([16c3ef7](https://github.com/ReVanced/revanced-integrations/commit/16c3ef7ee5a32ec22db6da876dcf19fc02bc9aac)) +* **YouTube - Hide Shorts components:** Add options to hide `Use template`, `Upcoming`, `Green screen` buttons ([#714](https://github.com/ReVanced/revanced-integrations/issues/714)) ([faad754](https://github.com/ReVanced/revanced-integrations/commit/faad7548df2091c24d41dad98a589745ce8a6b73)) +* **YouTube - Hide Shorts components:** Hide `Hashtag` button ([#717](https://github.com/ReVanced/revanced-integrations/issues/717)) ([1c9a966](https://github.com/ReVanced/revanced-integrations/commit/1c9a966354243dd1a106e1fc767227c1b025125e)) +* **YouTube:** Support versions `19.25` and `19.34` ([#689](https://github.com/ReVanced/revanced-integrations/issues/689)) ([61569ba](https://github.com/ReVanced/revanced-integrations/commit/61569ba111af82aaff60d11863bc57221a295fe8)) + # [1.16.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.10...v1.16.0-dev.11) (2024-10-19) diff --git a/gradle.properties b/gradle.properties index 22f7605c5f..6ad32f29ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true android.useAndroidX = true -version = 1.16.0-dev.11 +version = 1.16.0 From e3975cfc3ac703eb972f68528a99c92457276815 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 20 Oct 2024 09:56:00 -0400 Subject: [PATCH 4/7] fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar --- .../youtube/patches/theme/SeekbarColorPatch.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java index 2e97a27d86..261af188e8 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java @@ -104,12 +104,14 @@ public static int getLithoColor(int colorValue) { * Injection point. */ public static void setLinearGradient(int[] colors, float[] positions) { - if (SEEKBAR_CUSTOM_COLOR_ENABLED) { + final boolean hideSeekbar = Settings.HIDE_SEEKBAR_THUMBNAIL.get(); + + if (SEEKBAR_CUSTOM_COLOR_ENABLED || hideSeekbar) { // Most litho usage of linear gradients is hooked here, // so must only change if the values are those for the seekbar. if (Arrays.equals(ORIGINAL_SEEKBAR_GRADIENT_COLORS, colors) && Arrays.equals(ORIGINAL_SEEKBAR_GRADIENT_POSITIONS, positions)) { - Arrays.fill(colors, Settings.HIDE_SEEKBAR_THUMBNAIL.get() + Arrays.fill(colors, hideSeekbar ? 0x00000000 : seekbarColor); return; From 9ffdfc37630288eb1383446e38c5bf0d9317bc12 Mon Sep 17 00:00:00 2001 From: Zain Date: Sun, 20 Oct 2024 20:57:58 +0700 Subject: [PATCH 5/7] fix(YouTube - Hide layout components): Hide new kind of community post (#711) --- .../youtube/patches/components/LayoutComponentsFilter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java index d0026ecb15..d8120660b9 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java @@ -84,6 +84,7 @@ public LayoutComponentsFilter() { "text_post_root.eml", "images_post_root.eml", "images_post_slim.eml", + "images_post_root_slim.eml", "text_post_root_slim.eml", "post_base_wrapper_slim.eml" ); From 1c9d3710478912abcae22c597ba36a0d492a536d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 20 Oct 2024 14:01:32 +0000 Subject: [PATCH 6/7] chore: Release v1.16.1-dev.1 [skip ci] ## [1.16.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0...v1.16.1-dev.1) (2024-10-20) ### Bug Fixes * **YouTube - Hide layout components:** Hide new kind of community post ([#711](https://github.com/ReVanced/revanced-integrations/issues/711)) ([9ffdfc3](https://github.com/ReVanced/revanced-integrations/commit/9ffdfc37630288eb1383446e38c5bf0d9317bc12)) * **YouTube - Hide seekbar:** Hide 19.34+ gradient seekbar ([e3975cf](https://github.com/ReVanced/revanced-integrations/commit/e3975cfc3ac703eb972f68528a99c92457276815)) --- CHANGELOG.md | 8 ++++++++ gradle.properties | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b75564746..c524c62161 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.16.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0...v1.16.1-dev.1) (2024-10-20) + + +### Bug Fixes + +* **YouTube - Hide layout components:** Hide new kind of community post ([#711](https://github.com/ReVanced/revanced-integrations/issues/711)) ([9ffdfc3](https://github.com/ReVanced/revanced-integrations/commit/9ffdfc37630288eb1383446e38c5bf0d9317bc12)) +* **YouTube - Hide seekbar:** Hide 19.34+ gradient seekbar ([e3975cf](https://github.com/ReVanced/revanced-integrations/commit/e3975cfc3ac703eb972f68528a99c92457276815)) + # [1.16.0](https://github.com/ReVanced/revanced-integrations/compare/v1.15.0...v1.16.0) (2024-10-20) diff --git a/gradle.properties b/gradle.properties index 6ad32f29ed..5a83345f76 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true android.useAndroidX = true -version = 1.16.0 +version = 1.16.1-dev.1 From 14fb894f398dc4ea4fd494dff1eeee19c7fd6e95 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 21 Oct 2024 02:52:48 -0400 Subject: [PATCH 7/7] feat(YouTube): Add `Shorts autoplay` patch (#719) --- .../youtube/patches/ShortsAutoplayPatch.java | 119 ++++++++++++++++++ .../youtube/patches/VersionCheckPatch.java | 1 + .../patches/theme/SeekbarColorPatch.java | 5 +- .../youtube/settings/Settings.java | 2 + .../SegmentPlaybackController.java | 5 +- 5 files changed, 124 insertions(+), 8 deletions(-) create mode 100644 app/src/main/java/app/revanced/integrations/youtube/patches/ShortsAutoplayPatch.java diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/ShortsAutoplayPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/ShortsAutoplayPatch.java new file mode 100644 index 0000000000..412cb51e68 --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/ShortsAutoplayPatch.java @@ -0,0 +1,119 @@ +package app.revanced.integrations.youtube.patches; + +import android.app.Activity; +import android.os.Build; + +import androidx.annotation.RequiresApi; + +import java.lang.ref.WeakReference; +import java.util.Objects; + +import app.revanced.integrations.shared.Logger; +import app.revanced.integrations.youtube.settings.Settings; + +@SuppressWarnings("unused") +public class ShortsAutoplayPatch { + + private enum ShortsLoopBehavior { + UNKNOWN, + /** + * Repeat the same Short forever! + */ + REPEAT, + /** + * Play once, then advanced to the next Short. + */ + SINGLE_PLAY, + /** + * Pause playback after 1 play. + */ + END_SCREEN; + + static void setYTEnumValue(Enum ytBehavior) { + for (ShortsLoopBehavior rvBehavior : values()) { + if (ytBehavior.name().endsWith(rvBehavior.name())) { + rvBehavior.ytEnumValue = ytBehavior; + + Logger.printDebug(() -> rvBehavior + " set to YT enum: " + ytBehavior.name()); + return; + } + } + + Logger.printException(() -> "Unknown Shorts loop behavior: " + ytBehavior.name()); + } + + /** + * YouTube enum value of the obfuscated enum type. + */ + private Enum ytEnumValue; + } + + private static WeakReference mainActivityRef = new WeakReference<>(null); + + + public static void setMainActivity(Activity activity) { + mainActivityRef = new WeakReference<>(activity); + } + + /** + * @return If the app is currently in background PiP mode. + */ + @RequiresApi(api = Build.VERSION_CODES.N) + private static boolean isAppInBackgroundPiPMode() { + Activity activity = mainActivityRef.get(); + return activity != null && activity.isInPictureInPictureMode(); + } + + /** + * Injection point. + */ + public static void setYTShortsRepeatEnum(Enum ytEnum) { + try { + for (Enum ytBehavior : Objects.requireNonNull(ytEnum.getClass().getEnumConstants())) { + ShortsLoopBehavior.setYTEnumValue(ytBehavior); + } + } catch (Exception ex) { + Logger.printException(() -> "setYTShortsRepeatEnum failure", ex); + } + } + + /** + * Injection point. + */ + @RequiresApi(api = Build.VERSION_CODES.N) + public static Enum changeShortsRepeatBehavior(Enum original) { + try { + final boolean autoplay; + + if (isAppInBackgroundPiPMode()) { + if (!VersionCheckPatch.IS_19_34_OR_GREATER) { + // 19.34+ is required to set background play behavior. + Logger.printDebug(() -> "PiP Shorts not supported, using original repeat behavior"); + + return original; + } + + autoplay = Settings.SHORTS_AUTOPLAY_BACKGROUND.get(); + } else { + autoplay = Settings.SHORTS_AUTOPLAY.get(); + } + + final ShortsLoopBehavior behavior = autoplay + ? ShortsLoopBehavior.SINGLE_PLAY + : ShortsLoopBehavior.REPEAT; + + if (behavior.ytEnumValue != null) { + Logger.printDebug(() -> behavior.ytEnumValue == original + ? "Changing Shorts repeat behavior from: " + original.name() + " to: " + behavior.ytEnumValue + : "Behavior setting is same as original. Using original: " + original.name() + ); + + return behavior.ytEnumValue; + } + } catch (Exception ex) { + Logger.printException(() -> "changeShortsRepeatState failure", ex); + } + + return original; + } +} diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/VersionCheckPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/VersionCheckPatch.java index 4ede010158..d977a32f5d 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/VersionCheckPatch.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/VersionCheckPatch.java @@ -7,4 +7,5 @@ public class VersionCheckPatch { public static final boolean IS_19_21_OR_GREATER = Utils.getAppVersionName().compareTo("19.21.00") >= 0; public static final boolean IS_19_26_OR_GREATER = Utils.getAppVersionName().compareTo("19.26.00") >= 0; public static final boolean IS_19_29_OR_GREATER = Utils.getAppVersionName().compareTo("19.29.00") >= 0; + public static final boolean IS_19_34_OR_GREATER = Utils.getAppVersionName().compareTo("19.34.00") >= 0; } diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java index 261af188e8..7303384f07 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java @@ -73,10 +73,7 @@ public static int getSeekbarColor() { } public static boolean playerSeekbarGradientEnabled(boolean original) { - if (original) { - Logger.printDebug(() -> "playerSeekbarGradientEnabled original: " + true); - if (SEEKBAR_CUSTOM_COLOR_ENABLED) return false; - } + if (SEEKBAR_CUSTOM_COLOR_ENABLED) return false; return original; } diff --git a/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java b/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java index cdf05b9178..e02f482033 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java +++ b/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java @@ -247,6 +247,8 @@ public class Settings extends BaseSettings { public static final BooleanSetting HIDE_SHORTS_SOUND_METADATA_LABEL = new BooleanSetting("revanced_hide_shorts_sound_metadata_label", FALSE); public static final BooleanSetting HIDE_SHORTS_FULL_VIDEO_LINK_LABEL = new BooleanSetting("revanced_hide_shorts_full_video_link_label", FALSE); public static final BooleanSetting HIDE_SHORTS_NAVIGATION_BAR = new BooleanSetting("revanced_hide_shorts_navigation_bar", FALSE, true); + public static final BooleanSetting SHORTS_AUTOPLAY = new BooleanSetting("revanced_shorts_autoplay", FALSE); + public static final BooleanSetting SHORTS_AUTOPLAY_BACKGROUND = new BooleanSetting("revanced_shorts_autoplay_background", TRUE); // Seekbar public static final BooleanSetting DISABLE_PRECISE_SEEKING_GESTURE = new BooleanSetting("revanced_disable_precise_seeking_gesture", TRUE); diff --git a/app/src/main/java/app/revanced/integrations/youtube/sponsorblock/SegmentPlaybackController.java b/app/src/main/java/app/revanced/integrations/youtube/sponsorblock/SegmentPlaybackController.java index ad02eec8b8..ddf4ae16ac 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/sponsorblock/SegmentPlaybackController.java +++ b/app/src/main/java/app/revanced/integrations/youtube/sponsorblock/SegmentPlaybackController.java @@ -662,10 +662,7 @@ private static void setSponsorBarAbsoluteRight(Rect rect) { */ @SuppressWarnings("unused") public static void setSponsorBarThickness(int thickness) { - if (sponsorBarThickness != thickness) { - Logger.printDebug(() -> "setSponsorBarThickness: " + thickness); - sponsorBarThickness = thickness; - } + sponsorBarThickness = thickness; } /**