mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Integrate YouTube-X correction
From 633b29abc2 (diff-914ed5d8e810b5014376e82df221a7dabfebf84261d4d6450ede10c444ecbfc8R117)
This commit is contained in:
parent
328e7b122a
commit
79ed1669a2
1 changed files with 10 additions and 0 deletions
|
|
@ -305,6 +305,14 @@ YTMainAppControlsOverlayView *controlsOverlayView;
|
|||
%hook MDXSession
|
||||
- (void)adPlaying:(id)ad {}
|
||||
%end
|
||||
%hook YTReelInfinitePlaybackDataSource
|
||||
- (YTReelModel *)makeContentModelForEntry:(id)entry {
|
||||
YTReelModel *model = %orig;
|
||||
if ([model respondsToSelector:@selector(videoType)] && model.videoType == 3)
|
||||
return nil;
|
||||
return model;
|
||||
}
|
||||
%end
|
||||
NSString *getAdString(NSString *description) {
|
||||
if ([description containsString:@"brand_promo"])
|
||||
return @"brand_promo";
|
||||
|
|
@ -312,6 +320,8 @@ NSString *getAdString(NSString *description) {
|
|||
return @"carousel_footered_layout";
|
||||
if ([description containsString:@"carousel_headered_layout"])
|
||||
return @"carousel_headered_layout";
|
||||
if ([description containsString:@"eml.expandable_metadata"])
|
||||
return @"eml.expandable_metadata";
|
||||
if ([description containsString:@"feed_ad_metadata"])
|
||||
return @"feed_ad_metadata";
|
||||
if ([description containsString:@"full_width_portrait_image_layout"])
|
||||
|
|
|
|||
Loading…
Reference in a new issue