Only add the supporter files to the queue.

This commit is contained in:
Damiano Galassi committed 2015-09-28 13:40:39 +02:00
1 parent b6105f52bb
commit 31280c4f41
1 file changed
+5 -2
+5 -2
View File
@@ -693,10 +693,13 @@ static void *SBQueueContex = &SBQueueContex;
NSArray *items = [pboard readObjectsForClasses:@[[NSURL class]] options: nil];
NSMutableArray *queueItems = [[NSMutableArray alloc] init];
NSMutableIndexSet *indexes = [[NSMutableIndexSet alloc] init];
NSArray<NSString *> *supportedFileFormats = [MP42FileImporter supportedFileFormats];
for (NSURL *url in items) {
[queueItems addObject:[self createItemWithURL:url]];
[indexes addIndex:row];
if ([supportedFileFormats containsObject:url.pathExtension.lowercaseString]) {
[queueItems addObject:[self createItemWithURL:url]];
[indexes addIndex:row];
}
}
[self addItems:queueItems atIndexes:indexes];