mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 03:32:08 +00:00
Update uYouPlus.xm
This commit is contained in:
parent
739a8560e5
commit
aa9df5d744
1 changed files with 55 additions and 37 deletions
|
|
@ -714,43 +714,6 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// Shorts Quality Picker - @arichornlover
|
|
||||||
%group gShortsQualityPicker
|
|
||||||
%hook YTHotConfig
|
|
||||||
- (BOOL)enableOmitAdvancedMenuInShortsVideoQualityPicker { return YES; }
|
|
||||||
- (BOOL)enableShortsVideoQualityPicker { return YES; }
|
|
||||||
- (BOOL)iosEnableImmersiveLivePlayerVideoQuality { return YES; }
|
|
||||||
- (BOOL)iosEnableShortsPlayerVideoQuality { return YES; }
|
|
||||||
- (BOOL)iosEnableShortsPlayerVideoQualityRestartVideo { return YES; }
|
|
||||||
- (BOOL)iosEnableSimplerTitleInShortsVideoQualityPicker { return YES; }
|
|
||||||
%end
|
|
||||||
%end
|
|
||||||
|
|
||||||
// YTShortsProgress - https://github.com/PoomSmart/YTShortsProgress/
|
|
||||||
%hook YTShortsPlayerViewController
|
|
||||||
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
|
||||||
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTReelPlayerViewController
|
|
||||||
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
|
||||||
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTReelPlayerViewControllerSub
|
|
||||||
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
|
||||||
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTColdConfig
|
|
||||||
- (BOOL)iosEnableVideoPlayerScrubber { return YES; }
|
|
||||||
- (BOOL)mobileShortsTablnlinedExpandWatchOnDismiss { return YES; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
%hook YTHotConfig
|
|
||||||
- (BOOL)enablePlayerBarForVerticalVideoWhenControlsHiddenInFullscreen { return YES; }
|
|
||||||
%end
|
|
||||||
|
|
||||||
// YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo
|
// YTNoPaidPromo: https://github.com/PoomSmart/YTNoPaidPromo
|
||||||
%hook YTMainAppVideoPlayerOverlayViewController
|
%hook YTMainAppVideoPlayerOverlayViewController
|
||||||
- (void)setPaidContentWithPlayerData:(id)data {
|
- (void)setPaidContentWithPlayerData:(id)data {
|
||||||
|
|
@ -1422,6 +1385,61 @@ static int contrastMode() {
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// Shorts Quality Picker - @arichornlover
|
||||||
|
%group gShortsQualityPicker
|
||||||
|
%hook YTHotConfig
|
||||||
|
- (BOOL)enableOmitAdvancedMenuInShortsVideoQualityPicker { return YES; }
|
||||||
|
- (BOOL)enableShortsVideoQualityPicker { return YES; }
|
||||||
|
- (BOOL)iosEnableImmersiveLivePlayerVideoQuality { return YES; }
|
||||||
|
- (BOOL)iosEnableShortsPlayerVideoQuality { return YES; }
|
||||||
|
- (BOOL)iosEnableShortsPlayerVideoQualityRestartVideo { return YES; }
|
||||||
|
- (BOOL)iosEnableSimplerTitleInShortsVideoQualityPicker { return YES; }
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
|
// YTShortsProgress - https://github.com/PoomSmart/YTShortsProgress/
|
||||||
|
%hook YTShortsPlayerViewController
|
||||||
|
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
||||||
|
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTReelPlayerViewController
|
||||||
|
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
||||||
|
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTReelPlayerViewControllerSub
|
||||||
|
- (BOOL)shouldAlwaysEnablePlayerBar { return YES; }
|
||||||
|
- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTColdConfig
|
||||||
|
- (BOOL)iosEnableVideoPlayerScrubber { return YES; }
|
||||||
|
- (BOOL)mobileShortsTablnlinedExpandWatchOnDismiss { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%hook YTHotConfig
|
||||||
|
- (BOOL)enablePlayerBarForVerticalVideoWhenControlsHiddenInFullscreen { return YES; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
// Hide Shorts Cells - for uYou 3.0.4+ (PoomSmart/YTUnShorts)
|
||||||
|
%hook YTIElementRenderer
|
||||||
|
- (NSData *)elementData {
|
||||||
|
// Check if hideShortsCells is enabled
|
||||||
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"hideShortsCells"]) {
|
||||||
|
NSString *description = [self description];
|
||||||
|
|
||||||
|
BOOL hasShorts = ([description containsString:@"shorts_shelf"] || [description containsString:@"shorts_video_cell"] || [description containsString:@"6Shorts"]) && ![description containsString:@"history*"];
|
||||||
|
BOOL hasShortsInHistory = [description containsString:@"compact_video.eml"] && [description containsString:@"youtube_shorts_"];
|
||||||
|
|
||||||
|
if (hasShorts || hasShortsInHistory) {
|
||||||
|
return [NSData data];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
// Shorts Controls Overlay Options
|
// Shorts Controls Overlay Options
|
||||||
%hook _ASDisplayView
|
%hook _ASDisplayView
|
||||||
- (void)didMoveToWindow {
|
- (void)didMoveToWindow {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue