mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:58:45 -04:00
removed Download.xm.bak (useless)
This commit is contained in:
@@ -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];
|
|
||||||
}
|
|
@@ -305,16 +305,6 @@ extern NSBundle *YTLitePlusBundle();
|
|||||||
# pragma mark - Shorts Controls Overlay Options
|
# 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) {
|
YTSettingsSectionItem *shortsControlOverlayGroup = [YTSettingsSectionItemClass itemWithTitle:LOC(@"SHORTS_CONTROLS_OVERLAY_OPTIONS") accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||||
NSArray <YTSettingsSectionItem *> *rows = @[
|
NSArray <YTSettingsSectionItem *> *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")
|
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"HIDE_SHORTS_CHANNEL_AVATAR")
|
||||||
titleDescription:LOC(@"HIDE_SHORTS_CHANNEL_AVATAR_DESC")
|
titleDescription:LOC(@"HIDE_SHORTS_CHANNEL_AVATAR_DESC")
|
||||||
accessibilityIdentifier:nil
|
accessibilityIdentifier:nil
|
||||||
|
Reference in New Issue
Block a user