mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-01-11 22:40:19 +00:00
Update PoomSmart’s YouTube-X to v1.7.5
This commit is contained in:
parent
e2579163ef
commit
b42ec297ba
1 changed files with 25 additions and 17 deletions
|
|
@ -222,6 +222,19 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
|||
|
||||
%hook YTIPlayerResponse
|
||||
- (BOOL)isMonetized { return NO; }
|
||||
%new(@@:)
|
||||
- (NSMutableArray *)playerAdsArray {
|
||||
return [NSMutableArray array];
|
||||
}
|
||||
%new(@@:)
|
||||
- (NSMutableArray *)adSlotsArray {
|
||||
return [NSMutableArray array];
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTIClientMdxGlobalConfig
|
||||
%new(B@:)
|
||||
- (BOOL)enableSkippableAd { return YES; }
|
||||
%end
|
||||
|
||||
%hook YTAdShieldUtils
|
||||
|
|
@ -249,15 +262,6 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
|||
%hook MDXSession
|
||||
- (void)adPlaying:(id)ad {}
|
||||
%end
|
||||
|
||||
%hook YTReelInfinitePlaybackDataSource
|
||||
- (void)setReels:(NSMutableOrderedSet <YTReelModel *> *)reels {
|
||||
[reels removeObjectsAtIndexes:[reels indexesOfObjectsPassingTest:^BOOL(YTReelModel *obj, NSUInteger idx, BOOL *stop) {
|
||||
return [obj respondsToSelector:@selector(videoType)] ? obj.videoType == 3 : NO;
|
||||
}]];
|
||||
%orig;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// uYou AdBlock Workaround (Note: disables uYou's "Remove YouTube Ads" Option) - @PoomSmart, @arichornlover & @Dodieboy
|
||||
|
|
@ -268,6 +272,18 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
|||
%end
|
||||
%hook YTIPlayerResponse
|
||||
- (BOOL)isMonetized { return NO; }
|
||||
%new(@@:)
|
||||
- (NSMutableArray *)playerAdsArray {
|
||||
return [NSMutableArray array];
|
||||
}
|
||||
%new(@@:)
|
||||
- (NSMutableArray *)adSlotsArray {
|
||||
return [NSMutableArray array];
|
||||
}
|
||||
%end
|
||||
%hook YTIClientMdxGlobalConfig
|
||||
%new(B@:)
|
||||
- (BOOL)enableSkippableAd { return YES; }
|
||||
%end
|
||||
%hook YTAdShieldUtils
|
||||
+ (id)spamSignalsDictionary { return @{}; }
|
||||
|
|
@ -289,14 +305,6 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
|||
%hook MDXSession
|
||||
- (void)adPlaying:(id)ad {}
|
||||
%end
|
||||
%hook YTReelInfinitePlaybackDataSource
|
||||
- (void)setReels:(NSMutableOrderedSet <YTReelModel *> *)reels {
|
||||
[reels removeObjectsAtIndexes:[reels indexesOfObjectsPassingTest:^BOOL(YTReelModel *obj, NSUInteger idx, BOOL *stop) {
|
||||
return [obj respondsToSelector:@selector(videoType)] ? obj.videoType == 3 : NO;
|
||||
}]];
|
||||
%orig;
|
||||
}
|
||||
%end
|
||||
NSString *getAdString(NSString *description) {
|
||||
if ([description containsString:@"brand_promo"])
|
||||
return @"brand_promo";
|
||||
|
|
|
|||
Loading…
Reference in a new issue