Browse Source

Disable OneDrive on tvOS

Soomin Lee 6 years ago
parent
commit
27c143fad0

+ 2 - 2
Apple-TV/VLCCloudServicesTVViewController.h

@@ -13,14 +13,14 @@
 
 @interface VLCCloudServicesTVViewController : UIViewController
 
-@property (readwrite, nonatomic, weak) IBOutlet UIButton *oneDriveButton;
+//@property (readwrite, nonatomic, weak) IBOutlet UIButton *oneDriveButton;
 @property (readwrite, nonatomic, weak) IBOutlet UIButton *boxButton;
 @property (readwrite, nonatomic, weak) IBOutlet UIButton *gDriveButton;
 @property (readwrite, nonatomic, weak) IBOutlet UIButton *dropboxButton;
 @property (readwrite, nonatomic, weak) IBOutlet UILabel *helpLabel;
 
 - (IBAction)dropbox:(id)sender;
-- (IBAction)onedrive:(id)sender;
+//- (IBAction)onedrive:(id)sender;
 - (IBAction)box:(id)sender;
 - (IBAction)gdrive:(id)sender;
 

+ 15 - 15
Apple-TV/VLCCloudServicesTVViewController.m

@@ -13,15 +13,15 @@
 #import "VLCDropboxController.h"
 #import "VLCDropboxCollectionViewController.h"
 #import "VLCPlayerDisplayController.h"
-#import "VLCOneDriveController.h"
-#import "VLCOneDriveCollectionViewController.h"
+//#import "VLCOneDriveController.h"
+//#import "VLCOneDriveCollectionViewController.h"
 #import "VLCBoxCollectionViewController.h"
 #import "VLCBoxController.h"
 #import "MetaDataFetcherKit.h"
 
 @interface VLCCloudServicesTVViewController ()
 {
-    VLCOneDriveController *_oneDriveController;
+//    VLCOneDriveController *_oneDriveController;
     VLCBoxController *_boxController;
 }
 @end
@@ -35,19 +35,19 @@
     [self.helpLabel sizeToFit];
 
     NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
-    [center addObserver:self selector:@selector(oneDriveSessionUpdated:) name:VLCOneDriveControllerSessionUpdated object:nil];
+//    [center addObserver:self selector:@selector(oneDriveSessionUpdated:) name:VLCOneDriveControllerSessionUpdated object:nil];
     [center addObserver:self selector:@selector(boxSessionUpdated:) name:VLCBoxControllerSessionUpdated object:nil];
 
     MDFMovieDBSessionManager *movieDBSessionManager = [MDFMovieDBSessionManager sharedInstance];
     movieDBSessionManager.apiKey = kVLCfortvOSMovieDBKey;
     [movieDBSessionManager fetchProperties];
 
-    _oneDriveController = [VLCOneDriveController sharedInstance];
+//    _oneDriveController = [VLCOneDriveController sharedInstance];
     _boxController = [VLCBoxController sharedInstance];
     [_boxController startSession];
 
     self.dropboxButton.enabled = self.gDriveButton.enabled = NO;
-    [self oneDriveSessionUpdated:nil];
+//    [self oneDriveSessionUpdated:nil];
     [self boxSessionUpdated:nil];
 
     [self performSelector:@selector(updateDropbox) withObject:nil afterDelay:0.1];
@@ -69,21 +69,21 @@
     self.dropboxButton.enabled = [[VLCDropboxController sharedInstance] restoreFromSharedCredentials];
 }
 
-- (void)oneDriveSessionUpdated:(NSNotification *)aNotification
-{
-    self.oneDriveButton.enabled = _oneDriveController.activeSession;
-}
+//- (void)oneDriveSessionUpdated:(NSNotification *)aNotification
+//{
+//    self.oneDriveButton.enabled = _oneDriveController.activeSession;
+//}
 
 - (void)boxSessionUpdated:(NSNotification *)aNotification
 {
     self.boxButton.enabled = YES;
 }
 
