Add a "Send to iTunes" queue action, rewrite queue preferences in Swift.
This commit is contained in:
10 files changed
+360
-342
No files matched your search
+86
-69
@@ -15,17 +15,17 @@
|
||||
<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="471"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="370" height="488"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="zEH-aV-Tl7">
|
||||
<rect key="frame" x="110" y="54" width="69" height="18"/>
|
||||
<rect key="frame" x="110" y="71" width="69" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Optimize" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="nig-pN-efw">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueOptimize" id="Xni-Sv-Yx7">
|
||||
<binding destination="-2" name="value" keyPath="self.options.optimize" id="2oW-EB-1dq">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -33,13 +33,13 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Clear existing metadata" translatesAutoresizingMaskIntoConstraints="NO" id="9GN-f6-r2j">
|
||||
<rect key="frame" x="110" y="445" width="146" height="18"/>
|
||||
<rect key="frame" x="110" y="462" width="146" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Clear existing 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueClearExistingMetadata" id="3Vo-7M-Ssk">
|
||||
<binding destination="-2" name="value" keyPath="self.options.clearExistingMetadata" id="PhG-DP-JFS">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -53,7 +53,7 @@
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueAutoStart" id="LeC-ZK-MOy">
|
||||
<binding destination="-2" name="value" keyPath="self.options.autoStart" id="ag1-8O-XDb">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -61,13 +61,13 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Organize the mp4 alternate groups" translatesAutoresizingMaskIntoConstraints="NO" id="ccd-Xn-Dj3">
|
||||
<rect key="frame" x="110" y="282" width="111" height="18"/>
|
||||
<rect key="frame" x="110" y="299" 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueOrganize" id="udT-og-GPU">
|
||||
<binding destination="-2" name="value" keyPath="self.options.organize" id="phH-MF-SOh">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -75,13 +75,13 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Load the external srt subtitles file" translatesAutoresizingMaskIntoConstraints="NO" id="etc-K7-Atw">
|
||||
<rect key="frame" x="110" y="246" width="142" height="18"/>
|
||||
<rect key="frame" x="110" y="263" 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueSubtitles" id="bzI-lR-Dui">
|
||||
<binding destination="-2" name="value" keyPath="self.options.subtitles" id="BZp-nF-g91">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -89,7 +89,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="86l-GG-SpO">
|
||||
<rect key="frame" x="176" y="96" width="128" height="17"/>
|
||||
<rect key="frame" x="176" y="113" width="128" height="17"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" imagePosition="left" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="6jC-r9-LzT" id="8bb-Gy-KAS">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@@ -115,7 +115,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="vJ5-JB-k1m">
|
||||
<rect key="frame" x="111" y="97" width="62" height="14"/>
|
||||
<rect key="frame" x="111" y="114" width="62" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Location:" id="17e-9u-rVn">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -123,7 +123,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KWg-Ak-bB6">
|
||||
<rect key="frame" x="176" y="76" width="128" height="17"/>
|
||||
<rect key="frame" x="176" y="93" width="128" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="128" id="FJx-GH-nWg"/>
|
||||
</constraints>
|
||||
@@ -139,11 +139,11 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="muY-E0-hVI" id="iFi-gQ-ERy"/>
|
||||
<binding destination="-2" name="selectedValue" keyPath="self.options.SBQueueFileType" id="abl-Kk-Yhw"/>
|
||||
<binding destination="-2" name="selectedValue" keyPath="self.options.fileType" id="cpt-5g-SPz"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="muY-E0-hVI">
|
||||
<rect key="frame" x="111" y="78" width="62" height="14"/>
|
||||
<rect key="frame" x="111" y="95" width="62" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="File Type:" id="UbR-KJ-8iR">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -151,7 +151,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="NhN-Lg-awX">
|
||||
<rect key="frame" x="111" y="117" width="62" height="14"/>
|
||||
<rect key="frame" x="111" y="134" width="62" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Apply Set:" id="9gt-mI-zIV">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -159,25 +159,25 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="eTL-yP-QQ5">
|
||||
<rect key="frame" x="123" y="406" width="48" height="14"/>
|
||||
<rect key="frame" x="123" y="423" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="2eU-MV-o1B"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="b58-Sd-wqT"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="bDo-OD-bck">
|
||||
<rect key="frame" x="123" y="360" width="63" height="14"/>
|
||||
<rect key="frame" x="123" y="377" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="Xd6-EH-Zdj"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="VZ7-3B-gA7"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="250" translatesAutoresizingMaskIntoConstraints="NO" id="Uoo-hZ-D1f">
|
||||
@@ -189,7 +189,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="S7L-mA-j3Y">
|
||||
<rect key="frame" x="18" y="447" width="89" height="14"/>
|
||||
<rect key="frame" x="18" y="464" 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"/>
|
||||
@@ -197,7 +197,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DVM-Js-DwK">
|
||||
<rect key="frame" x="176" y="116" width="128" height="17"/>
|
||||
<rect key="frame" x="176" y="133" width="128" height="17"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bQx-xN-b3H">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@@ -218,7 +218,7 @@
|
||||
<bool key="NSInsertsNullPlaceholder" value="YES"/>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueSet" previousBinding="5QH-Z2-W7X" id="ELF-zz-jwr">
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.metadataSet" previousBinding="5QH-Z2-W7X" id="cUx-b7-bym">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -226,7 +226,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZVm-yi-3cE">
|
||||
<rect key="frame" x="177" y="405" width="111" height="17"/>
|
||||
<rect key="frame" x="177" y="422" width="111" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="111" id="GuB-yU-C8O"/>
|
||||
</constraints>
|
||||
@@ -237,7 +237,7 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="eTL-yP-QQ5" id="yqm-mb-EEC"/>
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueMovieProvider" previousBinding="crR-iB-g3d" id="zMN-ZS-xkn">
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.movieProvider" previousBinding="crR-iB-g3d" id="R8x-s5-7kx">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -249,11 +249,11 @@
|
||||
<string key="NSNullPlaceholder">None</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="IHE-rh-qMI"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="qbd-lB-tlh"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tLh-V3-OfB">
|
||||
<rect key="frame" x="192" y="359" width="111" height="17"/>
|
||||
<rect key="frame" x="192" y="376" 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"/>
|
||||
@@ -261,12 +261,12 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="bDo-OD-bck" id="QLi-eD-c80"/>
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueTVShowProvider" previousBinding="Rh9-LC-qBz" id="29h-lK-saO">
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.tvShowProvider" previousBinding="Rh9-LC-qBz" id="UNJ-vv-QNU">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="WZY-iH-YJ5"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="j0J-dB-T94"/>
|
||||
<binding destination="-2" name="content" keyPath="self.tvShowsProviders" id="Rh9-LC-qBz">
|
||||
<dictionary key="options">
|
||||
<string key="NSNoSelectionPlaceholder">None</string>
|
||||
@@ -277,29 +277,29 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="BWL-Nn-iGH">
|
||||
<rect key="frame" x="133" y="340" width="63" height="14"/>
|
||||
<rect key="frame" x="133" y="357" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="A11-N0-4xV"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="ZDg-5s-ifn"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="Ns9-7q-hsh">
|
||||
<rect key="frame" x="123" y="313" width="54" height="14"/>
|
||||
<rect key="frame" x="123" y="330" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="yVt-sh-KZm"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="P4n-8a-tkn"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ce4-O7-Iu4">
|
||||
<rect key="frame" x="202" y="339" width="111" height="17"/>
|
||||
<rect key="frame" x="202" y="356" 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"/>
|
||||
@@ -307,13 +307,13 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="BWL-Nn-iGH" id="JXO-cc-nzq"/>
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueTVShowProviderLanguage" previousBinding="aF7-XO-EMK" id="8X6-cZ-U2V">
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.tvShowProviderLanguage" previousBinding="aF7-XO-EMK" id="sba-2Q-6Tl">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
<string key="NSValueTransformerName">SBLanguageTransformer</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="P1S-72-eFU"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="Jl9-UB-g4v"/>
|
||||
<binding destination="-2" name="content" keyPath="self.tvShowLanguages" id="aF7-XO-EMK">
|
||||
<dictionary key="options">
|
||||
<string key="NSNoSelectionPlaceholder">None</string>
|
||||
@@ -324,18 +324,18 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="73q-gi-fe2">
|
||||
<rect key="frame" x="133" y="386" width="63" height="14"/>
|
||||
<rect key="frame" x="133" y="403" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="gYI-7C-fKA"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="iM6-pw-fHA"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5rh-cM-iOg">
|
||||
<rect key="frame" x="202" y="385" width="111" height="17"/>
|
||||
<rect key="frame" x="202" y="402" 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"/>
|
||||
@@ -343,7 +343,7 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="73q-gi-fe2" id="ip8-cv-5qY"/>
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueMovieProviderLanguage" previousBinding="3w0-jj-Nkk" id="Zri-JY-c6Z">
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.movieProviderLanguage" previousBinding="3w0-jj-Nkk" id="eZ6-gt-1l2">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
<string key="NSValueTransformerName">SBLanguageTransformer</string>
|
||||
@@ -356,17 +356,17 @@
|
||||
<string key="NSNullPlaceholder">None</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="ABT-BG-W0N"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="Wpf-TY-gSh"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button toolTip="Organize the audio fallbacks" translatesAutoresizingMaskIntoConstraints="NO" id="TV6-Sk-Bqr">
|
||||
<rect key="frame" x="110" y="264" width="119" height="18"/>
|
||||
<rect key="frame" x="110" y="281" 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueFixFallbacks" id="U7y-tJ-Bmc">
|
||||
<binding destination="-2" name="value" keyPath="self.options.fixFallbacks" id="W1e-uB-NXG">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -374,13 +374,13 @@
|
||||
</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="210" width="160" height="18"/>
|
||||
<rect key="frame" x="110" y="227" 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueFixTrackLanguage" id="NVa-C5-95d">
|
||||
<binding destination="-2" name="value" keyPath="self.options.fixTrackLanguage" id="deV-oB-IXG">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -388,18 +388,18 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="swT-iM-shZ">
|
||||
<rect key="frame" x="133" y="193" width="63" height="14"/>
|
||||
<rect key="frame" x="133" y="210" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueFixTrackLanguage" id="0eo-Zt-d9J"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.fixTrackLanguage" id="PeH-Tg-UKf"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZZk-4j-Ji7">
|
||||
<rect key="frame" x="203" y="192" width="112" height="17"/>
|
||||
<rect key="frame" x="203" y="209" width="112" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="112" id="jXG-U4-57N"/>
|
||||
</constraints>
|
||||
@@ -410,7 +410,7 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="swT-iM-shZ" id="WOm-Jt-xnu"/>
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueFixTrackLanguageValue" previousBinding="Xnw-Nt-5dZ" id="f5f-5X-yeg">
|
||||
<binding destination="-2" name="selectedObject" keyPath="options.fixTrackLanguageValue" previousBinding="Xnw-Nt-5dZ" id="Duk-hs-dVB">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
<string key="NSValueTransformerName">SBLanguageTransformer</string>
|
||||
@@ -423,7 +423,7 @@
|
||||
<string key="NSNullPlaceholder">Unknown</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueFixTrackLanguage" id="KJY-da-f0t"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.fixTrackLanguage" id="iYk-sU-PL5"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="yI9-2a-q2a">
|
||||
@@ -433,7 +433,7 @@
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueShowDoneNotification" id="IDO-dY-2I1">
|
||||
<binding destination="-2" name="value" keyPath="self.options.showDoneNotification" id="5Am-9x-0Yu">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -441,13 +441,13 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Delete all custom track names" translatesAutoresizingMaskIntoConstraints="NO" id="22k-mA-HyA">
|
||||
<rect key="frame" x="110" y="228" width="123" height="18"/>
|
||||
<rect key="frame" x="110" y="245" 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueClearTrackName" id="9Ev-3N-hW6">
|
||||
<binding destination="-2" name="value" keyPath="self.options.clearTrackName" id="C0n-Hb-80l">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -455,7 +455,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="08Q-2k-0Gb">
|
||||
<rect key="frame" x="183" y="311" width="74" height="17"/>
|
||||
<rect key="frame" x="183" y="328" 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"/>
|
||||
@@ -484,18 +484,18 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="Ns9-7q-hsh" id="Ket-SC-hm0"/>
|
||||
<binding destination="-2" name="selectedTag" keyPath="options.SBQueueProviderArtwork" id="P2I-s3-oH6"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="Iqc-R5-L9d"/>
|
||||
<binding destination="-2" name="selectedTag" keyPath="options.providerArtwork" id="SuR-UI-kbx"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.searchMetadata" id="YP1-Ux-HEP"/>
|
||||
</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="174" width="116" height="18"/>
|
||||
<rect key="frame" x="110" y="191" 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"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueApplyColorSpace" id="r0h-Xs-HVb">
|
||||
<binding destination="-2" name="value" keyPath="self.options.applyColorSpace" id="jug-JB-zTC">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -503,18 +503,18 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="2Hf-2V-95U">
|
||||
<rect key="frame" x="133" y="158" width="76" height="14"/>
|
||||
<rect key="frame" x="133" y="175" 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"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueFixTrackLanguage" id="Auc-OW-gNu"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.applyColorSpace" id="I0m-dP-zcJ"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s2g-Iz-52P">
|
||||
<rect key="frame" x="216" y="156" width="120" height="17"/>
|
||||
<rect key="frame" x="216" y="173" width="120" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="111" id="57c-cZ-60x"/>
|
||||
</constraints>
|
||||
@@ -533,28 +533,42 @@
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="2Hf-2V-95U" id="Eze-Wq-wVA"/>
|
||||
<binding destination="-2" name="selectedTag" keyPath="options.SBQueueApplyColorSpaceValue" id="7tY-4O-RMF"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueApplyColorSpace" id="XuE-t2-UYJ"/>
|
||||
<binding destination="-2" name="selectedTag" keyPath="options.applyColorSpaceValue" id="8Op-fu-qSJ"/>
|
||||
<binding destination="-2" name="enabled" keyPath="self.options.applyColorSpace" id="XeN-JD-eln"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Hjl-i0-gFW">
|
||||
<rect key="frame" x="110" y="138" width="125" height="18"/>
|
||||
<rect key="frame" x="110" y="155" 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"/>
|
||||
<binding destination="-2" name="value" keyPath="self.options.setOutputFilename" id="THt-yK-839"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Search metadata online" translatesAutoresizingMaskIntoConstraints="NO" id="s8r-Cf-VfB">
|
||||
<rect key="frame" x="110" y="427" width="105" height="18"/>
|
||||
<rect key="frame" x="110" y="444" 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="h5x-un-6cJ">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.SBQueueMetadata" id="YHZ-ap-mNu">
|
||||
<binding destination="-2" name="value" keyPath="self.options.searchMetadata" id="IjF-Yf-poW">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
</binding>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="zVi-vU-sh2">
|
||||
<rect key="frame" x="110" y="53" width="100" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Send to iTunes" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="4an-VK-S2u">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.sendToiTunes" id="NBZ-1e-YyZ">
|
||||
<dictionary key="options">
|
||||
<bool key="NSValidatesImmediately" value="YES"/>
|
||||
</dictionary>
|
||||
@@ -576,7 +590,6 @@
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="5rh-cM-iOg" secondAttribute="trailing" priority="750" constant="20" id="7Da-zR-5Y7"/>
|
||||
<constraint firstItem="ZVm-yi-3cE" firstAttribute="leading" secondItem="eTL-yP-QQ5" secondAttribute="trailing" constant="8" id="7T2-6l-HYr"/>
|
||||
<constraint firstItem="NhN-Lg-awX" firstAttribute="baseline" secondItem="DVM-Js-DwK" secondAttribute="baseline" id="8Cp-6o-kA4"/>
|
||||
<constraint firstItem="MGZ-hB-jhx" firstAttribute="top" secondItem="zEH-aV-Tl7" secondAttribute="bottom" constant="17" id="8Lb-Jh-EFk"/>
|
||||
<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"/>
|
||||
@@ -589,6 +602,7 @@
|
||||
<constraint firstItem="zEH-aV-Tl7" firstAttribute="leading" secondItem="s8r-Cf-VfB" secondAttribute="leading" id="GhW-mQ-ZGd"/>
|
||||
<constraint firstItem="tLh-V3-OfB" firstAttribute="top" secondItem="5rh-cM-iOg" secondAttribute="bottom" constant="10" id="Hub-uy-myD"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="22k-mA-HyA" secondAttribute="trailing" constant="20" id="I8x-Nb-QqZ"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="zVi-vU-sh2" secondAttribute="trailing" constant="20" id="IXI-AY-3qH"/>
|
||||
<constraint firstItem="9GN-f6-r2j" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="trailing" constant="8" id="IXr-XJ-eo1"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="s2g-Iz-52P" secondAttribute="trailing" constant="20" id="J5i-8T-phW"/>
|
||||
<constraint firstItem="Uoo-hZ-D1f" firstAttribute="width" secondItem="S7L-mA-j3Y" secondAttribute="width" id="JU3-fd-6gz"/>
|
||||
@@ -617,6 +631,7 @@
|
||||
<constraint firstItem="KWg-Ak-bB6" firstAttribute="baseline" secondItem="muY-E0-hVI" secondAttribute="baseline" id="Zsz-2B-X9B"/>
|
||||
<constraint firstItem="NhN-Lg-awX" firstAttribute="leading" secondItem="9GN-f6-r2j" secondAttribute="leading" id="a4I-oV-8fy"/>
|
||||
<constraint firstItem="Ce4-O7-Iu4" firstAttribute="top" secondItem="tLh-V3-OfB" secondAttribute="bottom" constant="4" id="ago-WP-RGt"/>
|
||||
<constraint firstItem="zVi-vU-sh2" firstAttribute="leading" secondItem="s8r-Cf-VfB" secondAttribute="leading" id="b8g-6b-NTE"/>
|
||||
<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"/>
|
||||
@@ -626,6 +641,7 @@
|
||||
<constraint firstItem="73q-gi-fe2" firstAttribute="baseline" secondItem="5rh-cM-iOg" secondAttribute="baseline" id="dQ5-0I-48F"/>
|
||||
<constraint firstItem="s2g-Iz-52P" firstAttribute="baseline" secondItem="2Hf-2V-95U" secondAttribute="baseline" id="dUG-gL-yak"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="etc-K7-Atw" secondAttribute="trailing" constant="20" id="dkQ-8f-2fd"/>
|
||||
<constraint firstItem="zVi-vU-sh2" firstAttribute="top" secondItem="zEH-aV-Tl7" secondAttribute="bottom" constant="6" id="enc-oG-yK1"/>
|
||||
<constraint firstItem="08Q-2k-0Gb" firstAttribute="baseline" secondItem="Ns9-7q-hsh" secondAttribute="baseline" id="fG1-Oh-vZ3"/>
|
||||
<constraint firstItem="s8r-Cf-VfB" firstAttribute="top" secondItem="9GN-f6-r2j" secondAttribute="bottom" constant="6" id="fmf-zf-q4j"/>
|
||||
<constraint firstItem="TV6-Sk-Bqr" firstAttribute="leading" secondItem="ccd-Xn-Dj3" secondAttribute="leading" id="hnH-5m-uQi"/>
|
||||
@@ -661,9 +677,10 @@
|
||||
<constraint firstItem="5rh-cM-iOg" firstAttribute="width" secondItem="tLh-V3-OfB" secondAttribute="width" id="u3l-hm-QNJ"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="zEH-aV-Tl7" secondAttribute="trailing" constant="20" id="uIU-b1-ler"/>
|
||||
<constraint firstItem="MGZ-hB-jhx" firstAttribute="leading" secondItem="Uoo-hZ-D1f" secondAttribute="trailing" constant="8" id="x7P-ao-di2"/>
|
||||
<constraint firstItem="MGZ-hB-jhx" firstAttribute="top" secondItem="zVi-vU-sh2" secondAttribute="bottom" constant="16" id="yi4-ru-tUN"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ccd-Xn-Dj3" secondAttribute="trailing" constant="20" id="zrg-ax-2rw"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-336" y="0.5"/>
|
||||
<point key="canvasLocation" x="-711" y="-76"/>
|
||||
</customView>
|
||||
<arrayController objectClassName="Preset" automaticallyPreparesContent="YES" id="vyv-na-Xpo" userLabel="Set Controller">
|
||||
<declaredKeys>
|
||||
|
||||
@@ -13,7 +13,7 @@ import Cocoa
|
||||
|
||||
private static var observerContext = 0
|
||||
|
||||
@objc private dynamic let options: NSMutableDictionary
|
||||
@objc private dynamic let options: QueuePreferences
|
||||
|
||||
@objc private dynamic var sets: [MetadataPreset]
|
||||
private var presetsObserver: Any?
|
||||
@@ -21,12 +21,12 @@ import Cocoa
|
||||
@objc private dynamic let moviesProviders: [String]
|
||||
@objc private dynamic let tvShowsProviders: [String]
|
||||
|
||||
private let moviesProvidersKeyPath: String
|
||||
private let tvShowsProvidersKeyPath: String
|
||||
|
||||
@objc private dynamic var movieLanguages: [String]
|
||||
@objc private dynamic var tvShowLanguages: [String]
|
||||
|
||||
private var moviesObserver: Any?
|
||||
private var tvShowObserver: Any?
|
||||
|
||||
@objc private dynamic let languages: [String]
|
||||
private let langManager: MP42Languages
|
||||
|
||||
@@ -36,15 +36,13 @@ import Cocoa
|
||||
return NSNib.Name(rawValue: "QueueOptions")
|
||||
}
|
||||
|
||||
@objc init(options: NSMutableDictionary) {
|
||||
@objc init(options: QueuePreferences) {
|
||||
self.options = options
|
||||
|
||||
self.sets = []
|
||||
|
||||
self.moviesProviders = MetadataSearch.movieProviders
|
||||
self.tvShowsProviders = MetadataSearch.tvProviders
|
||||
self.moviesProvidersKeyPath = "options.SBQueueMovieProvider"
|
||||
self.tvShowsProvidersKeyPath = "options.SBQueueTVShowProvider"
|
||||
self.movieLanguages = []
|
||||
self.tvShowLanguages = []
|
||||
|
||||
@@ -60,11 +58,6 @@ import Cocoa
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
deinit {
|
||||
removeObserver(self, forKeyPath: moviesProvidersKeyPath, context: &OptionsViewController.observerContext)
|
||||
removeObserver(self, forKeyPath: tvShowsProvidersKeyPath, context: &OptionsViewController.observerContext)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@@ -84,42 +77,37 @@ import Cocoa
|
||||
|
||||
// Observe the providers changes
|
||||
// to update the specific provider languages popup
|
||||
addObserver(self, forKeyPath: moviesProvidersKeyPath, options: [.initial, .new], context: &OptionsViewController.observerContext)
|
||||
addObserver(self, forKeyPath: tvShowsProvidersKeyPath, options: [.initial, .new], context: &OptionsViewController.observerContext)
|
||||
|
||||
moviesObserver = options.observe(\.movieProvider, options: [.initial, .new]) { [weak self] observed, change in
|
||||
guard let s = self else { return }
|
||||
let newProvider = change.newValue ?? MetadataSearch.movieProviders.first
|
||||
let oldLanguage = change.oldValue ?? "und"
|
||||
let service = MetadataSearch.service(name: newProvider)
|
||||
|
||||
s.movieLanguages = s.localizedLanguages(service: service)
|
||||
|
||||
if service.languages.contains(oldLanguage) == false {
|
||||
s.options.movieProviderLanguage = service.defaultLanguage
|
||||
}
|
||||
}
|
||||
|
||||
tvShowObserver = options.observe(\.tvShowProvider, options: [.initial, .new]) { [weak self] observed, change in
|
||||
guard let s = self else { return }
|
||||
let newProvider = change.newValue ?? MetadataSearch.tvProviders.first
|
||||
let oldLanguage = change.oldValue ?? "und"
|
||||
let service = MetadataSearch.service(name: newProvider)
|
||||
|
||||
s.tvShowLanguages = s.localizedLanguages(service: service)
|
||||
|
||||
if service.languages.contains(oldLanguage) == false {
|
||||
s.options.tvShowProviderLanguage = service.defaultLanguage
|
||||
}
|
||||
}
|
||||
|
||||
prepareDestinationPopUp()
|
||||
preparePresetsPopUp()
|
||||
}
|
||||
|
||||
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
|
||||
guard context == &OptionsViewController.observerContext, let changeDict = change else {
|
||||
super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context)
|
||||
return
|
||||
}
|
||||
|
||||
if keyPath == moviesProvidersKeyPath {
|
||||
let newProvider = changeDict[.newKey] as? String ?? MetadataSearch.movieProviders.first
|
||||
let oldLanguage = options[SBQueueMovieProviderLanguage] as? String ?? "und"
|
||||
let service = MetadataSearch.service(name: newProvider)
|
||||
|
||||
movieLanguages = localizedLanguages(service: service)
|
||||
|
||||
if service.languages.contains(oldLanguage) == false {
|
||||
options[SBQueueMovieProviderLanguage] = service.defaultLanguage
|
||||
}
|
||||
} else if keyPath == tvShowsProvidersKeyPath {
|
||||
let newProvider = changeDict[.newKey] as? String ?? MetadataSearch.tvProviders.first
|
||||
let oldLanguage = options[SBQueueTVShowProviderLanguage] as? String ?? "und"
|
||||
let service = MetadataSearch.service(name: newProvider)
|
||||
|
||||
tvShowLanguages = localizedLanguages(service: service)
|
||||
|
||||
if service.languages.contains(oldLanguage) == false {
|
||||
options[SBQueueTVShowProviderLanguage] = service.defaultLanguage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
||||
switch menuItem.action {
|
||||
case #selector(chooseDestination(_:)),
|
||||
@@ -176,7 +164,7 @@ import Cocoa
|
||||
}
|
||||
|
||||
private func selectCurrentDestination() {
|
||||
if let url = self.options[SBQueueDestination] as? URL, let item = (destButton.menu?.items.filter { $0.representedObject as? URL == url })?.first {
|
||||
if let url = self.options.destination, let item = (destButton.menu?.items.filter { $0.representedObject as? URL == url })?.first {
|
||||
destButton.select(item)
|
||||
} else {
|
||||
destButton.selectItem(withTag: sameAsFileTag)
|
||||
@@ -207,7 +195,7 @@ import Cocoa
|
||||
recentDestinations.append(moviesURL)
|
||||
}
|
||||
|
||||
if let currentURL = self.options[SBQueueDestination] as? URL, recentDestinations.contains(currentURL) == false {
|
||||
if let currentURL = self.options.destination, recentDestinations.contains(currentURL) == false {
|
||||
recentDestinations.insert(currentURL, at: 0)
|
||||
}
|
||||
|
||||
@@ -228,7 +216,7 @@ import Cocoa
|
||||
|
||||
panel.begin(completionHandler: { (response) in
|
||||
if response == NSApplication.ModalResponse.OK, let url = panel.url {
|
||||
self.options[SBQueueDestination] = url
|
||||
self.options.destination = url
|
||||
self.insertAndSelect(url)
|
||||
self.recentDestinations.insert(url, at: 0)
|
||||
self.saveRecentDestinations()
|
||||
@@ -240,9 +228,9 @@ import Cocoa
|
||||
|
||||
@IBAction func destination(_ sender: NSMenuItem) {
|
||||
if let url = sender.representedObject as? URL {
|
||||
options[SBQueueDestination] = url
|
||||
options.destination = url
|
||||
} else {
|
||||
options[SBQueueDestination] = nil
|
||||
options.destination = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,8 +240,8 @@ import Cocoa
|
||||
let update: (Notification) -> Void = { [weak self] notification in
|
||||
guard let s = self else { return }
|
||||
s.sets = PresetManager.shared.metadataPresets
|
||||
if let set = s.options[SBQueueSet] as? MetadataPreset, s.sets.contains(set) == false {
|
||||
s.options[SBQueueSet] = nil
|
||||
if let set = s.options.metadataSet, s.sets.contains(set) == false {
|
||||
s.options.metadataSet = nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -533,3 +533,25 @@ extension Array where Element == Artwork {
|
||||
required init?(coder aDecoder: NSCoder) {}
|
||||
static var supportsSecureCoding: Bool { return true }
|
||||
}
|
||||
|
||||
@objc(SBQueueSendToiTunesAction) class QueueSendToiTunesAction: NSObject, SBQueueActionProtocol {
|
||||
|
||||
var type: SBQueueActionType { return .post }
|
||||
var localizedDescription: String { return NSLocalizedString("Sending to iTunes", comment: "Action localized description.") }
|
||||
override var description: String { return NSLocalizedString("Send to iTunes", comment: "Action description.") }
|
||||
|
||||
@objc override init() {}
|
||||
|
||||
func runAction(_ item: SBQueueItem) -> Bool {
|
||||
let workspace = NSWorkspace.shared
|
||||
if let appPath = workspace.fullPath(forApplication: "iTunes") {
|
||||
return workspace.openFile(item.destURL.path, withApplication: appPath)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func encode(with aCoder: NSCoder) {}
|
||||
required init?(coder aDecoder: NSCoder) {}
|
||||
static var supportsSecureCoding: Bool { return true }
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
//
|
||||
// QueuePreferences.swift
|
||||
// Subler
|
||||
//
|
||||
// Created by Damiano Galassi on 28/03/2018.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objc(SBQueuePreferences) class QueuePreferences: NSObject {
|
||||
|
||||
static private let SBQueueFileType: String = "SBQueueFileType"
|
||||
static private let SBQueueOrganize: String = "SBQueueOrganize"
|
||||
static private let SBQueueFixFallbacks: String = "SBQueueFixFallbacks"
|
||||
static private let SBQueueClearTrackName: String = "SBQueueClearTrackName"
|
||||
static private let SBQueueMetadata: String = "SBQueueMetadata"
|
||||
static private let SBQueueSubtitles: String = "SBQueueSubtitles"
|
||||
static private let SBQueueSet: String = "SBQueueSet"
|
||||
|
||||
static private let SBQueueAutoStart: String = "SBQueueAutoStart"
|
||||
static private let SBQueueOptimize: String = "SBQueueOptimize"
|
||||
static private let SBQueueSendToiTunes: String = "SBQueueSendToiTunes"
|
||||
static private let SBQueueShowDoneNotification: String = "SBQueueShowDoneNotification"
|
||||
|
||||
static private let SBQueueFixTrackLanguage: String = "SBQueueFixTrackLanguage"
|
||||
static private let SBQueueFixTrackLanguageValue: String = "SBQueueFixTrackLanguageValue"
|
||||
|
||||
static private let SBQueueApplyColorSpace: String = "SBQueueApplyColorSpace"
|
||||
static private let SBQueueApplyColorSpaceValue: String = "SBQueueApplyColorSpaceValue"
|
||||
|
||||
static private let SBQueueClearExistingMetadata: String = "SBQueueClearExistingMetadata"
|
||||
|
||||
static private let SBQueueMovieProvider: String = "SBQueueMovieProvider"
|
||||
static private let SBQueueTVShowProvider: String = "SBQueueTVShowProvider"
|
||||
static private let SBQueueMovieProviderLanguage: String = "SBQueueMovieProviderLanguage"
|
||||
static private let SBQueueTVShowProviderLanguage: String = "SBQueueTVShowProviderLanguage"
|
||||
static private let SBQueueProviderArtwork: String = "SBQueueProviderArtwork"
|
||||
|
||||
static private let SBQueueSetOutputFilename: String = "SBQueueSetOutputFilename"
|
||||
static private let SBQueueDestination: String = "SBQueueDestination"
|
||||
|
||||
@objc dynamic var clearExistingMetadata: Bool
|
||||
|
||||
@objc dynamic var searchMetadata: Bool
|
||||
@objc dynamic var movieProvider: String
|
||||
@objc dynamic var movieProviderLanguage: String
|
||||
@objc dynamic var tvShowProvider: String
|
||||
@objc dynamic var tvShowProviderLanguage: String
|
||||
@objc dynamic var providerArtwork: Int
|
||||
|
||||
@objc dynamic var organize: Bool
|
||||
@objc dynamic var fixFallbacks: Bool
|
||||
@objc dynamic var clearTrackName: Bool
|
||||
@objc dynamic var subtitles: Bool
|
||||
@objc dynamic var metadataSet: MetadataPreset?
|
||||
|
||||
@objc dynamic var fixTrackLanguage: Bool
|
||||
@objc dynamic var fixTrackLanguageValue: String
|
||||
|
||||
@objc dynamic var applyColorSpace: Bool
|
||||
@objc dynamic var applyColorSpaceValue: Int
|
||||
|
||||
@objc dynamic var setOutputFilename: Bool
|
||||
@objc dynamic var fileType: String
|
||||
@objc dynamic var destination: URL?
|
||||
|
||||
@objc dynamic var optimize: Bool
|
||||
@objc dynamic var sendToiTunes: Bool
|
||||
|
||||
@objc dynamic var autoStart: Bool
|
||||
@objc dynamic var showDoneNotification: Bool
|
||||
|
||||
override init() {
|
||||
let ud = UserDefaults.standard
|
||||
|
||||
self.clearExistingMetadata = ud.bool(forKey: QueuePreferences.SBQueueClearExistingMetadata)
|
||||
|
||||
self.searchMetadata = ud.bool(forKey: QueuePreferences.SBQueueMetadata)
|
||||
self.movieProvider = ud.string(forKey: QueuePreferences.SBQueueMovieProvider) ?? "TheMovieDB"
|
||||
self.movieProviderLanguage = ud.string(forKey: QueuePreferences.SBQueueMovieProviderLanguage) ?? "en"
|
||||
self.tvShowProvider = ud.string(forKey: QueuePreferences.SBQueueTVShowProvider) ?? "TheTVDB"
|
||||
self.tvShowProviderLanguage = ud.string(forKey: QueuePreferences.SBQueueTVShowProviderLanguage) ?? "en"
|
||||
self.providerArtwork = ud.integer(forKey: QueuePreferences.SBQueueProviderArtwork)
|
||||
|
||||
self.organize = ud.bool(forKey: QueuePreferences.SBQueueOrganize)
|
||||
self.fixFallbacks = ud.bool(forKey: QueuePreferences.SBQueueFixFallbacks)
|
||||
self.clearTrackName = ud.bool(forKey: QueuePreferences.SBQueueClearTrackName)
|
||||
self.subtitles = ud.bool(forKey: QueuePreferences.SBQueueSubtitles)
|
||||
if let presetName = ud.string(forKey: QueuePreferences.SBQueueSet) {
|
||||
self.metadataSet = PresetManager.shared.item(name: presetName) as? MetadataPreset
|
||||
}
|
||||
|
||||
self.fixTrackLanguage = ud.bool(forKey: QueuePreferences.SBQueueFixTrackLanguage)
|
||||
self.fixTrackLanguageValue = ud.string(forKey: QueuePreferences.SBQueueFixTrackLanguageValue) ?? ""
|
||||
|
||||
self.applyColorSpace = ud.bool(forKey: QueuePreferences.SBQueueApplyColorSpace)
|
||||
self.applyColorSpaceValue = ud.integer(forKey: QueuePreferences.SBQueueApplyColorSpaceValue)
|
||||
|
||||
self.setOutputFilename = ud.bool(forKey: QueuePreferences.SBQueueSetOutputFilename)
|
||||
self.fileType = ud.string(forKey: QueuePreferences.SBQueueFileType) ?? "mp4"
|
||||
if let url = ud.url(forKey: QueuePreferences.SBQueueDestination), FileManager.default.fileExists(atPath: url.path) {
|
||||
self.destination = url
|
||||
}
|
||||
|
||||
self.optimize = ud.bool(forKey: QueuePreferences.SBQueueOptimize)
|
||||
self.sendToiTunes = ud.bool(forKey: QueuePreferences.SBQueueSendToiTunes)
|
||||
|
||||
self.autoStart = ud.bool(forKey: QueuePreferences.SBQueueAutoStart)
|
||||
self.showDoneNotification = ud.bool(forKey: QueuePreferences.SBQueueShowDoneNotification)
|
||||
}
|
||||
|
||||
convenience init(preset: QueuePreset) {
|
||||
self.init()
|
||||
}
|
||||
|
||||
@objc static func registerUserDefaults() {
|
||||
let prefs = [QueuePreferences.SBQueueFileType : "mp4",
|
||||
QueuePreferences.SBQueueOrganize : true,
|
||||
QueuePreferences.SBQueueFixTrackLanguage: false,
|
||||
QueuePreferences.SBQueueFixTrackLanguageValue: "en",
|
||||
QueuePreferences.SBQueueFixFallbacks: false,
|
||||
QueuePreferences.SBQueueClearTrackName: false,
|
||||
QueuePreferences.SBQueueMetadata : false,
|
||||
QueuePreferences.SBQueueSubtitles: true,
|
||||
QueuePreferences.SBQueueApplyColorSpace: false,
|
||||
QueuePreferences.SBQueueApplyColorSpaceValue: 1,
|
||||
QueuePreferences.SBQueueSetOutputFilename: false,
|
||||
QueuePreferences.SBQueueAutoStart: false,
|
||||
QueuePreferences.SBQueueOptimize : false,
|
||||
QueuePreferences.SBQueueShowDoneNotification: true,
|
||||
QueuePreferences.SBQueueClearExistingMetadata: false,
|
||||
QueuePreferences.SBQueueMovieProvider : "TheMovieDB",
|
||||
QueuePreferences.SBQueueTVShowProvider : "TheTVDB",
|
||||
QueuePreferences.SBQueueMovieProviderLanguage : "en",
|
||||
QueuePreferences.SBQueueTVShowProviderLanguage : "en",
|
||||
QueuePreferences.SBQueueProviderArtwork : 0] as [String : Any]
|
||||
UserDefaults.standard.register(defaults: prefs)
|
||||
}
|
||||
|
||||
@objc func saveUserDefaults() {
|
||||
let ud = UserDefaults.standard
|
||||
|
||||
ud.set(clearExistingMetadata, forKey: QueuePreferences.SBQueueClearExistingMetadata)
|
||||
|
||||
ud.set(searchMetadata, forKey: QueuePreferences.SBQueueMetadata)
|
||||
ud.set(movieProvider, forKey: QueuePreferences.SBQueueMovieProvider)
|
||||
ud.set(movieProviderLanguage, forKey: QueuePreferences.SBQueueMovieProviderLanguage)
|
||||
ud.set(tvShowProvider, forKey: QueuePreferences.SBQueueTVShowProvider)
|
||||
ud.set(tvShowProviderLanguage, forKey: QueuePreferences.SBQueueTVShowProviderLanguage)
|
||||
ud.set(providerArtwork, forKey: QueuePreferences.SBQueueProviderArtwork)
|
||||
|
||||
ud.set(organize, forKey: QueuePreferences.SBQueueOrganize)
|
||||
ud.set(fixFallbacks, forKey: QueuePreferences.SBQueueFixFallbacks)
|
||||
ud.set(clearTrackName, forKey: QueuePreferences.SBQueueClearTrackName)
|
||||
ud.set(subtitles, forKey: QueuePreferences.SBQueueSubtitles)
|
||||
ud.set(metadataSet?.title, forKey: QueuePreferences.SBQueueSet)
|
||||
|
||||
ud.set(fixTrackLanguage, forKey: QueuePreferences.SBQueueFixTrackLanguage)
|
||||
ud.set(fixTrackLanguageValue, forKey: QueuePreferences.SBQueueFixTrackLanguageValue)
|
||||
|
||||
ud.set(applyColorSpace, forKey: QueuePreferences.SBQueueApplyColorSpace)
|
||||
ud.set(applyColorSpaceValue, forKey: QueuePreferences.SBQueueApplyColorSpaceValue)
|
||||
|
||||
ud.set(setOutputFilename, forKey: QueuePreferences.SBQueueSetOutputFilename)
|
||||
ud.set(fileType, forKey: QueuePreferences.SBQueueFileType)
|
||||
ud.set(destination, forKey: QueuePreferences.SBQueueDestination)
|
||||
|
||||
ud.set(optimize, forKey: QueuePreferences.SBQueueOptimize)
|
||||
ud.set(sendToiTunes, forKey: QueuePreferences.SBQueueSendToiTunes)
|
||||
|
||||
ud.set(autoStart, forKey: QueuePreferences.SBQueueAutoStart)
|
||||
ud.set(showDoneNotification, forKey: QueuePreferences.SBQueueShowDoneNotification)
|
||||
}
|
||||
|
||||
@objc var queueURL: URL? {
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler").appendingPathComponent("queue.sbqueue", isDirectory: false)
|
||||
|
||||
}
|
||||
}
|
||||
+29
-29
@@ -8,7 +8,6 @@
|
||||
|
||||
#import "SBQueueController.h"
|
||||
#import "SBQueueItem.h"
|
||||
#import "SBQueuePreferences.h"
|
||||
|
||||
#import <MP42Foundation/MP42FileImporter.h>
|
||||
|
||||
@@ -21,7 +20,6 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
@interface SBQueueController () <NSPopoverDelegate, NSWindowDelegate, NSTableViewDelegate, NSTableViewDataSource, ExpandedTableViewDelegate, SBItemViewDelegate>
|
||||
|
||||
@property (nonatomic, readonly) SBQueuePreferences *prefs;
|
||||
@property (nonatomic, readonly) NSMutableDictionary<NSString *, id> *options;
|
||||
|
||||
@property (nonatomic, weak) IBOutlet ExpandedTableView *table;
|
||||
|
||||
@@ -53,8 +51,6 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
if (self = [super initWithWindowNibName:@"Queue"]) {
|
||||
[SBQueuePreferences registerUserDefaults];
|
||||
_prefs = [[SBQueuePreferences alloc] init];
|
||||
_options = _prefs.options;
|
||||
|
||||
_queue = [[SBQueue alloc] initWithURL:_prefs.queueURL];
|
||||
|
||||
[self removeCompletedItems:self];
|
||||
@@ -105,7 +101,7 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
|
||||
[self updateUI];
|
||||
|
||||
if ([self.options[SBQueueShowDoneNotification] boolValue]) {
|
||||
if (self.prefs.showDoneNotification) {
|
||||
NSDictionary *info = note.userInfo;
|
||||
|
||||
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
||||
@@ -244,66 +240,70 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
- (SBQueueItem *)createItemWithURL:(NSURL *)url {
|
||||
SBQueueItem *item = [SBQueueItem itemWithURL:url];
|
||||
|
||||
if ([self.options[SBQueueClearExistingMetadata] boolValue]) {
|
||||
if (self.prefs.clearExistingMetadata) {
|
||||
[item addAction:[[SBQueueClearExistingMetadataAction alloc] init]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueMetadata] boolValue]) {
|
||||
[item addAction:[[SBQueueMetadataAction alloc] initWithMovieLanguage:self.options[SBQueueMovieProviderLanguage]
|
||||
tvShowLanguage:self.options[SBQueueTVShowProviderLanguage]
|
||||
movieProvider:self.options[SBQueueMovieProvider]
|
||||
tvShowProvider:self.options[SBQueueTVShowProvider]
|
||||
preferredArtwork:[self.options[SBQueueProviderArtwork] unsignedIntegerValue]]];
|
||||
if (self.prefs.searchMetadata) {
|
||||
[item addAction:[[SBQueueMetadataAction alloc] initWithMovieLanguage:self.prefs.movieProviderLanguage
|
||||
tvShowLanguage:self.prefs.tvShowProviderLanguage
|
||||
movieProvider:self.prefs.movieProvider
|
||||
tvShowProvider:self.prefs.tvShowProvider
|
||||
preferredArtwork:self.prefs.providerArtwork]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueSetOutputFilename] boolValue]) {
|
||||
if (self.prefs.setOutputFilename) {
|
||||
[item addAction:[[SBQueueSetOutputFilenameAction alloc] init]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueSubtitles] boolValue]) {
|
||||
if (self.prefs.subtitles) {
|
||||
[item addAction:[[SBQueueSubtitlesAction alloc] init]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueOrganize] boolValue]) {
|
||||
if (self.prefs.organize) {
|
||||
[item addAction:[[SBQueueOrganizeGroupsAction alloc] init]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueFixFallbacks] boolValue]) {
|
||||
if (self.prefs.fixFallbacks) {
|
||||
[item addAction:[[SBQueueFixFallbacksAction alloc] init]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueClearTrackName] boolValue]) {
|
||||
if (self.prefs.clearTrackName) {
|
||||
[item addAction:[[SBQueueClearTrackNameAction alloc] init]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueFixTrackLanguage] boolValue]) {
|
||||
[item addAction:[[SBQueueSetLanguageAction alloc] initWithLanguage:self.options[SBQueueFixTrackLanguageValue]]];
|
||||
if (self.prefs.fixTrackLanguage) {
|
||||
[item addAction:[[SBQueueSetLanguageAction alloc] initWithLanguage:self.prefs.fixTrackLanguageValue]];
|
||||
}
|
||||
|
||||
if ([(self.options)[SBQueueApplyColorSpace] boolValue]) {
|
||||
[item addAction:[[SBQueueColorSpaceAction alloc] initWithTag:[self.options[SBQueueApplyColorSpaceValue] unsignedIntegerValue]]];
|
||||
if (self.prefs.applyColorSpace) {
|
||||
[item addAction:[[SBQueueColorSpaceAction alloc] initWithTag:self.prefs.applyColorSpaceValue]];
|
||||
}
|
||||
|
||||
if (self.options[SBQueueSet]) {
|
||||
[item addAction:[[SBQueueSetAction alloc] initWithPreset:self.options[SBQueueSet]]];
|
||||
if (self.prefs.metadataSet) {
|
||||
[item addAction:[[SBQueueSetAction alloc] initWithPreset:self.prefs.metadataSet]];
|
||||
}
|
||||
|
||||
if ([self.options[SBQueueOptimize] boolValue]) {
|
||||
if (self.prefs.optimize) {
|
||||
[item addAction:[[SBQueueOptimizeAction alloc] init]];
|
||||
}
|
||||
|
||||
if (self.prefs.sendToiTunes) {
|
||||
[item addAction:[[SBQueueSendToiTunesAction alloc] init]];
|
||||
}
|
||||
|
||||
id type;
|
||||
[url getResourceValue:&type forKey:NSURLTypeIdentifierKey error:NULL];
|
||||
|
||||
NSURL *destination = self.options[SBQueueDestination];
|
||||
NSURL *destination = self.prefs.destination;
|
||||
if (destination) {
|
||||
destination = [[destination URLByAppendingPathComponent:url.lastPathComponent].URLByDeletingPathExtension
|
||||
URLByAppendingPathExtension:self.options[SBQueueFileType]];
|
||||
URLByAppendingPathExtension:self.prefs.fileType];
|
||||
} else if (UTTypeConformsTo((__bridge CFStringRef)type, (__bridge CFStringRef)@"public.mpeg-4")) {
|
||||
destination = [url copy];
|
||||
} else {
|
||||
destination = [url.URLByDeletingPathExtension
|
||||
URLByAppendingPathExtension:(self.options)[SBQueueFileType]];
|
||||
URLByAppendingPathExtension:self.prefs.fileType];
|
||||
}
|
||||
|
||||
item.destURL = destination;
|
||||
@@ -349,7 +349,7 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
if (undo.undoing || undo.redoing)
|
||||
[self updateUI];
|
||||
|
||||
if ([(self.options)[SBQueueAutoStart] boolValue])
|
||||
if (self.prefs.autoStart)
|
||||
[self start:self];
|
||||
|
||||
}
|
||||
@@ -389,7 +389,7 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
|
||||
// the popover retains us and we retain the popover,
|
||||
// we drop the popover whenever it is closed to avoid a cycle
|
||||
self.popover.contentViewController = [[SBOptionsViewController alloc] initWithOptions:self.options];
|
||||
self.popover.contentViewController = [[SBOptionsViewController alloc] initWithOptions:self.prefs];
|
||||
self.popover.animates = YES;
|
||||
|
||||
// AppKit will close the popover when the user interacts with a user interface element outside the popover.
|
||||
|
||||
@@ -470,7 +470,8 @@ bail:
|
||||
[SBQueueSetLanguageAction class], [SBQueueFixFallbacksAction class],
|
||||
[SBQueueClearTrackNameAction class], [SBQueueOrganizeGroupsAction class],
|
||||
[SBQueueColorSpaceAction class], [SBQueueSetOutputFilenameAction class],
|
||||
[SBQueueClearExistingMetadataAction class], [SBQueueOptimizeAction class], nil]
|
||||
[SBQueueClearExistingMetadataAction class], [SBQueueOptimizeAction class],
|
||||
[SBQueueSendToiTunesAction class], nil]
|
||||
forKey:@"SBQueueItemActions"];
|
||||
|
||||
_status = [decoder decodeIntForKey:@"SBQueueItemStatus"];
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
//
|
||||
// SBQueuePreferences.h
|
||||
// Subler
|
||||
//
|
||||
// Created by Damiano Galassi on 24/06/14.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
extern NSString * const SBQueueFileType;
|
||||
extern NSString * const SBQueueOrganize;
|
||||
extern NSString * const SBQueueFixFallbacks;
|
||||
extern NSString * const SBQueueClearTrackName;
|
||||
extern NSString * const SBQueueMetadata;
|
||||
extern NSString * const SBQueueSubtitles;
|
||||
extern NSString * const SBQueueSet;
|
||||
|
||||
extern NSString * const SBQueueAutoStart;
|
||||
extern NSString * const SBQueueOptimize;
|
||||
extern NSString * const SBQueueShowDoneNotification;
|
||||
|
||||
extern NSString * const SBQueueFixTrackLanguage;
|
||||
extern NSString * const SBQueueFixTrackLanguageValue;
|
||||
|
||||
extern NSString * const SBQueueApplyColorSpace;
|
||||
extern NSString * const SBQueueApplyColorSpaceValue;
|
||||
|
||||
extern NSString * const SBQueueClearExistingMetadata;
|
||||
|
||||
extern NSString * const SBQueueMovieProvider;
|
||||
extern NSString * const SBQueueTVShowProvider;
|
||||
extern NSString * const SBQueueMovieProviderLanguage;
|
||||
extern NSString * const SBQueueTVShowProviderLanguage;
|
||||
extern NSString * const SBQueueProviderArtwork;
|
||||
|
||||
extern NSString * const SBQueueSetOutputFilename;
|
||||
extern NSString * const SBQueueDestination;
|
||||
|
||||
@interface SBQueuePreferences : NSObject
|
||||
|
||||
@property (nonatomic, readonly) NSMutableDictionary<NSString *, id> *options;
|
||||
@property (nonatomic, readonly, nullable) NSURL *queueURL;
|
||||
|
||||
+ (void)registerUserDefaults;
|
||||
- (void)saveUserDefaults;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,134 +0,0 @@
|
||||
//
|
||||
// SBQueuePreferences.m
|
||||
// Subler
|
||||
//
|
||||
// Created by Damiano Galassi on 24/06/14.
|
||||
//
|
||||
//
|
||||
|
||||
#import "SBQueuePreferences.h"
|
||||
#import "Subler-Swift.h"
|
||||
|
||||
#import <MP42Foundation/MP42Metadata.h>
|
||||
|
||||
NSString * const SBQueueFileType = @"SBQueueFileType";
|
||||
NSString * const SBQueueOrganize = @"SBQueueOrganize";
|
||||
NSString * const SBQueueFixFallbacks = @"SBQueueFixFallbacks";
|
||||
NSString * const SBQueueClearTrackName = @"SBQueueClearTrackName";
|
||||
NSString * const SBQueueMetadata = @"SBQueueMetadata";
|
||||
NSString * const SBQueueSubtitles = @"SBQueueSubtitles";
|
||||
|
||||
NSString * const SBQueueAutoStart = @"SBQueueAutoStart";
|
||||
NSString * const SBQueueOptimize = @"SBQueueOptimize";
|
||||
NSString * const SBQueueShowDoneNotification = @"SBQueueShowDoneNotification";
|
||||
|
||||
NSString * const SBQueueFixTrackLanguage = @"SBQueueFixTrackLanguage";
|
||||
NSString * const SBQueueFixTrackLanguageValue = @"SBQueueFixTrackLanguageValue";
|
||||
|
||||
NSString * const SBQueueApplyColorSpace = @"SBQueueApplyColorSpace";
|
||||
NSString * const SBQueueApplyColorSpaceValue = @"SBQueueApplyColorSpaceValue";
|
||||
|
||||
NSString * const SBQueueDestination = @"SBQueueDestination";
|
||||
|
||||
NSString * const SBQueueClearExistingMetadata = @"SBQueueClearExistingMetadata";
|
||||
|
||||
NSString * const SBQueueMovieProvider = @"SBQueueMovieProvider";
|
||||
NSString * const SBQueueTVShowProvider = @"SBQueueTVShowProvider";
|
||||
NSString * const SBQueueMovieProviderLanguage = @"SBQueueMovieProviderLanguage";
|
||||
NSString * const SBQueueTVShowProviderLanguage = @"SBQueueTVShowProviderLanguage";
|
||||
NSString * const SBQueueProviderArtwork = @"SBQueueProviderArtwork";
|
||||
|
||||
NSString * const SBQueueSet = @"SBQueueSet";
|
||||
NSString * const SBQueueSetOutputFilename = @"SBQueueSetOutputFilename";
|
||||
|
||||
@implementation SBQueuePreferences
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_options = [[NSMutableDictionary alloc] init];
|
||||
|
||||
NSArray<NSString *> *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueOptimize, SBQueueShowDoneNotification, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork, SBQueueSetOutputFilename, SBQueueClearExistingMetadata];
|
||||
|
||||
[keys enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
self.options[obj] = [[NSUserDefaults standardUserDefaults] valueForKey:obj];
|
||||
}];
|
||||
|
||||
if ([[NSUserDefaults standardUserDefaults] valueForKey:SBQueueDestination]) {
|
||||
NSURL *url = [NSURL fileURLWithPath:[[NSUserDefaults standardUserDefaults] valueForKey:SBQueueDestination]];
|
||||
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:url.path isDirectory:nil]) {
|
||||
url = nil;
|
||||
}
|
||||
self.options[SBQueueDestination] = url;
|
||||
}
|
||||
|
||||
// FIXME
|
||||
// if ([[NSUserDefaults standardUserDefaults] valueForKey:SBQueueSet]) {
|
||||
// SBMetadataPreset *preset = (SBMetadataPreset *)[SBPresetManager.shared itemWithName:[[NSUserDefaults standardUserDefaults] valueForKey:SBQueueSet]];
|
||||
// if (preset) {
|
||||
// self.options[SBQueueSet] = preset;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (void)registerUserDefaults {
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ SBQueueFileType : @"mp4",
|
||||
SBQueueOrganize : @YES,
|
||||
SBQueueFixTrackLanguage: @NO,
|
||||
SBQueueFixTrackLanguageValue: @"en",
|
||||
SBQueueFixFallbacks: @NO,
|
||||
SBQueueClearTrackName: @NO,
|
||||
SBQueueMetadata : @NO,
|
||||
SBQueueSubtitles: @YES,
|
||||
|
||||
SBQueueApplyColorSpace: @NO,
|
||||
SBQueueApplyColorSpaceValue: @1,
|
||||
|
||||
SBQueueSetOutputFilename: @NO,
|
||||
|
||||
SBQueueAutoStart: @NO,
|
||||
SBQueueOptimize : @YES,
|
||||
SBQueueShowDoneNotification: @YES,
|
||||
|
||||
SBQueueClearExistingMetadata: @NO,
|
||||
|
||||
SBQueueMovieProvider : @"TheMovieDB",
|
||||
SBQueueTVShowProvider : @"TheTVDB",
|
||||
SBQueueMovieProviderLanguage : @"en",
|
||||
SBQueueTVShowProviderLanguage : @"en",
|
||||
SBQueueProviderArtwork : @0}];
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, SBQueueSetOutputFilename, SBQueueClearExistingMetadata];
|
||||
|
||||
[keys enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
[[NSUserDefaults standardUserDefaults] setValue:self.options[obj] forKey:obj];
|
||||
}];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setValue:[self.options[SBQueueDestination] path] forKey:SBQueueDestination];
|
||||
[[NSUserDefaults standardUserDefaults] setValue:[self.options[SBQueueSet] title] forKey:SBQueueSet];
|
||||
}
|
||||
|
||||
- (nullable NSURL *)queueURL {
|
||||
NSURL *appSupportURL = nil;
|
||||
NSArray *allPaths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
|
||||
NSUserDomainMask,
|
||||
YES);
|
||||
if (allPaths.count) {
|
||||
appSupportURL = [NSURL fileURLWithPath:[[allPaths.lastObject stringByAppendingPathComponent:@"Subler"]
|
||||
stringByAppendingPathComponent:@"queue.sbqueue"] isDirectory:YES];
|
||||
return appSupportURL;
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
#import "SBQueueController.h"
|
||||
#import "SBQueuePreferences.h"
|
||||
#import "SBQueueItem.h"
|
||||
#import "SBMovieViewController.h"
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
A9C31E642029A82200CEF474 /* AdvancedPrefsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C31E622029A82200CEF474 /* AdvancedPrefsViewController.xib */; };
|
||||
A9C3E44A205C07F4004DE24E /* OptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C3E449205C07F4004DE24E /* OptionsViewController.swift */; };
|
||||
A9C5FA7419FA2FEC0051F3FF /* SBActivityWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C5FA7219FA2FEC0051F3FF /* SBActivityWindow.xib */; };
|
||||
A9C828F5195950C3004C4718 /* SBQueuePreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C828F4195950C3004C4718 /* SBQueuePreferences.m */; };
|
||||
A9C73536206B8F9900794673 /* QueuePreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C73535206B8F9900794673 /* QueuePreferences.swift */; };
|
||||
A9CBAB1E1F29C083001C26B3 /* MetadataImporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9CBAB1D1F29C083001C26B3 /* MetadataImporter.swift */; };
|
||||
A9D4B8671C05BD04007845C4 /* SBChapterSearch.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9D4B8651C05BD04007845C4 /* SBChapterSearch.xib */; };
|
||||
A9D64527202CA92400BA172B /* SaveOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D64525202CA92400BA172B /* SaveOptions.swift */; };
|
||||
@@ -323,8 +323,7 @@
|
||||
A9C31E5E2029A80F00CEF474 /* AdvancedPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AdvancedPrefsViewController.swift; path = Classes/AdvancedPrefsViewController.swift; sourceTree = "<group>"; };
|
||||
A9C31E632029A82200CEF474 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AdvancedPrefsViewController.xib; sourceTree = "<group>"; };
|
||||
A9C3E449205C07F4004DE24E /* OptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = OptionsViewController.swift; path = Classes/OptionsViewController.swift; sourceTree = "<group>"; };
|
||||
A9C828F3195950C3004C4718 /* SBQueuePreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBQueuePreferences.h; path = Classes/SBQueuePreferences.h; sourceTree = "<group>"; };
|
||||
A9C828F4195950C3004C4718 /* SBQueuePreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBQueuePreferences.m; path = Classes/SBQueuePreferences.m; sourceTree = "<group>"; };
|
||||
A9C73535206B8F9900794673 /* QueuePreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = QueuePreferences.swift; path = Classes/QueuePreferences.swift; sourceTree = "<group>"; };
|
||||
A9CBAB1D1F29C083001C26B3 /* MetadataImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MetadataImporter.swift; path = Classes/MetadataImporters/MetadataImporter.swift; sourceTree = "<group>"; };
|
||||
A9D64525202CA92400BA172B /* SaveOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SaveOptions.swift; path = Classes/SaveOptions.swift; sourceTree = "<group>"; };
|
||||
A9D73C5018BF3F1100C6FFA6 /* SBQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBQueue.h; path = Classes/SBQueue.h; sourceTree = "<group>"; };
|
||||
@@ -568,8 +567,7 @@
|
||||
A961475F13F567E10068F161 /* SBQueueController.h */,
|
||||
A961476013F567E10068F161 /* SBQueueController.m */,
|
||||
A961476513F568210068F161 /* Queue.xib */,
|
||||
A9C828F3195950C3004C4718 /* SBQueuePreferences.h */,
|
||||
A9C828F4195950C3004C4718 /* SBQueuePreferences.m */,
|
||||
A9C73535206B8F9900794673 /* QueuePreferences.swift */,
|
||||
A9C3E449205C07F4004DE24E /* OptionsViewController.swift */,
|
||||
A9EEA5F618D654B9008B54B4 /* QueueOptions.xib */,
|
||||
A9676A2F1FB6E85300C1E300 /* LanguageTransformer.swift */,
|
||||
@@ -875,7 +873,6 @@
|
||||
A9E932A71F34D31D00B1790B /* ArtworkSelector.swift in Sources */,
|
||||
A9D73C5218BF3F1100C6FFA6 /* SBQueue.m in Sources */,
|
||||
A956CE6B1F99EAAD00093992 /* Logger.swift in Sources */,
|
||||
A9C828F5195950C3004C4718 /* SBQueuePreferences.m in Sources */,
|
||||
A956CE691F99E93D00093992 /* ButtonToolbarItem.swift in Sources */,
|
||||
A98D44102036F661005CB092 /* AppDelegate.swift in Sources */,
|
||||
A9C31E572029A75F00CEF474 /* GeneralPrefsViewController.swift in Sources */,
|
||||
@@ -904,6 +901,7 @@
|
||||
A944E5921F498FC4002E43F6 /* PresetPrefsViewController.swift in Sources */,
|
||||
A9E97F141F274F1100DBA586 /* iTunesStore.swift in Sources */,
|
||||
A9433A8D1F2F5C3600BB38CA /* ChapterResult.swift in Sources */,
|
||||
A9C73536206B8F9900794673 /* QueuePreferences.swift in Sources */,
|
||||
A9C09C9C1F9A08A9007939EE /* MultiSelectViewController.swift in Sources */,
|
||||
A9AE70E11F2F7B3D001CF27C /* MetadataHelper.swift in Sources */,
|
||||
A90057B61F99DE2700FA4ED1 /* ComboBoxCellView.swift in Sources */,
|
||||
|
||||
Reference in new issue
Block a user