mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-01-11 22:40:19 +00:00
Improvements
This commit is contained in:
parent
05936f1426
commit
df964d39c3
1 changed files with 27 additions and 25 deletions
52
uYouPlus.xm
52
uYouPlus.xm
|
|
@ -41,6 +41,18 @@ static BOOL IsEnabled(NSString *key) {
|
|||
|
||||
//
|
||||
# pragma mark - uYou's patches
|
||||
// Crash fix for >= 18.43.4 (https://github.com/iCrazeiOS/uYouCrashFix)
|
||||
%hook YTPlayerViewController
|
||||
%new
|
||||
-(float)currentPlaybackRateForVarispeedSwitchController:(id)arg1 {
|
||||
return [[self activeVideo] playbackRate];
|
||||
}
|
||||
%new
|
||||
-(void)varispeedSwitchController:(id)arg1 didSelectRate:(float)arg2 {
|
||||
[[self activeVideo] setPlaybackRate:arg2];
|
||||
}
|
||||
%end
|
||||
|
||||
// Workaround for qnblackcat/uYouPlus#10
|
||||
%hook UIViewController
|
||||
- (UITraitCollection *)traitCollection {
|
||||
|
|
@ -130,20 +142,6 @@ static void repositionCreateTab(YTIGuideResponse *response) {
|
|||
}
|
||||
%end
|
||||
|
||||
// Fix uYou crashing in YouTube 18.43.4 and higher
|
||||
// uYouCrashFix - https://github.com/iCrazeiOS/uYouCrashFix
|
||||
%hook YTPlayerViewController
|
||||
%new
|
||||
-(float)currentPlaybackRateForVarispeedSwitchController:(id)arg1 {
|
||||
return [[self activeVideo] playbackRate];
|
||||
}
|
||||
|
||||
%new
|
||||
-(void)varispeedSwitchController:(id)arg1 didSelectRate:(float)arg2 {
|
||||
[[self activeVideo] setPlaybackRate:arg2];
|
||||
}
|
||||
%end
|
||||
|
||||
// uYouPlusExtra Logo - #183
|
||||
%group gDefaultYouTubeLogo
|
||||
%hook YTLogoHeaderViewController
|
||||
|
|
@ -993,22 +991,26 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
}
|
||||
%end
|
||||
|
||||
// Hide the (Remix Button) under the Video Player - Legacy Version - @arichorn
|
||||
// Hide the (Download) Button under the Video Player - Legacy Version - @arichorn
|
||||
%hook YTISlimMetadataButtonSupportedRenderers
|
||||
|
||||
/*
|
||||
- (id)slimButton_buttonRenderer {
|
||||
if (IsEnabled(@"hideRemixButton_enabled") && [self respondsToSelector:@selector(shouldHideButton)] && [self shouldHideButton]) {
|
||||
return nil;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
*/
|
||||
|
||||
- (BOOL)slimButton_isOfflineButton {
|
||||
return IsEnabled(@"hideAddToOfflineButton_enabled") ? NO : %orig;
|
||||
}
|
||||
%end
|
||||
%hook YTISlimMetadataButtonRenderer
|
||||
- (BOOL)isOfflineButtonPlaceholder {
|
||||
return IsEnabled(@"hideAddToOfflineButton_enabled") ? NO : %orig;
|
||||
}
|
||||
- (BOOL)hasIsOfflineButtonPlaceholder {
|
||||
return IsEnabled(@"hideAddToOfflineButton_enabled") ? NO : %orig;
|
||||
}
|
||||
- (BOOL)hasOfflineProgressText {
|
||||
return IsEnabled(@"hideAddToOfflineButton_enabled") ? NO : %orig;
|
||||
}
|
||||
- (BOOL)hasOfflineCompleteText {
|
||||
return IsEnabled(@"hideAddToOfflineButton_enabled") ? NO : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// App Settings Overlay Options
|
||||
%group gDisableAccountSection
|
||||
|
|
|
|||
Loading…
Reference in a new issue