mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-22 12:51:59 +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
|
%hook YTIPlayerResponse
|
||||||
- (BOOL)isMonetized { return NO; }
|
- (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
|
%end
|
||||||
|
|
||||||
%hook YTAdShieldUtils
|
%hook YTAdShieldUtils
|
||||||
|
|
@ -249,15 +262,6 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
||||||
%hook MDXSession
|
%hook MDXSession
|
||||||
- (void)adPlaying:(id)ad {}
|
- (void)adPlaying:(id)ad {}
|
||||||
%end
|
%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
|
%end
|
||||||
|
|
||||||
// uYou AdBlock Workaround (Note: disables uYou's "Remove YouTube Ads" Option) - @PoomSmart, @arichornlover & @Dodieboy
|
// uYou AdBlock Workaround (Note: disables uYou's "Remove YouTube Ads" Option) - @PoomSmart, @arichornlover & @Dodieboy
|
||||||
|
|
@ -268,6 +272,18 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
||||||
%end
|
%end
|
||||||
%hook YTIPlayerResponse
|
%hook YTIPlayerResponse
|
||||||
- (BOOL)isMonetized { return NO; }
|
- (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
|
%end
|
||||||
%hook YTAdShieldUtils
|
%hook YTAdShieldUtils
|
||||||
+ (id)spamSignalsDictionary { return @{}; }
|
+ (id)spamSignalsDictionary { return @{}; }
|
||||||
|
|
@ -289,14 +305,6 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
||||||
%hook MDXSession
|
%hook MDXSession
|
||||||
- (void)adPlaying:(id)ad {}
|
- (void)adPlaying:(id)ad {}
|
||||||
%end
|
%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) {
|
NSString *getAdString(NSString *description) {
|
||||||
if ([description containsString:@"brand_promo"])
|
if ([description containsString:@"brand_promo"])
|
||||||
return @"brand_promo";
|
return @"brand_promo";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue