Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
481 commits
Select commit Hold shift + click to select a range
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
3fac93d
Improve Download logic and Cleanup AI crap codes
Tonwalter888 Jun 22, 2026
b6cede0
More cleanup and fix bugs
Tonwalter888 Jun 22, 2026
8532c72
oops
Tonwalter888 Jun 22, 2026
08ccb40
Forgot
Tonwalter888 Jun 22, 2026
08d37bd
Fix bugs and Cleanup
Tonwalter888 Jun 22, 2026
a908a86
Oh
Tonwalter888 Jun 22, 2026
c08aec1
Better
Tonwalter888 Jun 22, 2026
b04afd1
What
Tonwalter888 Jun 22, 2026
a01146e
Fix bugs
Tonwalter888 Jun 22, 2026
9415889
Remove useless logic
Tonwalter888 Jun 23, 2026
7eb94d0
Fix bugs and crashes
Tonwalter888 Jun 23, 2026
36cba7a
Fix CI errors
Tonwalter888 Jun 23, 2026
2ac3cff
Fix
Tonwalter888 Jun 23, 2026
aaa90f2
Cl
Tonwalter888 Jun 23, 2026
5ca95ec
Fix audio bugs
Tonwalter888 Jun 23, 2026
8f5f686
Remove oosmetrics
Tonwalter888 Jun 24, 2026
4833e16
Adds new ads ID (Thanks to @MCTMS8 for helping)
Tonwalter888 Jun 24, 2026
c699e75
Actually fix crashes
Tonwalter888 Jun 24, 2026
5517483
Fix
Tonwalter888 Jun 24, 2026
063faad
Fix settings bugs (not blue back button)
Tonwalter888 Jun 24, 2026
be92d24
Fix crashes and blue button bug
Tonwalter888 Jun 24, 2026
aaa2410
Name
Tonwalter888 Jun 24, 2026
45afd82
Fix CI errors
Tonwalter888 Jun 24, 2026
01e0bc8
Oh
Tonwalter888 Jun 24, 2026
426c37a
Fix bugs
Tonwalter888 Jun 24, 2026
2a6e6e9
Update Download.x
Tonwalter888 Jun 25, 2026
606f040
Test new spoof
Tonwalter888 Jun 25, 2026
f4b77e9
Fix CI errors
Tonwalter888 Jun 25, 2026
29e087d
plz
Tonwalter888 Jun 25, 2026
a10f6d8
Use old method
Tonwalter888 Jun 25, 2026
2f884d8
Better reload logic
Tonwalter888 Jun 25, 2026
23bf87f
backup
Tonwalter888 Jun 25, 2026
99115d1
Add new features and Fix OLED bugs
Tonwalter888 Jun 27, 2026
6b2610a
Fix
Tonwalter888 Jun 27, 2026
576bd9e
Fix OLED bugs
Tonwalter888 Jun 27, 2026
c9af09d
Fix crashes
Tonwalter888 Jun 27, 2026
5cad67a
Correct things
Tonwalter888 Jun 27, 2026
a14ec27
Oh
Tonwalter888 Jun 27, 2026
b1e2612
Fix bugs and crashes
Tonwalter888 Jun 27, 2026
eef4967
Improve SponsorBlock segments view handling
Tonwalter888 Jun 27, 2026
6d1386c
Revert some codes
Tonwalter888 Jun 27, 2026
49b3a41
Try
Tonwalter888 Jun 27, 2026
511ade0
Fix
Tonwalter888 Jun 27, 2026
96f6ae8
Fix bugs
Tonwalter888 Jun 27, 2026
8f9f1a0
Fix bugs and Cleanup
Tonwalter888 Jun 27, 2026
31429fb
Oh
Tonwalter888 Jun 27, 2026
b9d622f
Fix some OLED bugs
Tonwalter888 Jun 27, 2026
0d7beaa
Fix OLED theme
Tonwalter888 Jun 27, 2026
1636d9c
Cleanup Apperence.x
Tonwalter888 Jun 27, 2026
0175060
Huh?
Tonwalter888 Jun 27, 2026
8f40c37
Sync with the main branch
Tonwalter888 Jun 27, 2026
203aedf
Fix bugs and Cleanup
Tonwalter888 Jun 27, 2026
b3e846c
Revert
Tonwalter888 Jun 27, 2026
a2140b4
Try
Tonwalter888 Jun 28, 2026
de1ace2
FIx bugs
Tonwalter888 Jun 28, 2026
2884e1f
?
Tonwalter888 Jun 28, 2026
a84ab71
Float
Tonwalter888 Jun 28, 2026
1b9372f
Try
Tonwalter888 Jun 28, 2026
8c01c98
YAYYYY, fix segments bugs
Tonwalter888 Jun 28, 2026
80959aa
oops
Tonwalter888 Jun 28, 2026
385959c
Oh
Tonwalter888 Jun 28, 2026
ffd7908
Try and revert
Tonwalter888 Jun 28, 2026
c265486
Merge branch 'main' into feature/add-sponsorblock
Tonwalter888 Jun 28, 2026
bbc7117
Fix download audio bugs
Tonwalter888 Jun 28, 2026
b72e1db
Oh
Tonwalter888 Jun 28, 2026
8d00455
Add new ads ID
Tonwalter888 Jun 29, 2026
e958b1a
Add Sponsorblock segments to miniplayer
Tonwalter888 Jun 30, 2026
8949ed5
Fix
Tonwalter888 Jun 30, 2026
e1203f0
Update Ads.x
Tonwalter888 Jun 30, 2026
6bf4d32
Update Feed.x
Tonwalter888 Jun 30, 2026
f6128c0
F theos
Tonwalter888 Jun 30, 2026
12d2058
Update Ads.x
Tonwalter888 Jun 30, 2026
016abca
Fix
Tonwalter888 Jun 30, 2026
ceba241
Update SponsorBlockUI.x
Tonwalter888 Jun 30, 2026
07629b1
Try to fix
Tonwalter888 Jun 30, 2026
5abd18f
Fix bugs
Tonwalter888 Jun 30, 2026
3e18f6f
Try
Tonwalter888 Jun 30, 2026
ef036e2
Try new method
Tonwalter888 Jun 30, 2026
ebb0039
Oh
Tonwalter888 Jun 30, 2026
c04cc74
Fix crashes
Tonwalter888 Jun 30, 2026
02c80d4
Fix things
Tonwalter888 Jul 1, 2026
3758f69
Fix
Tonwalter888 Jul 1, 2026
64c2e36
Revert
Tonwalter888 Jul 1, 2026
847a1ef
Try
Tonwalter888 Jul 1, 2026
fae6cfd
Add mute button
Tonwalter888 Jul 1, 2026
10c7117
Oh
Tonwalter888 Jul 1, 2026
88f5620
Fix
Tonwalter888 Jul 1, 2026
7d07321
Fix mute icon size
Tonwalter888 Jul 1, 2026
54cd715
Add speed button
Tonwalter888 Jul 1, 2026
dd2a5fd
Add settings to buttons and Cleanup
Tonwalter888 Jul 1, 2026
b4d8b53
oops
Tonwalter888 Jul 1, 2026
feb69ec
Fix
Tonwalter888 Jul 1, 2026
e11312d
Fix
Tonwalter888 Jul 1, 2026
ef71ce6
Typo
Tonwalter888 Jul 1, 2026
fe36477
Fix bugs and crashes
Tonwalter888 Jul 2, 2026
fe5e17b
oh
Tonwalter888 Jul 2, 2026
d4aba38
Forgot
Tonwalter888 Jul 2, 2026
9e170fa
Fix bugs
Tonwalter888 Jul 2, 2026
a3d5d4e
Fix bugs
Tonwalter888 Jul 2, 2026
3a7ba62
Fix bugs
Tonwalter888 Jul 2, 2026
d89a224
Fix bugs
Tonwalter888 Jul 2, 2026
9a78ee0
Fix bugs
Tonwalter888 Jul 2, 2026
11e1521
Forgot
Tonwalter888 Jul 2, 2026
a4ca4b0
?
Tonwalter888 Jul 2, 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 @@ -286,6 +276,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 All @@ -304,14 +298,6 @@ jobs:
git clone --quiet --depth=1 https://github.com/PoomSmart/YouSlider.git
wget --no-verbose --quiet https://github.com/Tonwalter888/Tonwalter888.github.io/raw/refs/heads/main/deb/alderis.deb