-- (IBAction)onedrive:(id)sender
-{
-    VLCOneDriveCollectionViewController *targetViewController = [[VLCOneDriveCollectionViewController alloc] initWithOneDriveObject:nil];
-    [self.navigationController pushViewController:targetViewController animated:YES];
-}
+//- (IBAction)onedrive:(id)sender
+//{
+//    VLCOneDriveCollectionViewController *targetViewController = [[VLCOneDriveCollectionViewController alloc] initWithOneDriveObject:nil];
+//    [self.navigationController pushViewController:targetViewController animated:YES];
+//}
 
 - (IBAction)box:(id)sender
 {

+ 1 - 2
SharedSources/Clouds/VLCRemoteBrowsingTVCell+CloudStorage.h

@@ -14,13 +14,12 @@
 #import "VLCRemoteBrowsingTVCell.h"
 
 #import "VLCDropboxController.h"
-#import "VLCOneDriveObject.h"
 #import <BoxSDK/BoxSDK.h>
 
 @interface VLCRemoteBrowsingTVCell (CloudStorage)
 
 - (void)setDropboxFile:(DBFILESMetadata *)dropboxFile;
 - (void)setBoxFile:(BoxItem *)boxFile;
-- (void)setOneDriveFile:(VLCOneDriveObject *)oneDriveFile;
+//- (void)setOneDriveFile:(VLCOneDriveObject *)oneDriveFile;
 
 @end

+ 39 - 39
SharedSources/Clouds/VLCRemoteBrowsingTVCell+CloudStorage.m

@@ -27,11 +27,11 @@
                            withObject:boxFile waitUntilDone:NO];
 }
 
-- (void)setOneDriveFile:(VLCOneDriveObject *)oneDriveFile
-{
-    [self performSelectorOnMainThread:@selector(_updateOneDriveRepresentation:)
-                           withObject:oneDriveFile waitUntilDone:NO];
-}
+//- (void)setOneDriveFile:(VLCOneDriveObject *)oneDriveFile
+//{
+//    [self performSelectorOnMainThread:@selector(_updateOneDriveRepresentation:)
+//                           withObject:oneDriveFile waitUntilDone:NO];
+//}
 
 - (void)_updateDropboxRepresentation:(DBFILESMetadata *)dropboxFile
 {
@@ -66,39 +66,39 @@
     }
 }
 
-- (void)_updateOneDriveRepresentation:(VLCOneDriveObject *)oneDriveFile
-{
-    if (oneDriveFile != nil) {
-        if (oneDriveFile.isFolder) {
-            self.isDirectory = YES;
-            self.thumbnailImage = [UIImage imageNamed:@"folder"];
-        } else {
-            self.isDirectory = NO;
-
-            NSMutableString *subtitle = [[NSMutableString alloc] init];
-            self.thumbnailImage = [UIImage imageNamed:@"blank"];
-
-            if (oneDriveFile.isVideo) {
-                NSString *thumbnailURLString = oneDriveFile.thumbnailURL;
-                if (thumbnailURLString) {
-                    [self setThumbnailURL:[NSURL URLWithString:thumbnailURLString]];
-                }
-            }
-
-            if (oneDriveFile.size.intValue > 0) {
-                [subtitle appendString:[NSByteCountFormatter stringFromByteCount:[oneDriveFile.size longLongValue] countStyle:NSByteCountFormatterCountStyleFile]];
-                if (oneDriveFile.duration.intValue > 0) {
-                    VLCTime *time = [VLCTime timeWithNumber:oneDriveFile.duration];
-                    [subtitle appendFormat:@" — %@", [time verboseStringValue]];
-                }
-            } else if (oneDriveFile.duration.intValue > 0) {
-                VLCTime *time = [VLCTime timeWithNumber:oneDriveFile.duration];
-                [subtitle appendString:[time verboseStringValue]];
-            }
-            self.subtitle = subtitle;
-        }
-        self.title = oneDriveFile.name;
-    }
-}
+//- (void)_updateOneDriveRepresentation:(VLCOneDriveObject *)oneDriveFile
+//{
+//    if (oneDriveFile != nil) {
+//        if (oneDriveFile.isFolder) {
+//            self.isDirectory = YES;
+//            self.thumbnailImage = [UIImage imageNamed:@"folder"];
+//        } else {
+//            self.isDirectory = NO;
+//
+//            NSMutableString *subtitle = [[NSMutableString alloc] init];
+//            self.thumbnailImage = [UIImage imageNamed:@"blank"];
+//
+//            if (oneDriveFile.isVideo) {
+//                NSString *thumbnailURLString = oneDriveFile.thumbnailURL;
+//                if (thumbnailURLString) {
+//                    [self setThumbnailURL:[NSURL URLWithString:thumbnailURLString]];
+//                }
+//            }
+//
+//            if (oneDriveFile.size.intValue > 0) {
+//                [subtitle appendString:[NSByteCountFormatter stringFromByteCount:[oneDriveFile.size longLongValue] countStyle:NSByteCountFormatterCountStyleFile]];
+//                if (oneDriveFile.duration.intValue > 0) {
+//                    VLCTime *time = [VLCTime timeWithNumber:oneDriveFile.duration];
+//                    [subtitle appendFormat:@" — %@", [time verboseStringValue]];
+//                }
+//            } else if (oneDriveFile.duration.intValue > 0) {
+//                VLCTime *time = [VLCTime timeWithNumber:oneDriveFile.duration];
+//                [subtitle appendString:[time verboseStringValue]];
+//            }
+//            self.subtitle = subtitle;
+//        }
+//        self.title = oneDriveFile.name;
+//    }
+//}
 
 @end

