Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
377 commits
Select commit Hold shift + click to select a range
442ef0e
Add new features, Fix known bugs, and Cleanup
Tonwalter888 May 22, 2026
90a8d5f
Fix CI errors
Tonwalter888 May 22, 2026
34dac6a
Cleanup
Tonwalter888 May 22, 2026
bc4aae6
Disables unworking things
Tonwalter888 May 22, 2026
293b350
Update Player.x
Tonwalter888 May 22, 2026
135a1c2
?
Tonwalter888 May 22, 2026
0feec43
Update Ads.x
Tonwalter888 May 23, 2026
507fe25
Update Feed.x
Tonwalter888 May 23, 2026
1420326
Update Ads.x
Tonwalter888 May 23, 2026
2535244
Update YouModSettings.x
Tonwalter888 May 23, 2026
04fbd95
What
Tonwalter888 May 23, 2026
baed0ed
Use the old way i guess
Tonwalter888 May 23, 2026
ac91600
bro
Tonwalter888 May 23, 2026
f348017
?
Tonwalter888 May 23, 2026
2fd96ef
Try to improve codes
Tonwalter888 May 23, 2026
4317e71
Fix download bugs
Tonwalter888 May 23, 2026
0e93f22
Fix bugs
Tonwalter888 May 23, 2026
493926e
Try
Tonwalter888 May 23, 2026
386d4ab
Fix “Watch again” in feed not filtering
Tonwalter888 May 24, 2026
1aef11e
Fix feed bugs and improve settings logic
Tonwalter888 May 24, 2026
f411501
bro
Tonwalter888 May 24, 2026
bbcd84d
Fix bugs
Tonwalter888 May 24, 2026
1118332
Try new way
Tonwalter888 May 25, 2026
67a48ed
Try
Tonwalter888 May 25, 2026
d5cfa79
Test new way
Tonwalter888 May 25, 2026
302eb0c
Update Headers.h
Tonwalter888 May 25, 2026
06b6575
??
Tonwalter888 May 25, 2026
8d3290b
Try
Tonwalter888 May 25, 2026
d916145
Update Player.x
Tonwalter888 May 25, 2026
a2246fc
Ok
Tonwalter888 May 25, 2026
5c5f047
Test
Tonwalter888 May 25, 2026
aa068db
?
Tonwalter888 May 25, 2026
92425ff
?
Tonwalter888 May 25, 2026
7af497b
?
Tonwalter888 May 25, 2026
52cb6e3
Try i guess
Tonwalter888 May 25, 2026
64aaf3a
?
Tonwalter888 May 25, 2026
4965ceb
Cleanup
Tonwalter888 May 25, 2026
560dd6f
oops
Tonwalter888 May 25, 2026
d634b86
Improve logic
Tonwalter888 May 25, 2026
ada49ef
oh
Tonwalter888 May 25, 2026
d37a940
debug
Tonwalter888 May 25, 2026
246ae23
Test
Tonwalter888 May 25, 2026
d60c92f
Cl
Tonwalter888 May 25, 2026
0da1042
Update
Tonwalter888 May 25, 2026
2898eea
oh
Tonwalter888 May 25, 2026
cfc00fd
bro
Tonwalter888 May 25, 2026
190e597
Give it a delay
Tonwalter888 May 25, 2026
9a0f32d
Improve logic
Tonwalter888 May 26, 2026
2d9f888
Cl
Tonwalter888 May 26, 2026
86953c8
Update Player.x
Tonwalter888 May 26, 2026
2a68176
Try new features
Tonwalter888 May 26, 2026
48763b2
Update Player.x
Tonwalter888 May 26, 2026
bd470ef
Improve logic
Tonwalter888 May 26, 2026
41c2310
Update Player.x
Tonwalter888 May 26, 2026
a8a4766
Update Player.x
Tonwalter888 May 26, 2026
602cf5d
Try
Tonwalter888 May 26, 2026
ccf3fdc
Try
Tonwalter888 May 26, 2026
b4e5fc0
Update Player.x
Tonwalter888 May 26, 2026
d72b28c
Update Player.x
Tonwalter888 May 26, 2026
49d2435
Update Player.x
Tonwalter888 May 26, 2026
c1915f5
Update Player.x
Tonwalter888 May 26, 2026
299298e
Update Player.x
Tonwalter888 May 26, 2026
4b54a10
Update Player.x
Tonwalter888 May 26, 2026
a744ce5
Update Player.x
Tonwalter888 May 26, 2026
f6f97ea
Fix things
Tonwalter888 May 27, 2026
395004b
Temp remove
Tonwalter888 May 27, 2026
7f0e324
Delay for audio track change
Tonwalter888 May 29, 2026
c9abc3d
Add audio track settings (like YTLite)
Tonwalter888 May 30, 2026
9f7ff8a
Forgot
Tonwalter888 May 30, 2026
8e9f70f
oh
Tonwalter888 May 30, 2026
c3f8b34
Fix bugs and try new things
Tonwalter888 May 31, 2026
c24a13c
Forgot
Tonwalter888 May 31, 2026
1031178
oh
Tonwalter888 May 31, 2026
205e553
Try new things
Tonwalter888 May 31, 2026
e2e709b
oh
Tonwalter888 May 31, 2026
97b03df
Remove duplicates
Tonwalter888 May 31, 2026
cd25ade
Try new method
Tonwalter888 May 31, 2026
28e7cb7
Try to improve things
Tonwalter888 May 31, 2026
f9ef53f
Try to fix download bug i guess
Tonwalter888 Jun 2, 2026
72ddd45
Fix
Tonwalter888 Jun 3, 2026
b37eb3b
Try
Tonwalter888 Jun 3, 2026
aa55eca
Try
Tonwalter888 Jun 3, 2026
3f400f7
bruh
Tonwalter888 Jun 3, 2026
392a36a
bro
Tonwalter888 Jun 3, 2026
247ae6e
Bro
Tonwalter888 Jun 3, 2026
82a37e7
Merge branch 'main' into feature/add-sponsorblock
Tonwalter888 Jun 5, 2026
6049d5e
Test
Tonwalter888 Jun 5, 2026
bf73231
oh
Tonwalter888 Jun 5, 2026
43b7a51
oh
Tonwalter888 Jun 5, 2026
cba4993
bruh
Tonwalter888 Jun 5, 2026
15ba8ef
Try to fix
Tonwalter888 Jun 5, 2026
f0dcb85
Test
Tonwalter888 Jun 5, 2026
69b3f5f
bro
Tonwalter888 Jun 5, 2026
d2c8fbe
Fix
Tonwalter888 Jun 5, 2026
71ab6ad
Remove some
Tonwalter888 Jun 5, 2026
83ae313
Try
Tonwalter888 Jun 5, 2026
5cac0e2
Fix
Tonwalter888 Jun 5, 2026
7f9177e
Fix
Tonwalter888 Jun 5, 2026
853e67a
huh
Tonwalter888 Jun 5, 2026
e87aec5
?
Tonwalter888 Jun 5, 2026
7a5359b
Cl
Tonwalter888 Jun 5, 2026
5a216e4
Huh?
Tonwalter888 Jun 5, 2026
bed342f
I guess
Tonwalter888 Jun 5, 2026
69f6791
Improve logic
Tonwalter888 Jun 5, 2026
e6cf629
Fix
Tonwalter888 Jun 6, 2026
7ce390f
Fix bugs
Tonwalter888 Jun 6, 2026
fef9c18
Oops
Tonwalter888 Jun 6, 2026
b8655b8
Update Apperence.x
Tonwalter888 Jun 6, 2026
b847304
Update Headers.h
Tonwalter888 Jun 6, 2026
20e5acf
Update Apperence.x
Tonwalter888 Jun 6, 2026
0d8beaf
Fix
Tonwalter888 Jun 6, 2026
12de5b9
Try
Tonwalter888 Jun 6, 2026
b1f58e3
Fix download not working in older YT versions
Tonwalter888 Jun 6, 2026
7f723b9
Cleanup Download.x
Tonwalter888 Jun 6, 2026
6e31c60
?
Tonwalter888 Jun 6, 2026
ecf98de
Cleanup and fix things
Tonwalter888 Jun 6, 2026
f5fc997
Fix CI errors
Tonwalter888 Jun 6, 2026
d022052
Fix
Tonwalter888 Jun 6, 2026
a523361
Fix bugs
Tonwalter888 Jun 7, 2026
b52018d
oops
Tonwalter888 Jun 7, 2026
0a1e9ed
oh
Tonwalter888 Jun 7, 2026
41d00f0
Try
Tonwalter888 Jun 8, 2026
df87340
Update Player.x
Tonwalter888 Jun 8, 2026
471dfff
Fix
Tonwalter888 Jun 8, 2026
6e72f73
Update Player.x
Tonwalter888 Jun 8, 2026
bfcdd42
??????
Tonwalter888 Jun 10, 2026
f81bb17
Add missing icons
Tonwalter888 Jun 10, 2026
d314d19
Add remaining and fix things
Tonwalter888 Jun 10, 2026
b1c6e69
Fix things
Tonwalter888 Jun 10, 2026
6ccd011
Fix bugs
Tonwalter888 Jun 10, 2026
dedf92a
oh
Tonwalter888 Jun 11, 2026
8499849
Fix
Tonwalter888 Jun 11, 2026
447acc9
Prepare for new feature
Tonwalter888 Jun 11, 2026
ef14cba
oops
Tonwalter888 Jun 11, 2026
82e4afc
A bit faster
Tonwalter888 Jun 11, 2026
cc38ea8
?
Tonwalter888 Jun 11, 2026
0b5601a
Update workflow
Tonwalter888 Jun 11, 2026
a181ed0
/
Tonwalter888 Jun 11, 2026
0669973
Merge branch 'main' into feature/add-sponsorblock
Tonwalter888 Jun 11, 2026
61385fc
Oh
Tonwalter888 Jun 11, 2026
7ea0a82
Fix bugs
Tonwalter888 Jun 11, 2026
44da25f
Update
Tonwalter888 Jun 12, 2026
9239d42
Add new features, Fix things, Restructure the settings
Tonwalter888 Jun 13, 2026
db2b849
Oh
Tonwalter888 Jun 13, 2026
bdca331
?
Tonwalter888 Jun 13, 2026
db83f46
Fix bugs
Tonwalter888 Jun 13, 2026
be37939
Oh
Tonwalter888 Jun 13, 2026
46a4a23
Fix download
Tonwalter888 Jun 13, 2026
cf1f0ea
Oh
Tonwalter888 Jun 13, 2026
7234ca9
fix: dismiss pills in app switcher, anchor pills above tabbar, add ta…
grohit1810 Jun 13, 2026
7f32542
Prepare
Tonwalter888 Jun 13, 2026
0f45d54
Update Headers.h
Tonwalter888 Jun 14, 2026
d971f01
Update Tabbar.x
Tonwalter888 Jun 14, 2026
1aed94f
Try
Tonwalter888 Jun 14, 2026
a4f2728
Update Ads.x
Tonwalter888 Jun 14, 2026
3b0fae9
Fix things and test
Tonwalter888 Jun 14, 2026
ffa9e48
Try
Tonwalter888 Jun 14, 2026
a08bb1f
Oh
Tonwalter888 Jun 14, 2026
7049d5f
Fix
Tonwalter888 Jun 14, 2026
8def3df
Add new features and fix bugs
Tonwalter888 Jun 14, 2026
2d7de95
Fix
Tonwalter888 Jun 14, 2026
ae8a419
Fix
Tonwalter888 Jun 14, 2026
5c989e3
Fix
Tonwalter888 Jun 14, 2026
f8a4254
?
Tonwalter888 Jun 14, 2026
c4c1b0c
Fix new ads not removing
Tonwalter888 Jun 14, 2026
7b3e5db
Fix shorts shelf header not removing on iPhone layout
Tonwalter888 Jun 14, 2026
c6380ca
Fix bugs
Tonwalter888 Jun 14, 2026
3ca0a3e
Fix
Tonwalter888 Jun 15, 2026
e0d9114
Update Ads.x
Tonwalter888 Jun 15, 2026
5600287
Revert
Tonwalter888 Jun 15, 2026
92af3f4
Update Ads.x
Tonwalter888 Jun 15, 2026
1ca1818
Update Ads.x
Tonwalter888 Jun 15, 2026
2506ff6
Remove
Tonwalter888 Jun 15, 2026
bbc7cff
Fix
Tonwalter888 Jun 16, 2026
f30b7de
Try
Tonwalter888 Jun 16, 2026
4beb4d6
Oh
Tonwalter888 Jun 16, 2026
f14e278
Fix bugs
Tonwalter888 Jun 17, 2026
dd190d4
Fix bugs
Tonwalter888 Jun 17, 2026
8103de8
Update Player.x
Tonwalter888 Jun 17, 2026
5b38cd0
Update Player.x
Tonwalter888 Jun 17, 2026
d8543b7
Update Player.x
Tonwalter888 Jun 17, 2026
86ca16d
Update Player.x
Tonwalter888 Jun 17, 2026
d3ef753
Better logic
Tonwalter888 Jun 17, 2026
8603a3d
Update Player.x
Tonwalter888 Jun 17, 2026
19a1fd2
Try
Tonwalter888 Jun 17, 2026
712159a
what
Tonwalter888 Jun 17, 2026
ba3a0e8
Improve logic
Tonwalter888 Jun 17, 2026
5fc4a93
????
Tonwalter888 Jun 17, 2026
42b78ef
Fix
Tonwalter888 Jun 17, 2026
b575985
Try AI code
Tonwalter888 Jun 17, 2026
e7809b2
Fix bugs
Tonwalter888 Jun 17, 2026
dd30c48
Update Feed.x
Tonwalter888 Jun 18, 2026
a087266
Update Sideloading.x
Tonwalter888 Jun 18, 2026
cd66c14
Update Ads.x
Tonwalter888 Jun 18, 2026
30c2cf8
Fix
Tonwalter888 Jun 18, 2026
fb38d1c
Use new logic
Tonwalter888 Jun 18, 2026
ef2f40e
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
b25b46b
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
18061ad
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
0889d42
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
231aec8
Fix
Tonwalter888 Jun 18, 2026
9b0b6bc
Try
Tonwalter888 Jun 18, 2026
cb5896e
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
1e0fef1
Try
Tonwalter888 Jun 18, 2026
bf718cb
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
2e2f972
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
34c7f50
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
0259196
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
9e8b5f3
Update FixPlaybackIssues.x
Tonwalter888 Jun 18, 2026
645f04d
fix: re-render seekbar markers on player layout transitions, anchor p…
grohit1810 Jun 18, 2026
379938a
Fix things
Tonwalter888 Jun 18, 2026
84afa43
Fix CI errors
Tonwalter888 Jun 18, 2026
1c397f3
Fix
Tonwalter888 Jun 18, 2026
25daf5c
Temp disabled
Tonwalter888 Jun 18, 2026
6daf82e
?
Tonwalter888 Jun 18, 2026
9db19c5
oh
Tonwalter888 Jun 18, 2026
3886a9e
Fix settings bugs
Tonwalter888 Jun 18, 2026
5ccb7c2
Forgot
Tonwalter888 Jun 18, 2026
6ba6169
Improve logic
Tonwalter888 Jun 18, 2026
aacfa82
Fix
Tonwalter888 Jun 18, 2026
6802e38
Fix
Tonwalter888 Jun 18, 2026
4282ac1
add custom overlay button registry; move SponsorBlock + download into it
grohit1810 Jun 18, 2026
8e354e5
Improve OLED theme
Tonwalter888 Jun 18, 2026
e70dbd8
Oh
Tonwalter888 Jun 18, 2026
8025504
Fix OLED theme bugs and cleanup
Tonwalter888 Jun 19, 2026
13a7d0f
oops
Tonwalter888 Jun 19, 2026
df937b5
oh
Tonwalter888 Jun 19, 2026
a484466
oh
Tonwalter888 Jun 19, 2026
3a0b625
bruh
Tonwalter888 Jun 19, 2026
279f721
temp disabled
Tonwalter888 Jun 19, 2026
4802cf3
Fix
Tonwalter888 Jun 19, 2026
81e2197
Add download button to Shorts
Tonwalter888 Jun 19, 2026
c4303a6
Fix
Tonwalter888 Jun 19, 2026
4713715
?
Tonwalter888 Jun 19, 2026
5e6319b
Oh
Tonwalter888 Jun 19, 2026
f5163d6
Fix things and remove unstable features
Tonwalter888 Jun 19, 2026
78e204a
Fix Shorts download button not working
Tonwalter888 Jun 20, 2026
104ee7a
Fix
Tonwalter888 Jun 20, 2026
5c08a10
Fix button layout
Tonwalter888 Jun 20, 2026
065fe7a
Fix layout
Tonwalter888 Jun 20, 2026
34939e5
Fix bugs
Tonwalter888 Jun 20, 2026
f3ff3e1
Fix bugs
Tonwalter888 Jun 20, 2026
fc7f2eb
Correct logic
Tonwalter888 Jun 20, 2026
ade31d4
Temp fix
Tonwalter888 Jun 20, 2026
906d5d2
Fix things
Tonwalter888 Jun 20, 2026
6d15368
Oh
Tonwalter888 Jun 20, 2026
516ad00
Fix bugs
Tonwalter888 Jun 21, 2026
1e6df44
Fix things and Prepare for new features
Tonwalter888 Jun 21, 2026
b6ec73d
Fix CI errors
Tonwalter888 Jun 21, 2026
730a732
what
Tonwalter888 Jun 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 13 additions & 35 deletions .github/workflows/ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,6 @@ on:
required: false
type: boolean

