From feaaa07e9e30d2cf52103b0a90ff8b19762556ec Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Fri, 16 Aug 2024 00:33:37 -0700 Subject: [PATCH] Revert "Prototype 2" This reverts commit 8f578bb741f6d1c9f39dedf0dfa24c686a75ae66. --- Source/Settings.xm | 14 ++++---------- YTLitePlus.h | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Source/Settings.xm b/Source/Settings.xm index 2a1469f..8be7b15 100644 --- a/Source/Settings.xm +++ b/Source/Settings.xm @@ -200,24 +200,18 @@ static const NSInteger YTLiteSection = 789; [sectionItems addObject:pasteSettings]; YTSettingsSectionItem *videoPlayer = [%c(YTSettingsSectionItem) - itemWithTitle:LOC(@"VIDEO_PLAYER") - titleDescription:LOC(@"VIDEO_PLAYER_DESC") + itemWithTitle:LOC(@"VIDEO_PICKER") + titleDescription:LOC(@"VIDEO_PICKER_DESC") accessibilityIdentifier:nil detailTextBlock:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { // Access the current view controller UIViewController *settingsViewController = [self valueForKey:@"_settingsViewControllerDelegate"]; if (settingsViewController) { - // Define the content types for movies and videos using UTType - NSArray *contentTypes = @[[UTType typeWithIdentifier:@"public.movie"], - [UTType typeWithIdentifier:@"public.video"]]; - - // Initialize the document picker for opening content types - UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:contentTypes]; + // Present the video picker + UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[(NSString *)kUTTypeMovie, (NSString *)kUTTypeVideo] inMode:UIDocumentPickerModeImport]; documentPicker.delegate = (id)self; documentPicker.allowsMultipleSelection = NO; - - // Present the document picker [settingsViewController presentViewController:documentPicker animated:YES completion:nil]; } else { NSLog(@"settingsViewController is nil"); diff --git a/YTLitePlus.h b/YTLitePlus.h index ade859b..f737d46 100644 --- a/YTLitePlus.h +++ b/YTLitePlus.h @@ -7,7 +7,7 @@ #import #import #import // For AVPlayer and AVPlayerViewController -#import // Required for UTType +#import // For kUTTypeMovie and kUTTypeVideo #import "Tweaks/FLEX/FLEX.h"