Skip to content

Commit

Permalink
Merge branch 'arichornlover:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
yodaluca23 authored Feb 4, 2024
2 parents 1bfe296 + 150b7ac commit a823cb5
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 61 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</p>

<p align="center">
<a href="https://github.com/arichornlover/uYouEnhanced/stargazers"><img src="https://custom-icon-badges.demolab.com/github/stars/arichornlover/uYouEnhanced?logo=star&logoColor=white&color=%23e81e8a&label=Stars" alt="Stars Badge"></img></a>
<a href="https://github.com/arichornlover/uYouEnhanced/network/members"><img src="https://custom-icon-badges.demolab.com/github/forks/arichornlover/uYouEnhanced?logo=github&logoColor=white&color=%23e81e8a&label=Forks"></a>
<a href="https://github.com/arichornlover/uYouEnhanced/stargazers"><img src="https://custom-icon-badges.demolab.com/github/stars/arichornlover/uYouEnhanced?style=flat&logo=star&logoColor=white&color=%23e81e8a&label=Stars" alt="Stars Badge"></img></a>
<a href="https://github.com/arichornlover/uYouEnhanced/network/members"><img src="https://custom-icon-badges.demolab.com/github/forks/arichornlover/uYouEnhanced?style=flat&logo=github&logoColor=white&color=%23e81e8a&label=Forks"></a>
</p>

# Table of Contents
Expand Down Expand Up @@ -278,39 +278,39 @@

- My official AltStore repo: https://therealfoxster.github.io/altsource-viewer/view/?source=https://raw.githubusercontent.com/arichornlover/arichornlover.github.io/main/apps.json

