3.0.1
This commit is contained in:
@@ -5,7 +5,7 @@ endif
|
|||||||
DEBUG=0
|
DEBUG=0
|
||||||
FINALPACKAGE=1
|
FINALPACKAGE=1
|
||||||
ARCHS = arm64
|
ARCHS = arm64
|
||||||
PACKAGE_VERSION = 3.0
|
PACKAGE_VERSION = 3.0.1
|
||||||
TARGET := iphone:clang:latest:13.0
|
TARGET := iphone:clang:latest:13.0
|
||||||
|
|
||||||
include $(THEOS)/makefiles/common.mk
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|||||||
@@ -213,7 +213,6 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface YTSegmentableInlinePlayerBarView : UIView
|
@interface YTSegmentableInlinePlayerBarView : UIView
|
||||||
@property (nonatomic, assign, readonly) CGFloat totalTime;
|
|
||||||
@property (nonatomic, assign, readwrite) BOOL enableSnapToChapter;
|
@property (nonatomic, assign, readwrite) BOOL enableSnapToChapter;
|
||||||
@end
|
@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
|
%hook YTPlayerViewController
|
||||||
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
- (void)loadWithPlayerTransition:(id)arg1 playbackConfig:(id)arg2 {
|
||||||
%orig;
|
%orig;
|
||||||
@@ -520,12 +534,14 @@ void addEndTime(YTPlayerViewController *self, YTSingleVideoController *video, YT
|
|||||||
%orig;
|
%orig;
|
||||||
|
|
||||||
addEndTime(self, video, time);
|
addEndTime(self, video, time);
|
||||||
|
autoSkipShorts(self, video, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)potentiallyMutatedSingleVideo:(YTSingleVideoController *)video currentVideoTimeDidChange:(YTSingleVideoTime *)time {
|
- (void)potentiallyMutatedSingleVideo:(YTSingleVideoController *)video currentVideoTimeDidChange:(YTSingleVideoTime *)time {
|
||||||
%orig;
|
%orig;
|
||||||
|
|
||||||
addEndTime(self, video, time);
|
addEndTime(self, video, time);
|
||||||
|
autoSkipShorts(self, video, time);
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
@@ -844,19 +860,6 @@ static BOOL isOverlayShown = YES;
|
|||||||
}
|
}
|
||||||
%end
|
%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) {
|
static void downloadImageFromURL(UIResponder *responder, NSURL *URL, BOOL download) {
|
||||||
NSString *URLString = URL.absoluteString;
|
NSString *URLString = URL.absoluteString;
|
||||||
|
|
||||||
|
|||||||
@@ -7,3 +7,5 @@ Description: Lightweight YouTube Enhancer
|
|||||||
Maintainer: dvntm
|
Maintainer: dvntm
|
||||||
Author: dvntm
|
Author: dvntm
|
||||||
Section: Tweaks
|
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