mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-29 20:10:41 -04:00 
			
		
		
		
	| @@ -200,24 +200,18 @@ static const NSInteger YTLiteSection = 789; | |||||||
|     [sectionItems addObject:pasteSettings]; |     [sectionItems addObject:pasteSettings]; | ||||||
|  |  | ||||||
|     YTSettingsSectionItem *videoPlayer = [%c(YTSettingsSectionItem) |     YTSettingsSectionItem *videoPlayer = [%c(YTSettingsSectionItem) | ||||||
|         itemWithTitle:LOC(@"VIDEO_PLAYER") |         itemWithTitle:LOC(@"VIDEO_PICKER") | ||||||
|         titleDescription:LOC(@"VIDEO_PLAYER_DESC") |         titleDescription:LOC(@"VIDEO_PICKER_DESC") | ||||||
|         accessibilityIdentifier:nil |         accessibilityIdentifier:nil | ||||||
|         detailTextBlock:nil |         detailTextBlock:nil | ||||||
|         selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { |         selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { | ||||||
|             // Access the current view controller |             // Access the current view controller | ||||||
|             UIViewController *settingsViewController = [self valueForKey:@"_settingsViewControllerDelegate"]; |             UIViewController *settingsViewController = [self valueForKey:@"_settingsViewControllerDelegate"]; | ||||||
|             if (settingsViewController) { |             if (settingsViewController) { | ||||||
|                 // Define the content types for movies and videos using UTType |                 // Present the video picker | ||||||
|                 NSArray<UTType *> *contentTypes = @[[UTType typeWithIdentifier:@"public.movie"],  |                 UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[(NSString *)kUTTypeMovie, (NSString *)kUTTypeVideo] inMode:UIDocumentPickerModeImport]; | ||||||
|                                                     [UTType typeWithIdentifier:@"public.video"]]; |  | ||||||
|                  |  | ||||||
|                 // Initialize the document picker for opening content types |  | ||||||
|                 UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:contentTypes]; |  | ||||||
|                 documentPicker.delegate = (id<UIDocumentPickerDelegate>)self; |                 documentPicker.delegate = (id<UIDocumentPickerDelegate>)self; | ||||||
|                 documentPicker.allowsMultipleSelection = NO; |                 documentPicker.allowsMultipleSelection = NO; | ||||||
|                  |  | ||||||
|                 // Present the document picker |  | ||||||
|                 [settingsViewController presentViewController:documentPicker animated:YES completion:nil]; |                 [settingsViewController presentViewController:documentPicker animated:YES completion:nil]; | ||||||
|             } else { |             } else { | ||||||
|                 NSLog(@"settingsViewController is nil"); |                 NSLog(@"settingsViewController is nil"); | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
| #import <substrate.h> | #import <substrate.h> | ||||||
| #import <rootless.h> | #import <rootless.h> | ||||||
| #import <AVKit/AVKit.h>         // For AVPlayer and AVPlayerViewController | #import <AVKit/AVKit.h>         // For AVPlayer and AVPlayerViewController | ||||||
| #import <UniformTypeIdentifiers/UniformTypeIdentifiers.h> // Required for UTType | #import <MobileCoreServices/MobileCoreServices.h> // For kUTTypeMovie and kUTTypeVideo | ||||||
|  |  | ||||||
|  |  | ||||||
| #import "Tweaks/FLEX/FLEX.h" | #import "Tweaks/FLEX/FLEX.h" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Bryce Hackel
					Bryce Hackel