From c7006cec2179a9e3b791d7e5c6a3f6436e6c672d Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed, 10 Jan 2024 02:29:33 -0800 Subject: [PATCH 1/2] Add YTNoSuggestedVideo --- Settings.xm | 1 + uYouPlus.xm | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Settings.xm b/Settings.xm index 708d3e3..13497ff 100644 --- a/Settings.xm +++ b/Settings.xm @@ -217,6 +217,7 @@ extern NSBundle *uYouPlusBundle(); SWITCH_ITEM2(LOC(@"RED_PROGRESS_BAR"), LOC(@"RED_PROGRESS_BAR_DESC"), @"redProgressBar_enabled"); SWITCH_ITEM(LOC(@"HIDE_HOVER_CARD"), LOC(@"HIDE_HOVER_CARD_DESC"), @"hideHoverCards_enabled"); SWITCH_ITEM2(LOC(@"HIDE_RIGHT_PANEL"), LOC(@"HIDE_RIGHT_PANEL_DESC"), @"hideRightPanel_enabled"); + SWITCH_ITEM2(LOC(@"Hide Suggested Video"), LOC(@"Remove the suggested video popup when finishing a video"), @"noSuggestedVideo_enabled"); SWITCH_ITEM2(LOC(@"Hide Heatwaves"), LOC(@"Should hide the Heatwaves in the video player. App restart is required."), @"hideHeatwaves_enabled"); SWITCH_ITEM2(LOC(@"Hide Dark Overlay Background"), LOC(@"Hide video player's dark overlay background. App restart is required."), @"hideOverlayDarkBackground_enabled"); SWITCH_ITEM2(LOC(@"Disable Ambient Mode in Fullscreen"), LOC(@"When Enabled, this will Disable the functionality of Ambient Mode from being used in the Video Player when in Fullscreen. App restart is required."), @"disableAmbientMode_enabled"); diff --git a/uYouPlus.xm b/uYouPlus.xm index 821da5f..20c335b 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -475,6 +475,16 @@ static NSString *accessGroupID() { %end %end +// YTNoSuggestedVideo - https://github.com/bhackel/YTNoSuggestedVideo +%hook YTMainAppVideoPlayerOverlayViewController +- (bool)shouldShowAutonavEndscreen { + if (IS_ENABLED(@"noSuggestedVideo_enabled")) { + return false; + } + return %orig; +} +%end + # pragma mark - Hide Notification Button && SponsorBlock Button %hook YTRightNavigationButtons - (void)layoutSubviews { From 98987871b9a8638c115ec1a1ce66701d54abdd38 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:40:39 -0800 Subject: [PATCH 2/2] Add autoplay note --- Settings.xm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Settings.xm b/Settings.xm index 13497ff..2b2bf33 100644 --- a/Settings.xm +++ b/Settings.xm @@ -217,7 +217,7 @@ extern NSBundle *uYouPlusBundle(); SWITCH_ITEM2(LOC(@"RED_PROGRESS_BAR"), LOC(@"RED_PROGRESS_BAR_DESC"), @"redProgressBar_enabled"); SWITCH_ITEM(LOC(@"HIDE_HOVER_CARD"), LOC(@"HIDE_HOVER_CARD_DESC"), @"hideHoverCards_enabled"); SWITCH_ITEM2(LOC(@"HIDE_RIGHT_PANEL"), LOC(@"HIDE_RIGHT_PANEL_DESC"), @"hideRightPanel_enabled"); - SWITCH_ITEM2(LOC(@"Hide Suggested Video"), LOC(@"Remove the suggested video popup when finishing a video"), @"noSuggestedVideo_enabled"); + SWITCH_ITEM2(LOC(@"Hide Suggested Video"), LOC(@"Remove the suggested video popup when finishing a video. Note that this will prevent autoplay from working."), @"noSuggestedVideo_enabled"); SWITCH_ITEM2(LOC(@"Hide Heatwaves"), LOC(@"Should hide the Heatwaves in the video player. App restart is required."), @"hideHeatwaves_enabled"); SWITCH_ITEM2(LOC(@"Hide Dark Overlay Background"), LOC(@"Hide video player's dark overlay background. App restart is required."), @"hideOverlayDarkBackground_enabled"); SWITCH_ITEM2(LOC(@"Disable Ambient Mode in Fullscreen"), LOC(@"When Enabled, this will Disable the functionality of Ambient Mode from being used in the Video Player when in Fullscreen. App restart is required."), @"disableAmbientMode_enabled");