Add SBQueueSetOutputFilenameAction action.

This commit is contained in:
Damiano Galassi committed 2017-12-06 14:20:41 +01:00
1 parent 32791b4d5c
commit 477ffe293a
6 files changed
+82 -30

No files matched your search

+41 -28
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13189.4"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -15,7 +15,7 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="UlG-O3-eNc" userLabel="OptionsView">
<rect key="frame" x="0.0" y="0.0" width="370" height="447"/>
<rect key="frame" x="0.0" y="0.0" width="370" height="455"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<button translatesAutoresizingMaskIntoConstraints="NO" id="zEH-aV-Tl7">
@@ -33,7 +33,7 @@
</connections>
</button>
<button toolTip="Search metadata online" translatesAutoresizingMaskIntoConstraints="NO" id="9GN-f6-r2j">
<rect key="frame" x="110" y="421" width="105" height="18"/>
<rect key="frame" x="110" y="429" width="105" height="18"/>
<buttonCell key="cell" type="check" title="Fetch Metadata" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="QNO-e1-WUJ">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -61,7 +61,7 @@
</connections>
</button>
<button toolTip="Organize the mp4 alternate groups" translatesAutoresizingMaskIntoConstraints="NO" id="ccd-Xn-Dj3">
<rect key="frame" x="110" y="278" width="111" height="18"/>
<rect key="frame" x="110" y="286" width="111" height="18"/>
<buttonCell key="cell" type="check" title="Organize Groups" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="240-c7-2UW">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -75,7 +75,7 @@
</connections>
</button>
<button toolTip="Load the external srt subtitles file" translatesAutoresizingMaskIntoConstraints="NO" id="etc-K7-Atw">
<rect key="frame" x="110" y="242" width="142" height="18"/>
<rect key="frame" x="110" y="250" width="142" height="18"/>
<buttonCell key="cell" type="check" title="Load external subtitles" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="59T-kp-mV1">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -158,7 +158,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="eTL-yP-QQ5">
<rect key="frame" x="123" y="402" width="48" height="14"/>
<rect key="frame" x="123" y="410" width="48" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Movies:" id="W6m-cd-JMe">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -169,7 +169,7 @@
</connections>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="bDo-OD-bck">
<rect key="frame" x="123" y="356" width="63" height="14"/>
<rect key="frame" x="123" y="364" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="TV Shows:" id="PCe-Pw-D2s">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -188,7 +188,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="S7L-mA-j3Y">
<rect key="frame" x="18" y="423" width="89" height="14"/>
<rect key="frame" x="18" y="431" width="89" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Add item:" id="9ls-xq-YGz">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -225,7 +225,7 @@
</connections>
</popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZVm-yi-3cE">
<rect key="frame" x="177" y="401" width="111" height="17"/>
<rect key="frame" x="177" y="409" width="111" height="17"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="111" id="GuB-yU-C8O"/>
</constraints>
@@ -252,7 +252,7 @@
</connections>
</popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tLh-V3-OfB">
<rect key="frame" x="192" y="355" width="111" height="17"/>
<rect key="frame" x="192" y="363" width="111" height="17"/>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UOb-Qe-IPw">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -276,7 +276,7 @@
</connections>
</popUpButton>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="BWL-Nn-iGH">
<rect key="frame" x="133" y="336" width="63" height="14"/>
<rect key="frame" x="133" y="344" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Language:" id="1dC-y4-0rx">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -287,7 +287,7 @@
</connections>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="Ns9-7q-hsh">
<rect key="frame" x="123" y="309" width="54" height="14"/>
<rect key="frame" x="123" y="317" width="54" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Artwork:" id="1HP-Np-D97">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -298,7 +298,7 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ce4-O7-Iu4">
<rect key="frame" x="202" y="335" width="111" height="17"/>
<rect key="frame" x="202" y="343" width="111" height="17"/>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="nqF-p0-mT7">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -323,7 +323,7 @@
</connections>
</popUpButton>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="73q-gi-fe2">
<rect key="frame" x="133" y="382" width="63" height="14"/>
<rect key="frame" x="133" y="390" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Language:" id="VkG-jW-ibO">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -334,7 +334,7 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5rh-cM-iOg">
<rect key="frame" x="202" y="381" width="111" height="17"/>
<rect key="frame" x="202" y="389" width="111" height="17"/>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gZb-sF-UQs">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -359,7 +359,7 @@
</connections>
</popUpButton>
<button toolTip="Organize the audio fallbacks" translatesAutoresizingMaskIntoConstraints="NO" id="TV6-Sk-Bqr">
<rect key="frame" x="110" y="260" width="119" height="18"/>
<rect key="frame" x="110" y="268" width="119" height="18"/>
<buttonCell key="cell" type="check" title="Fix audio fallbacks" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="W6u-1c-BsI">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -373,7 +373,7 @@
</connections>
</button>
<button toolTip="Set tracks without a language to the selected one" translatesAutoresizingMaskIntoConstraints="NO" id="slL-2h-MPl">
<rect key="frame" x="110" y="206" width="160" height="18"/>
<rect key="frame" x="110" y="214" width="160" height="18"/>
<buttonCell key="cell" type="check" title="Complete tracks language" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="cxz-2q-RIP">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -387,7 +387,7 @@
</connections>
</button>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="swT-iM-shZ">
<rect key="frame" x="133" y="189" width="63" height="14"/>
<rect key="frame" x="133" y="197" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Language:" id="GBM-Sa-9GJ">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -398,9 +398,9 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZZk-4j-Ji7">
<rect key="frame" x="203" y="188" width="111" height="17"/>
<rect key="frame" x="203" y="196" width="112" height="17"/>
<constraints>
<constraint firstAttribute="width" constant="111" id="jXG-U4-57N"/>
<constraint firstAttribute="width" constant="112" id="jXG-U4-57N"/>
</constraints>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kEh-SN-iHZ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -440,7 +440,7 @@
</connections>
</button>
<button toolTip="Delete all custom track names" translatesAutoresizingMaskIntoConstraints="NO" id="22k-mA-HyA">
<rect key="frame" x="110" y="224" width="123" height="18"/>
<rect key="frame" x="110" y="232" width="123" height="18"/>
<buttonCell key="cell" type="check" title="Clear tracks names" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="mtK-5C-Pzh">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -454,7 +454,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="08Q-2k-0Gb">
<rect key="frame" x="183" y="307" width="74" height="17"/>
<rect key="frame" x="183" y="315" width="74" height="17"/>
<popUpButtonCell key="cell" type="roundRect" title="Poster" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" selectedItem="YjX-6f-SPu" id="1t8-o9-ckI">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -488,7 +488,7 @@
</connections>
</popUpButton>
<button toolTip="Set the color space of video tracks to the selected one" translatesAutoresizingMaskIntoConstraints="NO" id="Pdq-s0-erT">
<rect key="frame" x="110" y="170" width="116" height="18"/>
<rect key="frame" x="110" y="178" width="116" height="18"/>
<buttonCell key="cell" type="check" title="Apply color space" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="0By-RQ-4mS">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -502,7 +502,7 @@
</connections>
</button>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="2Hf-2V-95U">
<rect key="frame" x="133" y="154" width="76" height="14"/>
<rect key="frame" x="133" y="162" width="76" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Color Space:" id="tMS-Tg-pPf">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -513,7 +513,7 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s2g-Iz-52P">
<rect key="frame" x="216" y="152" width="120" height="17"/>
<rect key="frame" x="216" y="160" width="120" height="17"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="111" id="57c-cZ-60x"/>
</constraints>
@@ -536,6 +536,16 @@
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueApplyColorSpace" id="XuE-t2-UYJ"/>
</connections>
</popUpButton>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Hjl-i0-gFW">
<rect key="frame" x="110" y="142" width="125" height="18"/>
<buttonCell key="cell" type="check" title="Set output filename" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="Qld-0F-DsX">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<binding destination="-2" name="value" keyPath="self.options.SBQueueSetOutputFilename" id="G0N-Gp-AQS"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="slL-2h-MPl" secondAttribute="trailing" constant="20" id="0EO-hK-q5e"/>
@@ -552,6 +562,7 @@
<constraint firstItem="NhN-Lg-awX" firstAttribute="baseline" secondItem="DVM-Js-DwK" secondAttribute="baseline" id="8Cp-6o-kA4"/>
<constraint firstItem="DVM-Js-DwK" firstAttribute="leading" secondItem="NhN-Lg-awX" secondAttribute="trailing" constant="5" id="A1k-kg-a8J"/>
<constraint firstItem="ccd-Xn-Dj3" firstAttribute="top" secondItem="08Q-2k-0Gb" secondAttribute="bottom" constant="15" id="Bq9-Tm-H1q"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Hjl-i0-gFW" secondAttribute="trailing" constant="20" id="DEq-5c-cxf"/>
<constraint firstItem="etc-K7-Atw" firstAttribute="top" secondItem="TV6-Sk-Bqr" secondAttribute="bottom" constant="6" id="DLe-Jt-ggK"/>
<constraint firstItem="tLh-V3-OfB" firstAttribute="baseline" secondItem="bDo-OD-bck" secondAttribute="baseline" id="DkA-18-WbB"/>
<constraint firstItem="Ce4-O7-Iu4" firstAttribute="leading" secondItem="BWL-Nn-iGH" secondAttribute="trailing" constant="8" id="Eed-Ur-ajn"/>
@@ -569,9 +580,9 @@
<constraint firstItem="tLh-V3-OfB" firstAttribute="leading" secondItem="bDo-OD-bck" secondAttribute="trailing" constant="8" id="NhO-8t-Aqz"/>
<constraint firstItem="zEH-aV-Tl7" firstAttribute="leading" secondItem="MGZ-hB-jhx" secondAttribute="leading" id="Nlo-A9-ESw"/>
<constraint firstItem="22k-mA-HyA" firstAttribute="top" secondItem="etc-K7-Atw" secondAttribute="bottom" constant="6" id="OTk-pM-SaL"/>
<constraint firstItem="DVM-Js-DwK" firstAttribute="top" secondItem="s2g-Iz-52P" secondAttribute="bottom" constant="16" id="PId-db-qoS"/>
<constraint firstItem="ZVm-yi-3cE" firstAttribute="width" secondItem="5rh-cM-iOg" secondAttribute="width" id="PZr-W4-6ok"/>
<constraint firstItem="08Q-2k-0Gb" firstAttribute="top" secondItem="Ce4-O7-Iu4" secondAttribute="bottom" constant="12" id="Psc-21-kax"/>
<constraint firstItem="Hjl-i0-gFW" firstAttribute="leading" secondItem="ccd-Xn-Dj3" secondAttribute="leading" id="Qgg-gs-Cpe"/>
<constraint firstItem="s2g-Iz-52P" firstAttribute="leading" secondItem="2Hf-2V-95U" secondAttribute="trailing" constant="9" id="Sbo-ms-QTl"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="DVM-Js-DwK" secondAttribute="trailing" constant="20" id="THN-Kq-Zh9"/>
<constraint firstItem="86l-GG-SpO" firstAttribute="leading" secondItem="vJ5-JB-k1m" secondAttribute="trailing" constant="5" id="TeG-3v-fcb"/>
@@ -591,6 +602,7 @@
<constraint firstAttribute="bottom" secondItem="zEH-aV-Tl7" secondAttribute="bottom" constant="10" id="b9M-Sl-azv"/>
<constraint firstItem="KWg-Ak-bB6" firstAttribute="top" secondItem="86l-GG-SpO" secondAttribute="bottom" constant="4" id="bid-SJ-xdV"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="TV6-Sk-Bqr" secondAttribute="trailing" constant="20" id="bwF-mF-sxu"/>
<constraint firstItem="DVM-Js-DwK" firstAttribute="top" secondItem="Hjl-i0-gFW" secondAttribute="bottom" constant="8" id="c6c-TQ-ldg"/>
<constraint firstItem="slL-2h-MPl" firstAttribute="top" secondItem="22k-mA-HyA" secondAttribute="bottom" constant="6" id="cIg-Xn-0eb"/>
<constraint firstItem="eTL-yP-QQ5" firstAttribute="baseline" secondItem="ZVm-yi-3cE" secondAttribute="baseline" id="cev-uP-NXR"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="yI9-2a-q2a" secondAttribute="trailing" constant="20" id="d2E-dG-y9d"/>
@@ -601,6 +613,7 @@
<constraint firstItem="TV6-Sk-Bqr" firstAttribute="leading" secondItem="ccd-Xn-Dj3" secondAttribute="leading" id="hnH-5m-uQi"/>
<constraint firstItem="TV6-Sk-Bqr" firstAttribute="top" secondItem="ccd-Xn-Dj3" secondAttribute="bottom" constant="6" id="i86-G2-ukZ"/>
<constraint firstItem="5rh-cM-iOg" firstAttribute="top" secondItem="ZVm-yi-3cE" secondAttribute="bottom" constant="4" id="iUq-0X-QIX"/>
<constraint firstItem="Hjl-i0-gFW" firstAttribute="top" secondItem="s2g-Iz-52P" secondAttribute="bottom" constant="4" id="imA-4s-CoI"/>
<constraint firstItem="KWg-Ak-bB6" firstAttribute="leading" secondItem="muY-E0-hVI" secondAttribute="trailing" constant="5" id="jAq-2z-d2z"/>
<constraint firstItem="tLh-V3-OfB" firstAttribute="width" secondItem="Ce4-O7-Iu4" secondAttribute="width" id="jHG-5y-O2G"/>
<constraint firstItem="BWL-Nn-iGH" firstAttribute="leading" secondItem="bDo-OD-bck" secondAttribute="leading" constant="10" id="jVz-7g-q3T"/>
@@ -632,7 +645,7 @@
<constraint firstItem="zEH-aV-Tl7" firstAttribute="top" secondItem="yI9-2a-q2a" secondAttribute="bottom" constant="6" id="yi7-mU-teZ"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ccd-Xn-Dj3" secondAttribute="trailing" constant="20" id="zrg-ax-2rw"/>
</constraints>
<point key="canvasLocation" x="149" y="21"/>
<point key="canvasLocation" x="-182" y="64.5"/>
</customView>
<arrayController objectClassName="Preset" automaticallyPreparesContent="YES" id="vyv-na-Xpo" userLabel="Set Controller">
<declaredKeys>
+10
View File
@@ -7,6 +7,14 @@
import Foundation
private extension String {
func condensingWhitespace() -> String {
return self.components(separatedBy: .whitespacesAndNewlines)
.filter { !$0.isEmpty }
.joined(separator: " ")
}
}
extension MP42File {
enum TrackHDType : Int {
@@ -95,6 +103,8 @@ extension MP42File {
}
}
name = name.trimmingCharacters(in: CharacterSet(charactersIn: ":/")).condensingWhitespace()
return name.isEmpty ? nil : name
}
}
+21
View File
@@ -13,6 +13,27 @@ import Foundation
// @objc var localizedDescription: String { get }
//}
/// An action that set a formatted file name.
@objc(SBQueueSetOutputFilenameAction) class QueueSetOutputFilenameAction: NSObject, SBQueueActionProtocol {
var localizedDescription: String { return NSLocalizedString("Setting Name", comment: "Action localized description.") }
override var description: String { return NSLocalizedString("Set Name", comment: "Action description.") }
@objc override init() {}
func runAction(_ item: SBQueueItem) {
if let formattedName = item.mp4File?.formattedFileName() {
let pathExtension = item.destURL.pathExtension
let destURL = item.destURL.deletingLastPathComponent().appendingPathComponent(formattedName).appendingPathExtension(pathExtension)
item.destURL = destURL
}
}
func encode(with aCoder: NSCoder) {}
required init?(coder aDecoder: NSCoder) {}
static var supportsSecureCoding: Bool { return true }
}
/// An action that search in the item source directory for additionals srt subtitles.
@objc(SBQueueSubtitlesAction) class QueueSubtitlesAction : NSObject, SBQueueActionProtocol {
+4
View File
@@ -263,6 +263,10 @@ static void *SBQueueContex = &SBQueueContex;
preferredArtwork:[self.options[SBQueueProviderArtwork] unsignedIntegerValue]]];
}
if ([(self.options)[SBQueueSetOutputFilename] boolValue]) {
[item addAction:[[SBQueueSetOutputFilenameAction alloc] init]];
}
if ([(self.options)[SBQueueSubtitles] boolValue]) {
[item addAction:[[SBQueueSubtitlesAction alloc] init]];
}
+1
View File
@@ -34,6 +34,7 @@ extern NSString * const SBQueueMovieProviderLanguage;
extern NSString * const SBQueueTVShowProviderLanguage;
extern NSString * const SBQueueProviderArtwork;
extern NSString * const SBQueueSetOutputFilename;
extern NSString * const SBQueueDestination;
@interface SBQueuePreferences : NSObject
+5 -2
View File
@@ -37,6 +37,7 @@ NSString * const SBQueueTVShowProviderLanguage = @"SBQueueTVShowProviderLanguage
NSString * const SBQueueProviderArtwork = @"SBQueueProviderArtwork";
NSString * const SBQueueSet = @"SBQueueSet";
NSString * const SBQueueSetOutputFilename = @"SBQueueSetOutputFilename";
@implementation SBQueuePreferences
@@ -45,7 +46,7 @@ NSString * const SBQueueSet = @"SBQueueSet";
if (self) {
_options = [[NSMutableDictionary alloc] init];
NSArray *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueOptimize, SBQueueShowDoneNotification, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork];
NSArray<NSString *> *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueOptimize, SBQueueShowDoneNotification, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork, SBQueueSetOutputFilename];
[keys enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
self.options[obj] = [[NSUserDefaults standardUserDefaults] valueForKey:obj];
@@ -84,6 +85,8 @@ NSString * const SBQueueSet = @"SBQueueSet";
SBQueueApplyColorSpace: @NO,
SBQueueApplyColorSpaceValue: @1,
SBQueueSetOutputFilename: @NO,
SBQueueAutoStart: @NO,
SBQueueOptimize : @YES,
SBQueueShowDoneNotification: @YES,
@@ -99,7 +102,7 @@ NSString * const SBQueueSet = @"SBQueueSet";
* Save the queue user defaults
*/
- (void)saveUserDefaults {
NSArray<NSString *> *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueShowDoneNotification, SBQueueOptimize, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork];
NSArray<NSString *> *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueShowDoneNotification, SBQueueOptimize, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork, SBQueueSetOutputFilename];
[keys enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[[NSUserDefaults standardUserDefaults] setValue:self.options[obj] forKey:obj];