+ 0 - 4
VLC.xcodeproj/project.pbxproj

@@ -85,7 +85,6 @@
 		7D00161C177056B700649F27 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 7D00161A17704DAC00649F27 /* main.js */; };
 		7D0117F1187F4BA400C5671C /* VLCFirstStepsFirstPageViewController~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D0117F0187F4BA400C5671C /* VLCFirstStepsFirstPageViewController~ipad.xib */; };
 		7D0C34E71BD951080058CD19 /* NSString+SupportedMedia.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784C5183A9972009EE944 /* NSString+SupportedMedia.m */; };
-		7D0C35331BD97C100058CD19 /* VLCOneDriveController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D1052ED1A4DCD1E00295F08 /* VLCOneDriveController.m */; };
 		7D0EDE091BE7752800363AA1 /* VLCLocalNetworkServiceBrowserFTP.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFEF21BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserFTP.m */; };
 		7D0EDE0A1BE7752C00363AA1 /* VLCNetworkServerBrowserFTP.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFEF61BDEBCE500B68579 /* VLCNetworkServerBrowserFTP.m */; };
 		7D1052E91A4DCC1100295F08 /* VLCOneDriveTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D1052E81A4DCC1100295F08 /* VLCOneDriveTableViewController.m */; };
@@ -239,7 +238,6 @@
 		7DF383B91BF21E4400D71A5C /* VLCPlayerControlWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF383B81BF21E4400D71A5C /* VLCPlayerControlWebSocket.m */; };
 		7DF383C11BF231BC00D71A5C /* VLCCloudStorageTVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF383C01BF231BC00D71A5C /* VLCCloudStorageTVViewController.m */; };
 		7DF383C41BF2329500D71A5C /* VLCDropboxCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF383C31BF2329500D71A5C /* VLCDropboxCollectionViewController.m */; };
-		7DF383CB1BF2498800D71A5C /* VLCOneDriveCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF383CA1BF2498800D71A5C /* VLCOneDriveCollectionViewController.m */; };
 		7DF383D01BF24BB100D71A5C /* VLCBoxCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF383CF1BF24BB100D71A5C /* VLCBoxCollectionViewController.m */; };
 		7DF7CA0717650C2A00C61739 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DF7CA0617650C2A00C61739 /* AVFoundation.framework */; };
 		7DF7E791175F47DC0018858D /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DF7E790175F47DC0018858D /* MediaPlayer.framework */; };
@@ -2808,7 +2806,6 @@
 				7DEBF37F1C076EE8007A4043 /* NSString+Locale.m in Sources */,
 				7DF90B4A1BE7A8110059C0E3 /* IASKSettingsReader.m in Sources */,
 				DD3EFF3E1BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserHTTP.m in Sources */,
-				7DF383CB1BF2498800D71A5C /* VLCOneDriveCollectionViewController.m in Sources */,
 				7DEC8BD91BD670EB006E1093 /* VLCPlaybackNavigationController.m in Sources */,
 				7DC0B5701C0094370027BFAD /* VLCSettingsViewController.m in Sources */,
 				7DEC8BDA1BD67112006E1093 /* VLCFrostedGlasView.m in Sources */,
@@ -2816,7 +2813,6 @@
 				7D398DC21CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */,
 				DD3EAC051BE153B4003668DA /* VLCNetworkImageView.m in Sources */,
 				7DF383B91BF21E4400D71A5C /* VLCPlayerControlWebSocket.m in Sources */,
-				7D0C35331BD97C100058CD19 /* VLCOneDriveController.m in Sources */,
 				7DB174B51CD20DC00085BCF0 /* VLCSearchController.m in Sources */,
 				DD13A37B1BEE2FAA00A35554 /* VLCMaskView.m in Sources */,
 				7DF383AC1BF206F100D71A5C /* VLCRemoteBrowsingCollectionViewController.m in Sources */,