3.0.1
This commit is contained in:
@@ -5,7 +5,7 @@ endif
|
||||
DEBUG=0
|
||||
FINALPACKAGE=1
|
||||
ARCHS = arm64
|
||||
PACKAGE_VERSION = 3.0
|
||||
PACKAGE_VERSION = 3.0.1
|
||||
TARGET := iphone:clang:latest:13.0
|
||||
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
|
||||
@@ -213,7 +213,6 @@
|
||||
@end
|
||||
|
||||
@interface YTSegmentableInlinePlayerBarView : UIView
|
||||
@property (nonatomic, assign, readonly) CGFloat totalTime;
|
||||
@property (nonatomic, assign, readwrite) BOOL enableSnapToChapter;
|
||||
@end
|
||||
|
||||
|
||||
@@ -411,6 +411,20 @@ void addEndTime(YTPlayerViewController *self, YTSingleVideoController *video, YT
|
||||
}
|
||||
}
|
||||
|
||||
void autoSkipShorts(YTPlayerViewController *self, YTSingleVideoController *video, YTSingleVideoTime *time) {
|
||||
if (!ytlBool(@"autoSkipShorts")) return;
|
||||
|
||||
if (floor(time.time) >= floor(video.totalMediaTime)) {
|
||||
if ([self.parentViewController isKindOfClass:%c(YTShortsPlayerViewController)]) {
|
||||
YTShortsPlayerViewController *shortsVC = (YTShortsPlayerViewController *)self.parentViewController;
|
||||
|
||||
if ([shortsVC respondsToSelector:@selector(reelContentViewRequestsAdvanceToNextVideo:)]) {
|
||||
[shortsVC performSelector:@selector(reelContentViewRequestsAdvanceToNextVideo:)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%hook YTPlayerViewController
|
||||
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
||||
%orig;
|
||||
@@ -520,12 +534,14 @@ void addEndTime(YTPlayerViewController *self, YTSingleVideoController *video, YT
|
||||
%orig;
|
||||
|
||||
addEndTime(self, video, time);
|
||||
autoSkipShorts(self, video, time);
|
||||
}
|
||||
|
||||
- (void)potentiallyMutatedSingleVideo:(YTSingleVideoController *)video currentVideoTimeDidChange:(YTSingleVideoTime *)time {
|
||||
%orig;
|
||||
|
||||
addEndTime(self, video, time);
|
||||
autoSkipShorts(self, video, time);
|
||||
}
|
||||
%end
|
||||
|
||||
@@ -844,19 +860,6 @@ static BOOL isOverlayShown = YES;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTSegmentableInlinePlayerBarView
|
||||
- (void)setScrubberTime:(CGFloat)time {
|
||||
%orig;
|
||||
|
||||
if (ytlBool(@"autoSkipShorts") && round(time) == round(self.totalTime)) {
|
||||
UIWindow *mainWindow = [UIApplication sharedApplication].windows.firstObject;
|
||||
YTAppViewController *appVC = (YTAppViewController *)mainWindow.rootViewController;
|
||||
|
||||
[appVC.pivotBarViewController.scrubberDelegate performSelector:@selector(reelContentViewRequestsAdvanceToNextVideo:)];
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
static void downloadImageFromURL(UIResponder *responder, NSURL *URL, BOOL download) {
|
||||
NSString *URLString = URL.absoluteString;
|
||||
|
||||
|
||||
@@ -7,3 +7,5 @@ Description: Lightweight YouTube Enhancer
|
||||
Maintainer: dvntm
|
||||
Author: dvntm
|
||||
Section: Tweaks
|
||||
Icon: https://raw.githubusercontent.com/dayanch96/icons/main/ytlite.png
|
||||
SileoDepiction: https://raw.githubusercontent.com/dayanch96/icons/main/ytlite.json
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user