浏览代码

box controller: simplify code

Felix Paul Kühne 9 年之前
父节点
当前提交
c2cb6dae29
共有 1 个文件被更改,包括 1 次插入9 次删除
  1. 1 9
      Sources/VLCBoxController.m

+ 1 - 9
Sources/VLCBoxController.m

@@ -205,14 +205,6 @@
 }
 #endif
 
-- (BOOL)_supportedFileExtension:(NSString *)filename
-{
-    if ([filename isSupportedMediaFormat] || [filename isSupportedAudioMediaFormat] || [filename isSupportedSubtitleFormat])
-        return YES;
-
-    return NO;
-}
-
 //just pick out Directories and supported formats.
 //if the resulting list contains less than 10 items try to get more
 
@@ -230,7 +222,7 @@
         BOOL supportedFile = NO;
         if (!isDirectory) {
             BoxFile * file = (BoxFile *)boxFile;
-            supportedFile = [self _supportedFileExtension:[NSString stringWithFormat:@".%@",file.name.lastPathComponent]];
+            supportedFile = [[NSString stringWithFormat:@".%@",file.name.lastPathComponent] isSupportedFormat];
         }
 
        if (isDirectory || supportedFile)