Fix folder import in queue.
This commit is contained in:
2 files changed
+7
-5
No files matched your search
@@ -58,7 +58,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
||||
<rect key="frame" x="29" y="1" width="322" height="15"/>
|
||||
<rect key="frame" x="29" y="-1" width="322" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="srx-EJ-mK6">
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
|
||||
@@ -306,6 +306,7 @@ class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate,
|
||||
/// Adds an array of SBQueueItem to the queue.
|
||||
/// Implements the undo manager.
|
||||
func insert(items: [SBQueueItem], at indexes: IndexSet) {
|
||||
if items.isEmpty { return }
|
||||
guard let firstIndex = indexes.first else { fatalError() }
|
||||
|
||||
table.beginUpdates()
|
||||
@@ -591,10 +592,11 @@ class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate,
|
||||
|
||||
for fileURL in directoryEnumerator {
|
||||
|
||||
if let value = try? url.resourceValues(forKeys: [URLResourceKey.isDirectoryKey]), let isDirectory = value.isDirectory, isDirectory == false, let fileURL = fileURL as? URL, supportedFileFormats.contains(fileURL.pathExtension.lowercased()) {
|
||||
|
||||
items.append(createItem(url: fileURL))
|
||||
|
||||
let fileValue = try? url.resourceValues(forKeys: [URLResourceKey.isDirectoryKey])
|
||||
if fileValue?.isDirectory ?? false {
|
||||
if let fileURL = fileURL as? URL, supportedFileFormats.contains(fileURL.pathExtension.lowercased()) {
|
||||
items.append(createItem(url: fileURL))
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if supportedFileFormats.contains(url.pathExtension.lowercased()) {
|
||||
|
||||
Reference in new issue
Block a user