- 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 @@ -398,6 +384,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 @@ -426,21 +419,6 @@ jobs:
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youslider.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
82 changes: 76 additions & 6 deletions Files/Ads.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ static BOOL isProductList(YTICommand *command) {
NSString *getAdString(NSString *description) {
for (NSString *str in @[
@"brand_promo",
@"brand_video_shelf",
@"carousel_footered_layout",
@"carousel_headered_layout",
@"eml.expandable_metadata",
@"feed_ad_metadata",
@"full_width_portrait_image_layout",
@"full_width_square_image_layout",
@"grid_ads_image_layout",
@"landscape_image_wide_button_layout",
@"post_shelf",
@"product_carousel",
Expand Down Expand Up @@ -51,7 +53,22 @@ 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)]) {
NSString *description = [sectionRenderer 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:@"shelf_header.eml"] && [description containsString:@"youtube_shorts_24_cairo"]) 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"] || [description containsString:@"text_post_root_slim.eml"])) {
return YES;
}
YTIShelfSupportedRenderers *content = ((YTIShelfRenderer *)sectionRenderer).content;
YTIHorizontalListRenderer *horizontalListRenderer = content.horizontalListRenderer;
NSMutableArray <YTIHorizontalListSupportedRenderers *> *itemsArray = horizontalListRenderer.itemsArray;
Expand All @@ -61,8 +78,43 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
}];
[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"] || [description containsString:@"text_post_root_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 +125,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 +176,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 +234,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 +254,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 +300,4 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
// Survey
%hook YTSurveyController
- (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {}
%end
%end
Loading