- [Open in AltStore (v19.01.1-3.0.1)](http://tinyurl.com/mwu6j462) - It will take a while to install because AltStore needs to download the IPA first.
- [Open in AltStore (v19.04.3-3.0.1)](http://tinyurl.com/5n6hxnz8) - It will take a while to install because AltStore needs to download the IPA first.

- Version info: _(last update: Jan 11 2024)_
- Version info: _(last update: Jan 31 2024)_

<details>
<summary>Expand ℹ️</summary>

| **Tweaks/App** | **Developer** | **Version** | **Open source** |
| - | - | :-: | :-: |
| **YouTube** | Google Inc | 19.01.1 | ✖︎ |
| **YouTube** | Google Inc | 19.04.3 | ✖︎ |
| [uYou](https://github.com/MiRO92/uYou-for-YouTube) | [MiRO92](https://twitter.com/miro92) | 3.0.1 | ✖︎ |
| **Open in YouTube** | [CokePokes](https://github.com/CokePokes) | 1.2 | [✔︎](https://github.com/CokePokes/YoutubeExtensions) |
| **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.2.1 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
| **BigYTMiniPlayer** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
| **YTNoHoverCards** | [level3tjg](https://twitter.com/level3tjg) | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) |
| **YTMiniplayerEnabler** | [level3tjg](https://twitter.com/level3tjg) | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) |
| **DontEatMyContent** | [therealFoxster](https://github.com/therealFoxster) | 1.1.2 | [✔︎](https://github.com/therealFoxster/DontEatMyContent) |
| **DontEatMyContent** | [therealFoxster](https://github.com/therealFoxster) | 1.1.3 | [✔︎](https://github.com/therealFoxster/DontEatMyContent) |
| **YTSpeed** | [Lyvendia](https://github.com/Lyvendia) | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
| **YTCastConfirm** | [JamieBerghmans](https://github.com/JamieBerghmans) | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) |
| **Alderis Color Picker** | [HASHBANG Productions](https://github.com/hbang) | 1.2 | [✔︎](https://github.com/hbang/Alderis) |
| **YTUHD** | [PoomSmart](https://twitter.com/poomsmart) | 1.4.0-1 | [✔︎](https://github.com/PoomSmart/YTUHD) |
| **YouPiP** | [PoomSmart](https://twitter.com/poomsmart) | 1.8.1 | [✔︎](https://github.com/PoomSmart/YouPiP) |
| **YTUHD** | [PoomSmart](https://twitter.com/poomsmart) | 1.4.2 | [✔︎](https://github.com/PoomSmart/YTUHD) |
| **YouPiP** | [PoomSmart](https://twitter.com/poomsmart) | 1.8.2 | [✔︎](https://github.com/PoomSmart/YouPiP) |
| **IAmYouTube** | [PoomSmart](https://twitter.com/poomsmart) | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) |
| **YTABConfig** | [PoomSmart](https://twitter.com/poomsmart) | 1.5.0-3 | [✔︎](https://github.com/PoomSmart/YTABConfig) |
| **YTABConfig** | [PoomSmart](https://twitter.com/poomsmart) | 1.5.1 | [✔︎](https://github.com/PoomSmart/YTABConfig) |
| **YTReExplore** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
| **NoYTPremium** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium) |
| **YTNoPaidPromo** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://github.com/PoomSmart/YTNoPaidPromo) |
| **YouRememberCaption** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) |
| **Return YouTube Dislike** | [PoomSmart](https://twitter.com/poomsmart) | 1.11.4 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
| **Return YouTube Dislike** | [PoomSmart](https://twitter.com/poomsmart) | 1.11.6 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
| **YouMute** | [PoomSmart](https://twitter.com/poomsmart) | 1.2.1-3 | [✔︎](https://github.com/PoomSmart/YouMute) |
| **YouQuality** | [PoomSmart](https://twitter.com/poomsmart) | 1.1.4-2 | [✔︎](https://github.com/PoomSmart/YouQuality) |
| **YTVideoOverlay** | [PoomSmart](https://twitter.com/poomsmart) | 1.1.1-2 | [✔︎](https://github.com/PoomSmart/YTVideoOverlay) |
| **YTHoldForSpeed** | [joshuaseltzer](https://github.com/joshuaseltzer) | 1.0.8 | [✔︎](https://github.com/joshuaseltzer/YTHoldForSpeed) |
| **YTVideoOverlay** | [PoomSmart](https://twitter.com/poomsmart) | 1.1.4 | [✔︎](https://github.com/PoomSmart/YTVideoOverlay) |
| **YTHoldForSpeed** | [joshuaseltzer](https://github.com/joshuaseltzer) | 1.2.0 | [✔︎](https://github.com/joshuaseltzer/YTHoldForSpeed) |
| **LowContrastMode** | [arichornlover](https://github.com/arichornlover) | 1.5.2 | [✔︎](https://github.com/arichornlover/YTLowContrastMode) |

</details>
Expand Down
71 changes: 25 additions & 46 deletions Source/uYouPlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -501,53 +501,34 @@ static NSString *accessGroupID() {
// YTSpeed - https://github.com/Lyvendia/YTSpeed
%group gYTSpeed
%hook YTVarispeedSwitchController
- (instancetype)init {
if ((self = %orig)) {
const int size = 17;
- (id)init {
id result = %orig;

const int size = 17;
float speeds[] = {0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 5.0};
id varispeedSwitchControllerOptions[size];

for (int i = 0; i < size; ++i) {
id title = [NSString stringWithFormat:@"%.2fx", speeds[i]];
varispeedSwitchControllerOptions[i] = [[%c(YTVarispeedSwitchControllerOption) alloc] initWithTitle:title rate:speeds[i]];
}
for (int i = 0; i < size; ++i) {
id title = [NSString stringWithFormat:@"%.2fx", speeds[i]];
varispeedSwitchControllerOptions[i] = [[%c(YTVarispeedSwitchControllerOption) alloc] initWithTitle:title rate:speeds[i]];
}

NSUInteger count = sizeof(varispeedSwitchControllerOptions) / sizeof(id);
NSArray *varispeedArray = [NSArray arrayWithObjects:varispeedSwitchControllerOptions count:count];
MSHookIvar<NSArray *>(self, "_options") = varispeedArray;
}
return self;
}
%end
NSUInteger count = sizeof(varispeedSwitchControllerOptions) / sizeof(id);
NSArray *varispeedArray = [NSArray arrayWithObjects:varispeedSwitchControllerOptions count:count];
MSHookIvar<NSArray *>(self, "_options") = varispeedArray;

%hook YTLocalPlaybackController
- (instancetype)initWithParentResponder:(id)parentResponder overlayFactory:(id)overlayFactory playerView:(id)playerView playbackControllerDelegate:(id)playbackControllerDelegate viewportSizeProvider:(id)viewportSizeProvider shouldDelayAdsPlaybackCoordinatorCreation:(BOOL)shouldDelayAdsPlaybackCoordinatorCreation {
float savedRate = [[NSUserDefaults standardUserDefaults] floatForKey:@"YoutubeSpeed_PlaybackRate"];
if ((self = %orig)) {
MSHookIvar<float>(self, "_restoredPlaybackRate") = savedRate == 0 ? DEFAULT_RATE : savedRate;
}
return self;
}
- (void)setPlaybackRate:(float)rate {
%orig;
[[NSUserDefaults standardUserDefaults] setFloat: rate forKey:@"YoutubeSpeed_PlaybackRate"];
return result;
}
%end

%hook MLHAMQueuePlayer
- (instancetype)initWithStickySettings:(id)stickySettings playerViewProvider:(id)playerViewProvider {
id result = %orig;
float savedRate = [[NSUserDefaults standardUserDefaults] floatForKey:@"YoutubeSpeed_PlaybackRate"];
[self setRate: savedRate == 0 ? DEFAULT_RATE : savedRate];
return result;
}
- (void)setRate:(float)rate {
MSHookIvar<float>(self, "_rate") = rate;
MSHookIvar<float>(self, "_rate") = rate;
MSHookIvar<float>(self, "_preferredRate") = rate;

id player = MSHookIvar<HAMPlayerInternal *>(self, "_player");
[player setRate: rate];

id stickySettings = MSHookIvar<MLPlayerStickySettings *>(self, "_stickySettings");
[stickySettings setRate: rate];

Expand All @@ -557,6 +538,13 @@ static NSString *accessGroupID() {
[singleVideoController playerRateDidChange: rate];
}
%end

%hook YTPlayerViewController
%property (nonatomic, assign) float playbackRate;
- (void)singleVideo:(id)video playbackRateDidChange:(float)rate {
%orig;
}
%end
%end

# pragma mark - uYouPlus
Expand Down Expand Up @@ -654,22 +642,13 @@ static NSString *accessGroupID() {
%end

// Hide Channel Watermark
%hook YTMainAppVideoPlayerOverlayView
- (BOOL)isWatermarkEnabled {
if (IS_ENABLED(@"hideChannelWatermark_enabled")) {
return NO;
}
return %orig;
}
- (void)setFeaturedChannelWatermarkImageView:(id)imageView {
if (IS_ENABLED(@"hideChannelWatermark_enabled")) {
return;
}
%orig(imageView);
%hook YTColdConfig
- (BOOL)iosEnableFeaturedChannelWatermarkOverlayFix {
return IS_ENABLED(@"hideChannelWatermark_enabled") ? NO : %orig;
}
%end

// Hide Channel Watermark (for Backwards Compatibility)
// Hide Channel Watermark (for Old YouTube Versions / Backwards Compatibility)
%hook YTAnnotationsViewController
- (void)loadFeaturedChannelWatermark {
if (IS_ENABLED(@"hideChannelWatermark_enabled")) {}
Expand Down
2 changes: 1 addition & 1 deletion Tweaks/PSHeader
Submodule PSHeader updated 1 files
+1 −3 PS.h
2 changes: 1 addition & 1 deletion Tweaks/YTHoldForSpeed

0 comments on commit a823cb5

Please sign in to comment.