Commit cf68d4f1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

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

parent 3197617f
//
// 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"
......
//
// 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];
}
......
......@@ -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)])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment