From a88833a5e4b2dc4a898d07ca02ac5b846a10eca9 Mon Sep 17 00:00:00 2001 From: qnblackcat Date: Sun, 16 Oct 2022 01:00:08 +0700 Subject: [PATCH] I'm drunk and it's 1 AM --- .github/workflows/buildapp.yml | 18 ++++++++++++++---- uYouPlus.xm | 26 ++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildapp.yml b/.github/workflows/buildapp.yml index 8ba2e5e..57e9aad 100644 --- a/.github/workflows/buildapp.yml +++ b/.github/workflows/buildapp.yml @@ -13,7 +13,7 @@ on: type: string decrypted_youtube_url: description: "The direct URL to the decrypted YouTube ipa" - default: "https://27man-my.sharepoint.com/:u:/g/personal/qn____27man_onmicrosoft_com/EfZLHsAs_CpGtyzPhAi7Dy8BtGjTxYif-DAmW0-rxzE4sA?download=1" + default: "" required: true type: string youtube_version: @@ -104,8 +104,18 @@ jobs: THEOS: ${{ github.workspace }}/theos UYOU_VERSION: ${{ inputs.uyou_version }} YOUTUBE_VERSION: ${{ inputs.youtube_version }} - - - name: Gh Release + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + env: + UYOU_VERSION: ${{ inputs.uyou_version }} + YOUTUBE_VERSION: ${{ inputs.youtube_version }} + with: + name: uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }} + path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }} + if-no-files-found: error + + - name: Create Release id: create_release uses: softprops/action-gh-release@v0.1.14 env: @@ -117,4 +127,4 @@ jobs: tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }}) name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }}) files: ./main/packages/*.ipa - draft: ${{ env.DRAFT }} + draft: ${{ env.DRAFT }} \ No newline at end of file diff --git a/uYouPlus.xm b/uYouPlus.xm index 6618d45..0cb17bf 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -19,6 +19,7 @@ #import "Tweaks/YouTubeHeader/YTPlayerOverlayProvider.h" #import "Tweaks/YouTubeHeader/YTReelWatchPlaybackOverlayView.h" #import "Tweaks/YouTubeHeader/YTReelPlayerBottomButton.h" +#import "Tweaks/YouTubeHeader/YTReelPlayerViewController.h" // Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f NSBundle *uYouPlusBundle() { @@ -26,7 +27,10 @@ NSBundle *uYouPlusBundle() { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ NSString *tweakBundlePath = [[NSBundle mainBundle] pathForResource:@"uYouPlus" ofType:@"bundle"]; - bundle = [NSBundle bundleWithPath:tweakBundlePath]; + if (tweakBundlePath) + bundle = [NSBundle bundleWithPath:tweakBundlePath]; + else + bundle = [NSBundle bundleWithPath:@"/Library/Application Support/uYouPlus.bundle"]; }); return bundle; } @@ -262,6 +266,8 @@ BOOL dontEatMyContent() { %hook YTColdConfig - (BOOL)respectDeviceCaptionSetting { return NO; } - (BOOL)isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES; } +// Fix uYou's label glitching - qnblackcat/uYouPlus#552 +- (BOOL)mainAppCoreClientIosTransientVisualGlitchInPivotBarFix { return NO; } %end // NOYTPremium - https://github.com/PoomSmart/NoYTPremium/ @@ -291,15 +297,31 @@ BOOL dontEatMyContent() { - (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {} %end -// Enable Shorts scroll bar - @PoomSmart +// YTShortsProgress - @PoomSmart - https://github.com/PoomSmart/YTShortsProgress %hook YTReelPlayerViewController +- (BOOL)shouldEnablePlayerBar { return YES; } - (BOOL)shouldAlwaysEnablePlayerBar { return YES; } +- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; } +%end + +%hook YTReelPlayerViewControllerSub +- (BOOL)shouldEnablePlayerBar { return YES; } +- (BOOL)shouldAlwaysEnablePlayerBar { return YES; } +- (BOOL)shouldEnablePlayerBarOnlyOnPause { return NO; } %end %hook YTInlinePlayerBarContainerView - (void)setUserInteractionEnabled:(BOOL)enabled { %orig(YES); } %end +%hook YTColdConfig +- (BOOL)iosEnableVideoPlayerScrubber { return YES; } +%end + +%hook YTHotConfig +- (BOOL)enablePlayerBarForVerticalVideoWhenControlsHiddenInFullscreen { return YES; } +%end + // Workaround for issue #54 %hook YTMainAppVideoPlayerOverlayViewController - (void)updateRelatedVideos {