mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-30 20:34:03 -04:00 
			
		
		
		
	| @@ -47,6 +47,8 @@ static int appVersionSpoofer() { | |||||||
|  |  | ||||||
| @interface YTSettingsSectionItemManager (YTLitePlus) | @interface YTSettingsSectionItemManager (YTLitePlus) | ||||||
| - (void)updateYTLitePlusSectionWithEntry:(id)entry; | - (void)updateYTLitePlusSectionWithEntry:(id)entry; | ||||||
|  | - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls; | ||||||
|  | - (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller; | ||||||
| @end | @end | ||||||
|  |  | ||||||
| extern NSBundle *YTLitePlusBundle(); | extern NSBundle *YTLitePlusBundle(); | ||||||
| @@ -197,6 +199,29 @@ static const NSInteger YTLiteSection = 789; | |||||||
|     ]; |     ]; | ||||||
|     [sectionItems addObject:pasteSettings]; |     [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) |     YTSettingsSectionItem *appIcon = [%c(YTSettingsSectionItem) | ||||||
|         itemWithTitle:LOC(@"CHANGE_APP_ICON") |         itemWithTitle:LOC(@"CHANGE_APP_ICON") | ||||||
| @@ -479,4 +504,31 @@ static const NSInteger YTLiteSection = 789; | |||||||
|     } |     } | ||||||
|     %orig; |     %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 | %end | ||||||
|   | |||||||
| @@ -6,6 +6,9 @@ | |||||||
| #import <sys/utsname.h> | #import <sys/utsname.h> | ||||||
| #import <substrate.h> | #import <substrate.h> | ||||||
| #import <rootless.h> | #import <rootless.h> | ||||||
|  | #import <AVKit/AVKit.h>         // For AVPlayer and AVPlayerViewController | ||||||
|  | #import <MobileCoreServices/MobileCoreServices.h> // For kUTTypeMovie and kUTTypeVideo | ||||||
|  |  | ||||||
|  |  | ||||||
| #import "Tweaks/FLEX/FLEX.h" | #import "Tweaks/FLEX/FLEX.h" | ||||||
| #import "Tweaks/YouTubeHeader/YTAppDelegate.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" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | ||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "خيارات تراكب ضوابط الفيديو"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "خيارات تراكب ضوابط الفيديو"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Заменете бутоните 'Копиране на настройки' и 'Поставяне на настройки'"; | "REPLACE_COPY_AND_PASTE_BUTTONS" = "Заменете бутоните 'Копиране на настройки' и 'Поставяне на настройки'"; | ||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Заменете бутоните с 'Експортиране на настройки' и 'Импортиране на настройки'"; | "REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Заменете бутоните с 'Експортиране на настройки' и 'Импортиране на настройки'"; | ||||||
|  |  | ||||||
|  | "VIDEO_PLAYER" = "Video Player (Beta)"; | ||||||
|  | "VIDEO_PLAYER_DESC" = "Open a downloaded video in the Apple player"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Опции за контрол на видеото"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Опции за контрол на видеото"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Overlay-Optionen für Videosteuerungen"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Overlay-Optionen für Videosteuerungen"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opciones de superposición de controles de vídeo"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opciones de superposición de controles de vídeo"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Options de l'overlay des contrôles vidéo"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Options de l'overlay des contrôles vidéo"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "動画コントロールオーバーレイの設定"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "動画コントロールオーバーレイの設定"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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" = "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opções de Sobreposição de Controles de Vídeo"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opções de Sobreposição de Controles de Vídeo"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opțiuni Overlay Controale Video"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opțiuni Overlay Controale Video"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | ||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS_DESC" = "Replaces the Buttons to 'Export Settings' and 'Import Settings'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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" = "'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"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Kontrol Seç."; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Kontrol Seç."; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video player options | // Video player options | ||||||
| "VIDEO_PLAYER_OPTIONS" = "Tùy chọn trình phát video"; | "VIDEO_PLAYER_OPTIONS" = "Tùy chọn trình phát video"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -14,6 +14,9 @@ | |||||||
| "REPLACE_COPY_AND_PASTE_BUTTONS" = "Replace 'Copy Settings' & 'Paste Settings' Buttons"; | "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'"; | "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"; | ||||||
|  |  | ||||||
| // Video controls overlay options | // Video controls overlay options | ||||||
| "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "影片區覆蓋按鈕設定"; | "VIDEO_CONTROLS_OVERLAY_OPTIONS" = "影片區覆蓋按鈕設定"; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Bryce Hackel
					Bryce Hackel