瀏覽代碼

Dropbox: don't filter results because users complained too much about it

Felix Paul Kühne 9 年之前
父節點
當前提交
cf68d4f1de

+ 10 - 7
SharedSources/Clouds/VLCDropboxCollectionViewController.h

@@ -1,10 +1,13 @@
-//
-//  VLCDropboxCollectionViewController.h
-//  VLC for iOS
-//
-//  Created by Felix Paul Kühne on 10/11/15.
-//  Copyright © 2015 VideoLAN. All rights reserved.
-//
+/*****************************************************************************
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan.org>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
 
 #import "VLCCloudStorageTVViewController.h"
 

+ 14 - 9
SharedSources/Clouds/VLCDropboxCollectionViewController.m

@@ -1,10 +1,13 @@
-//
-//  VLCDropboxCollectionViewController.m
-//  VLC for iOS
-//
-//  Created by Felix Paul Kühne on 10/11/15.
-//  Copyright © 2015 VideoLAN. All rights reserved.
-//
+/*****************************************************************************
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan.org>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
 
 #import "VLCDropboxCollectionViewController.h"
 #import "VLCDropboxController.h"
@@ -44,8 +47,10 @@
     self.controller = [VLCDropboxController sharedInstance];
     self.controller.delegate = self;
 
-    if (self.currentPath != nil)
-        self.title = self.currentPath.lastPathComponent;
+    if (self.currentPath != nil) {
+        NSString *lastPathComponent = self.currentPath.lastPathComponent;
+        self.title = lastPathComponent.length > 0 ? lastPathComponent : @"Dropbox";
+    }
 
     [self updateViewAfterSessionChange];
 }

+ 1 - 13
Sources/VLCDropboxController.m

@@ -174,19 +174,7 @@
 
 - (void)restClient:(DBRestClient *)client loadedMetadata:(DBMetadata *)metadata
 {
-    NSMutableArray *listOfGoodFilesAndFolders = [[NSMutableArray alloc] init];
-
-    if (metadata.isDirectory) {
-        NSArray *contents = metadata.contents;
-        NSUInteger metaDataCount = metadata.contents.count;
-        for (NSUInteger x = 0; x < metaDataCount; x++) {
-            DBMetadata *file = contents[x];
-            if ([file isDirectory] || [self _supportedFileExtension:file.filename])
-                [listOfGoodFilesAndFolders addObject:file];
-        }
-    }
-
-    _currentFileList = [NSArray arrayWithArray:listOfGoodFilesAndFolders];
+    _currentFileList = [NSArray arrayWithArray:metadata.contents];
 
     APLog(@"found filtered metadata for %lu files", (unsigned long)_currentFileList.count);
     if ([self.delegate respondsToSelector:@selector(mediaListUpdated)])