ytholdspeed:
description: "Integrate YTHoldForSpeed"
default: true
required: false
type: boolean

youchoose:
description: "Integrate YouChooseQuality"
default: true
required: false
type: boolean

youshare:
description: "Integrate YouShare"
default: true
Expand Down Expand Up @@ -148,12 +136,14 @@ jobs:
- name: Install MEGA downloader
if: ${{ startsWith(inputs.ipa_url, 'https://mega.nz/') }}
run: brew install megatools

- name: Download IPA from Mega share link
if: ${{ startsWith(inputs.ipa_url, 'https://mega.nz/') }}
env:
IPA_URL: ${{ inputs.ipa_url }}
run: |
megadl --no-progress --path youtube.ipa "$IPA_URL"

- name: Download IPA from direct URL
if: ${{ !startsWith(inputs.ipa_url, 'https://mega.nz/') }}
env:
Expand Down Expand Up @@ -287,6 +277,10 @@ jobs:
if: ${{ inputs.youspeed }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouSpeed.git

- name: Clone UncappedAVPlayer
if: ${{ inputs.youspeed }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/UncappedAVPlayer.git

- name: Clone DontEatMyContent
if: ${{ inputs.demc }}
run: git clone --quiet --depth=1 https://github.com/therealFoxster/DontEatMyContent.git
Expand Down Expand Up @@ -315,14 +309,6 @@ jobs:
if: ${{ inputs.youslider && steps.cache-alderis.outputs.cache-hit != 'true' }}
run: git clone --quiet --depth=1 https://github.com/hbang/Alderis.git

- name: Clone YTHoldForSpeed
if: ${{ inputs.ytholdspeed }}
run: git clone --quiet --depth=1 https://github.com/joshuaseltzer/YTHoldForSpeed.git

- name: Clone YouChooseQuality
if: ${{ inputs.youchoose }}
run: git clone --quiet https://github.com/PoomSmart/YouChooseQuality.git

- name: Clone YouShare
if: ${{ inputs.youshare }}
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YouShare.git
Expand Down Expand Up @@ -409,6 +395,13 @@ jobs:
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youspeed.deb

- name: Build UncappedAVPlayer
if: ${{ inputs.youspeed }}
run: |
cd UncappedAVPlayer
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/uncapavplayer.deb

- name: Build DontEatMyContent
if: ${{ inputs.demc }}
run: |
Expand Down Expand Up @@ -444,21 +437,6 @@ jobs:
make clean package DEBUG=0 FINALPACKAGE=1 ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/alderis.deb

- name: Build YTHoldForSpeed
if: ${{ inputs.ytholdspeed }}
run: |
cd YTHoldForSpeed
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless TARGET=iphone:clang:latest:15.0 ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/ytholdspeed.deb

- name: Build YouChooseQuality
if: ${{ inputs.youchoose }}
run: |
cd YouChooseQuality
git checkout 1585a3691b2ef0b59d42c40c31639fd8b79e2cd4
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youchoose.deb

- name: Build YouShare
if: ${{ inputs.youshare }}
run: |
Expand Down
86 changes: 79 additions & 7 deletions Files/Ads.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ static BOOL isProductList(YTICommand *command) {
NSString *getAdString(NSString *description) {
for (NSString *str in @[
@"brand_promo",
@"brand_video_singleton",
@"carousel_footered_layout",
@"carousel_headered_layout",
@"eml.expandable_metadata",
Expand All @@ -31,6 +32,7 @@ NSString *getAdString(NSString *description) {
@"text_search_ad",
@"video_display_full_layout",
@"video_display_full_buttoned_layout"
// @"video_display_button_group_layout"
])
if ([description containsString:str]) return str;
return nil;
Expand All @@ -51,18 +53,70 @@ static BOOL isAdRenderer(YTIElementRenderer *elementRenderer, int kind) {
static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItemSectionRenderer *> *array) {
NSMutableArray <YTIItemSectionRenderer *> *newArray = [array mutableCopy];
NSIndexSet *removeIndexes = [newArray indexesOfObjectsPassingTest:^BOOL(YTIItemSectionRenderer *sectionRenderer, NSUInteger idx, BOOL *stop) {
// Filter shelf renderer items (ads and shorts)
if ([sectionRenderer isKindOfClass:%c(YTIShelfRenderer)]) {
YTIShelfSupportedRenderers *content = ((YTIShelfRenderer *)sectionRenderer).content;
YTIHorizontalListRenderer *horizontalListRenderer = content.horizontalListRenderer;
NSMutableArray <YTIHorizontalListSupportedRenderers *> *itemsArray = horizontalListRenderer.itemsArray;
NSIndexSet *removeItemsArrayIndexes = [itemsArray indexesOfObjectsPassingTest:^BOOL(YTIHorizontalListSupportedRenderers *horizontalListSupportedRenderers, NSUInteger idx2, BOOL *stop2) {
YTIElementRenderer *elementRenderer = horizontalListSupportedRenderers.elementRenderer;
return isAdRenderer(elementRenderer, 4);
// Filter ads
if (isAdRenderer(elementRenderer, 4)) return YES;
NSString *description = [elementRenderer description];
// Filter shorts
if (IS_ENABLED(HideShortsShelf)) {
if (IS_ENABLED(KeepShortsSubscript)) {
if ([description containsString:@"shorts_video_cell.eml"] && ![description containsString:@"subscriptions-shorts-shelf-item"]) return YES;
} else {
if ([description containsString:@"shorts_video_cell.eml"]) return YES;
}
if ([description containsString:@"shorts_grid_shelf_footer.eml"] || ([description containsString:@"shelf_header.eml"] && [description containsString:@"youtube_shorts"])) return YES;
}
// Filter feed posts
if (IS_ENABLED(HideFeedPost) && ([description containsString:@"poll_post_root.eml"] || [description containsString:@"options_post_root.eml"] || [description containsString:@"images_post_root_slim.eml"] || [description containsString:@"options_post_responsive_root.eml"] || [description containsString:@"post_base_wrapper_slim.eml"])) {
return YES;
}
return NO;
}];
[itemsArray removeObjectsAtIndexes:removeItemsArrayIndexes];
}
if (![sectionRenderer isKindOfClass:%c(YTIItemSectionRenderer)])
return NO;

// Filter item section renderers
if (![sectionRenderer isKindOfClass:%c(YTIItemSectionRenderer)]) return NO;

NSString *description = [sectionRenderer description];

// Filter shorts shelf
BOOL isShortsShelf = [description containsString:@"shorts_shelf.eml"];
BOOL isHistory = [description containsString:@"history-shorts-shelf-item"];
if (IS_ENABLED(HideShortsShelf) && IS_ENABLED(KeepShortsSubscript)) {
if (isShortsShelf && ![description containsString:@"subscriptions-shorts-shelf-item"] && !isHistory) {
return YES;
}
} else if (IS_ENABLED(HideShortsShelf)) {
if (isShortsShelf && !isHistory) {
return YES;
}
}

// Filter horizontal shelf
if (IS_ENABLED(HideHoriShelf) && [description containsString:@"horizontal_shelf.eml"] &&
![description containsString:@"UCYfdidRxbB8Qhf0Nx7ioOYw"] &&
![description containsString:@"FElibrary"] &&
![description containsString:@"mini_game_card.eml"] &&
![description containsString:@"FEplaylist_aggregation"]) {
return YES;
}

// Filter feed posts
if (IS_ENABLED(HideFeedPost) && ([description containsString:@"poll_post_root.eml"] || [description containsString:@"options_post_root.eml"] || [description containsString:@"images_post_root_slim.eml"] || [description containsString:@"options_post_responsive_root.eml"] || [description containsString:@"post_base_wrapper_slim.eml"])) {
return YES;
}

if (IS_ENABLED(HideGenMusicShelf) && [description containsString:@"feed_nudge.eml"]) {
return YES;
}

NSMutableArray <YTIItemSectionSupportedRenderers *> *contentsArray = sectionRenderer.contentsArray;
if (contentsArray.count > 1) {
NSIndexSet *removeContentsArrayIndexes = [contentsArray indexesOfObjectsPassingTest:^BOOL(YTIItemSectionSupportedRenderers *sectionSupportedRenderers, NSUInteger idx2, BOOL *stop2) {
Expand All @@ -73,7 +127,10 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
}
YTIItemSectionSupportedRenderers *firstObject = [contentsArray firstObject];
YTIElementRenderer *elementRenderer = firstObject.elementRenderer;
return isAdRenderer(elementRenderer, 2);
if (isAdRenderer(elementRenderer, 2)) {
return YES;
}
return NO;
}];
[newArray removeObjectsAtIndexes:removeIndexes];
return newArray;
Expand Down Expand Up @@ -121,25 +178,40 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
- (void)adPlaying:(id)ad {}
%end

// Live video type = 4 and Live preview = 7
%hook YTReelDataSource
- (YTReelModel *)makeContentModelForEntry:(id)entry {
YTReelModel *model = %orig;
YTReelPlayerResponder *responder = [model valueForKey:@"_reelPlayerResponder"];
if ([model respondsToSelector:@selector(videoType)] && model.videoType == 3)
return nil;
if ([responder.parentResponder isKindOfClass:%c(YTShortsAdsPlayerViewController)])
return nil;
if ([model respondsToSelector:@selector(videoType)] && (model.videoType == 4 || model.videoType == 7) && IS_ENABLED(RemoveShortsLive))
return nil;
return model;
}
%end

%hook YTReelInfinitePlaybackDataSource
- (YTReelModel *)makeContentModelForEntry:(id)entry {
YTReelModel *model = %orig;
YTReelPlayerResponder *responder = [model valueForKey:@"_reelPlayerResponder"];
if ([model respondsToSelector:@selector(videoType)] && model.videoType == 3)
return nil;
if ([responder.parentResponder isKindOfClass:%c(YTShortsAdsPlayerViewController)])
return nil;
if ([model respondsToSelector:@selector(videoType)] && (model.videoType == 4 || model.videoType == 7) && IS_ENABLED(RemoveShortsLive))
return nil;
return model;
}
- (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;
YTReelPlayerResponder *responder = [obj valueForKey:@"_reelPlayerResponder"];
if ([obj respondsToSelector:@selector(videoType)] && obj.videoType == 3) return YES;
if ([responder.parentResponder isKindOfClass:%c(YTShortsAdsPlayerViewController)]) return YES;
if ([obj respondsToSelector:@selector(videoType)] && (obj.videoType == 4 || obj.videoType == 7) && IS_ENABLED(RemoveShortsLive)) return YES;
return NO;
}]];
%orig;
}
Expand All @@ -164,6 +236,7 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
%hook YTMainAppVideoPlayerOverlayViewController
- (void)playerOverlayProvider:(YTPlayerOverlayProvider *)provider didInsertPlayerOverlay:(YTPlayerOverlay *)overlay {
if ([[overlay overlayIdentifier] isEqualToString:@"player_overlay_product_in_video"]) return;
if ([[overlay overlayIdentifier] isEqualToString:@"player_overlay_paid_content"] && IS_ENABLED(HidePaidPromoOverlay)) return;
%orig;
}
%end
Expand All @@ -183,7 +256,6 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
- (void)didMoveToWindow {
%orig;
if ([self.accessibilityIdentifier isEqualToString:@"eml.expandable_metadata.vpp"]) [self removeFromSuperview];
if ([self.accessibilityIdentifier isEqualToString:@"eml.ad_layout.full_width_square_image_layout"]) self.hidden = YES;
}
%end

Expand Down Expand Up @@ -230,4 +302,4 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
// Survey
%hook YTSurveyController
- (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {}
%end
%end
Loading