Browse Source

VLCGoogleDriveController: Remove trashed items from list (closes #53)

Signed-off-by: Carola Nitz <nitz.carola@googlemail.com>
Soomin Lee 7 years ago
parent
commit
aeeedddaed
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Sources/VLCGoogleDriveController.m

+ 4 - 0
Sources/VLCGoogleDriveController.m

@@ -259,6 +259,10 @@
     NSMutableArray *listOfGoodFilesAndFolders = [[NSMutableArray alloc] init];
     NSMutableArray *listOfGoodFilesAndFolders = [[NSMutableArray alloc] init];
 
 
     for (GTLDriveFile *iter in _fileList.files) {
     for (GTLDriveFile *iter in _fileList.files) {
+        if (iter.trashed.boolValue) {
+            continue;
+        }
+
         BOOL isDirectory = [iter.mimeType isEqualToString:@"application/vnd.google-apps.folder"];
         BOOL isDirectory = [iter.mimeType isEqualToString:@"application/vnd.google-apps.folder"];
         BOOL supportedFile = [self _supportedFileExtension:iter.name];
         BOOL supportedFile = [self _supportedFileExtension:iter.name];