From bb5af9566737307cef14dc5eef4b58b2520d83e8 Mon Sep 17 00:00:00 2001 From: Balackburn <93828569+Balackburn@users.noreply.github.com> Date: Tue, 11 Jul 2023 15:52:40 +0200 Subject: [PATCH] removed Download.xm.bak (useless) --- Source/Download.xm.bak | 42 ------------------------------------------ Source/Settings.xm | 10 ---------- 2 files changed, 52 deletions(-) delete mode 100644 Source/Download.xm.bak diff --git a/Source/Download.xm.bak b/Source/Download.xm.bak deleted file mode 100644 index 7adb0d0..0000000 --- a/Source/Download.xm.bak +++ /dev/null @@ -1,42 +0,0 @@ -// Code has been disabled due to some compiling errors. - -#import "../Header.h" - -%ctor { - void $YTPlayerView_downloadVideo_register(); - void $YTPlayerView_layoutSubviews$_register(); -} - -#ifndef YTPLAYERVIEW_DOWNLOADVIDEO_REGISTER -#ifndef YTPLAYERVIEW_LAYOUTSUBVIEWS_REGISTER -#define YTPLAYERVIEW_DOWNLOADVIDEO_REGISTER -#define YTPLAYERVIEW_LAYOUTSUBVIEWS_REGISTER - -void $YTPlayerView_downloadVideo_register(); -void $YTPlayerView_layoutSubviews$_register(); - -#endif - -// YouTube Video Downloading -CHDeclareClass(YTPlayerView); - -CHOptimizedMethod1(self, void, YTPlayerView, layoutSubviews, BOOL, arg1) -{ - CHSuper1(YTPlayerView, layoutSubviews, arg1); - CGRect downloadButtonFrame = CGRectMake(0, 0, 100, 50); - UIButton *downloadButton = [[UIButton alloc] initWithFrame:downloadButtonFrame]; - [downloadButton setTitle:@"Download" forState:UIControlStateNormal]; - [downloadButton addTarget:self action:@selector(downloadVideo) forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:downloadButton]; -} - -CHOptimizedMethod0(self, void, YTPlayerView, downloadVideo) -{ - NSString *videoUrlString = @"[Insert YouTube video URL here]"; - NSURL *videoUrl = [NSURL URLWithString:videoUrlString]; - NSData *videoData = [NSData dataWithContentsOfURL:videoUrl]; - - // Save the video data to a file - NSString *filePath = @"[Insert file path here]"; - [videoData writeToFile:filePath atomically:YES]; -} diff --git a/Source/Settings.xm b/Source/Settings.xm index 73b4310..d913121 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -305,16 +305,6 @@ extern NSBundle *YTLitePlusBundle(); # pragma mark - Shorts Controls Overlay Options YTSettingsSectionItem *shortsControlOverlayGroup = [YTSettingsSectionItemClass itemWithTitle:LOC(@"SHORTS_CONTROLS_OVERLAY_OPTIONS") accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { NSArray *rows = @[ - [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_SHORTS_VIDEOS") - titleDescription:LOC(@"HIDE_SHORTS_VIDEOS_DESC") - accessibilityIdentifier:nil - switchOn:IsEnabled(@"hideShorts_enabled") - switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { - [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hideShorts_enabled"]; - return YES; - } - settingItemId:0], - [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_SHORTS_CHANNEL_AVATAR") titleDescription:LOC(@"HIDE_SHORTS_CHANNEL_AVATAR_DESC") accessibilityIdentifier:nil