mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-21 18:28:47 -04:00
Merge branch 'main' into gestures
This commit is contained in:
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 YTLitePlus
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@@ -41,6 +41,8 @@ static int appVersionSpoofer() {
|
||||
|
||||
@interface YTSettingsSectionItemManager (YTLitePlus)
|
||||
- (void)updateYTLitePlusSectionWithEntry:(id)entry;
|
||||
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls;
|
||||
- (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller;
|
||||
@end
|
||||
|
||||
extern NSBundle *YTLitePlusBundle();
|
||||
@@ -192,6 +194,29 @@ static const NSInteger YTLiteSection = 789;
|
||||
];
|
||||
[sectionItems addObject:pasteSettings];
|
||||
|
||||
YTSettingsSectionItem *videoPlayer = [%c(YTSettingsSectionItem)
|
||||
itemWithTitle:LOC(@"VIDEO_PLAYER")
|
||||
titleDescription:LOC(@"VIDEO_PLAYER_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
detailTextBlock:nil
|
||||
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
// Access the current view controller
|
||||
UIViewController *settingsViewController = [self valueForKey:@"_settingsViewControllerDelegate"];
|
||||
if (settingsViewController) {
|
||||
// Present the video picker
|
||||
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[(NSString *)kUTTypeMovie, (NSString *)kUTTypeVideo] inMode:UIDocumentPickerModeImport];
|
||||
documentPicker.delegate = (id<UIDocumentPickerDelegate>)self;
|
||||
documentPicker.allowsMultipleSelection = NO;
|
||||
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||
} else {
|
||||
NSLog(@"settingsViewController is nil");
|
||||
}
|
||||
|
||||
return YES; // Return YES to indicate that the action was handled
|
||||
}
|
||||
];
|
||||
[sectionItems addObject:videoPlayer];
|
||||
|
||||
/*
|
||||
YTSettingsSectionItem *appIcon = [%c(YTSettingsSectionItem)
|
||||
itemWithTitle:LOC(@"CHANGE_APP_ICON")
|
||||
@@ -647,4 +672,31 @@ static const NSInteger YTLiteSection = 789;
|
||||
}
|
||||
%orig;
|
||||
}
|
||||
|
||||
// Implement the delegate method for document picker
|
||||
%new
|
||||
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
|
||||
NSURL *pickedURL = [urls firstObject];
|
||||
|
||||
if (pickedURL) {
|
||||
// Use AVPlayerViewController to play the video
|
||||
AVPlayer *player = [AVPlayer playerWithURL:pickedURL];
|
||||
AVPlayerViewController *playerViewController = [[AVPlayerViewController alloc] init];
|
||||
playerViewController.player = player;
|
||||
|
||||
UIViewController *settingsViewController = [self valueForKey:@"_settingsViewControllerDelegate"];
|
||||
if (settingsViewController) {
|
||||
[settingsViewController presentViewController:playerViewController animated:YES completion:^{
|
||||
[player play];
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%new
|
||||
- (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller {
|
||||
// Handle cancellation if needed
|
||||
NSLog(@"Document picker was cancelled");
|
||||
}
|
||||
|
||||
%end
|
||||
|
Submodule Tweaks/Return-YouTube-Dislikes updated: 0f4c6b7f59...8578263c9f
Submodule Tweaks/YTUHD updated: 17c2035ea9...02a5c915a7
Submodule Tweaks/YouTubeHeader updated: 171f681e23...850e939ce7
Submodule Tweaks/protobuf updated: b2a38a7b97...57ba42815e
@@ -8,6 +8,8 @@
|
||||
#import <rootless.h>
|
||||
#import <MediaPlayer/MediaPlayer.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <AVKit/AVKit.h> // For AVPlayer and AVPlayerViewController
|
||||
#import <MobileCoreServices/MobileCoreServices.h> // For kUTTypeMovie and kUTTypeVideo
|
||||
|
||||
#import "Tweaks/FLEX/FLEX.h"
|
||||
#import "Tweaks/YouTubeHeader/YTAppDelegate.h"
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Заменете бутоните 'Копиране на настройки' и 'Поставяне на настройки'";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Заменете бутоните с 'Експортиране на настройки' и 'Импортиране на настройки'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Substituir os Botões 'Copiar Configurações' e 'Colar Configurações'";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Substitui os Botões 'Exportar Configurações' e 'Importar Configurações'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -28,6 +28,9 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "'Ayarları Kopyala' ve 'Ayarları Yapıştır' Düğmelerini Değiştir";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Düğmeleri 'Ayarları Dışa Aktar' ve 'Ayarları İçe Aktar' ile değiştirir";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
@@ -14,6 +14,9 @@
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons";
|
||||
"REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'";
|
||||
|
||||
"VIDEO_PLAYER" = "Video Player (Beta)";
|
||||
"VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player";
|
||||
|
||||
// Player Gestures
|
||||
"PLAYER_GESTURES_TOGGLE" = "Enable Player Gestures";
|
||||
"VOLUME" = "Volume";
|
||||
|
Reference in New Issue
Block a user