Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a153763019 | ||
|
|
85d8ac6dcb | ||
|
|
723db31fc0 | ||
|
|
80ca3970ec | ||
|
|
a1da1c8106 | ||
|
|
51112947fb | ||
|
|
56d843c044 | ||
|
|
c08d607baa | ||
|
|
87e0c82bbb | ||
|
|
dd956fa783 | ||
|
|
5d6c0cd84c | ||
|
|
e96773f3d0 | ||
|
|
475737a6ad | ||
|
|
20438f310d | ||
|
|
628ccfefb5 | ||
|
|
0f8d251391 | ||
|
|
f20ad7ee45 | ||
|
|
401584a376 | ||
|
|
06ecb0af5f | ||
|
|
f457b4e89c | ||
|
|
8520d729c6 | ||
|
|
330236735d | ||
|
|
eb386a52c3 | ||
|
|
0c3d7de364 | ||
|
|
9077b6d149 | ||
|
|
a3e15e725a | ||
|
|
839b47cd9e | ||
|
|
b58346eda7 | ||
|
|
4c7a26a175 | ||
|
|
85854a2f06 | ||
|
|
a3f73cf1f8 | ||
|
|
a7739840ee | ||
|
|
d0cd519460 | ||
|
|
1040f0dab6 | ||
|
|
dfdffb9332 | ||
|
|
530ea2ed20 | ||
|
|
23f683626d | ||
|
|
934ae63b95 | ||
|
|
1cb5fb59dc | ||
|
|
81d5f8902c | ||
|
|
a48cb77aac | ||
|
|
d930bdb0a6 | ||
|
|
8c0d366764 | ||
|
|
33a7665c5a | ||
|
|
43a768a187 | ||
|
|
8290bf7c52 | ||
|
|
b250450966 | ||
|
|
c84cfd47e3 | ||
|
|
53e46d8095 | ||
|
|
d9131ffc3b | ||
|
|
0305d5371c | ||
|
|
257e412987 | ||
|
|
73e27ef56c | ||
|
|
59f085a7e4 | ||
|
|
40107a9db1 | ||
|
|
ce011a4d37 | ||
|
|
c8fb950854 | ||
|
|
151530d6ab | ||
|
|
94255d6e17 | ||
|
|
a65fcf9bf2 | ||
|
|
b7910bdb45 | ||
|
|
3017c4ef35 | ||
|
|
e12618bda4 | ||
|
|
b88b3d48a6 | ||
|
|
e3f67451b0 | ||
|
|
2f3050f9d0 | ||
|
|
fbdbb2006b | ||
|
|
9ac32753d4 | ||
|
|
d399af54b2 | ||
|
|
689f51d002 | ||
|
|
6307626786 | ||
|
|
7990e816b2 | ||
|
|
d8d40fa315 | ||
|
|
9896d96e87 | ||
|
|
334bc51906 | ||
|
|
8dd1adc199 | ||
|
|
192de27e8d | ||
|
|
97b88a2adb | ||
|
|
abdfa38d2d | ||
|
|
f8667656ef | ||
|
|
22c449f798 | ||
|
|
17c7d67b96 | ||
|
|
beb7774761 | ||
|
|
6c124ca5d0 | ||
|
|
b0d8ee73a8 | ||
|
|
ed69edf45f | ||
|
|
4f2c8f2509 |
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
[submodule "MP42Foundation"]
|
||||
path = MP42Foundation
|
||||
url = https://github.com/SublerApp/MP42Foundation.git
|
||||
url = https://git.technomancer.com/Scott-Files/MP42Foundation.git
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -25,7 +25,7 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fCL-eV-Fib">
|
||||
<rect key="frame" x="436" y="13" width="122" height="32"/>
|
||||
<rect key="frame" x="440" y="20" width="111" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Set as artwork" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rMb-PC-yTA">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -38,7 +38,7 @@ DQ
|
||||
</connections>
|
||||
</button>
|
||||
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fMj-Ew-Qej">
|
||||
<rect key="frame" x="449" y="48" width="104" height="20"/>
|
||||
<rect key="frame" x="451" y="54" width="100" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="o7H-4a-ogx"/>
|
||||
</constraints>
|
||||
@@ -49,8 +49,8 @@ DQ
|
||||
</connections>
|
||||
</slider>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iH5-SJ-sDV">
|
||||
<rect key="frame" x="13" y="13" width="159" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Load more artwork..." bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="40h-Rv-m31">
|
||||
<rect key="frame" x="20" y="20" width="145" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Load more artworks" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="40h-Rv-m31">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent">l</string>
|
||||
@@ -61,7 +61,7 @@ DQ
|
||||
</connections>
|
||||
</button>
|
||||
<button horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zyu-WY-ltM">
|
||||
<rect key="frame" x="371" y="13" width="67" height="32"/>
|
||||
<rect key="frame" x="371" y="20" width="57" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UDG-fN-bQH">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -74,13 +74,13 @@ Gw
|
||||
</connections>
|
||||
</button>
|
||||
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c0O-We-pZd">
|
||||
<rect key="frame" x="20" y="74" width="531" height="461"/>
|
||||
<rect key="frame" x="20" y="80" width="531" height="455"/>
|
||||
<clipView key="contentView" id="cHe-z7-drT">
|
||||
<rect key="frame" x="1" y="1" width="529" height="459"/>
|
||||
<rect key="frame" x="1" y="1" width="529" height="453"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<collectionView selectable="YES" allowsMultipleSelection="YES" id="234-cJ-3Un" customClass="ArtworkCollectionView" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="529" height="459"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="529" height="453"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="lte-fF-bVi">
|
||||
<size key="itemSize" width="154" height="194"/>
|
||||
@@ -99,14 +99,14 @@ Gw
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="nbX-9d-w82">
|
||||
<rect key="frame" x="486" y="1" width="16" height="457"/>
|
||||
<rect key="frame" x="513" y="1" width="17" height="453"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="AYL-Jp-agY">
|
||||
<rect key="frame" x="20" y="20" width="16" height="16"/>
|
||||
</progressIndicator>
|
||||
<textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NEi-uU-Lh7">
|
||||
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NEi-uU-Lh7">
|
||||
<rect key="frame" x="41" y="21" width="86" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Progress status" id="TbL-2H-ra9">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="GeneralPrefsViewController" customModule="Subler" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="saveLocationPopUp" destination="saveLocationPopUp" id="saveLocationOutlet"/>
|
||||
<outlet property="view" destination="76" id="u5x-9E-WAf"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
@@ -25,22 +26,22 @@
|
||||
</declaredKeys>
|
||||
</userDefaultsController>
|
||||
<customView id="76">
|
||||
<rect key="frame" x="0.0" y="0.0" width="660" height="328"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="660" height="374"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="dxI-5Q-gDD">
|
||||
<rect key="frame" x="133" y="0.0" width="394" height="328"/>
|
||||
<rect key="frame" x="132" y="0.0" width="397" height="374"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="754" translatesAutoresizingMaskIntoConstraints="NO" id="XPF-Mh-XYC">
|
||||
<rect key="frame" x="147" y="156" width="57" height="14"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="754" translatesAutoresizingMaskIntoConstraints="NO" id="XPF-Mh-XYC">
|
||||
<rect key="frame" x="152" y="172" width="57" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Beginning" id="3Vs-qA-7Z6">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="1000" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="249">
|
||||
<rect key="frame" x="129" y="110" width="165" height="14"/>
|
||||
<textField focusRingType="none" verticalHuggingPriority="1000" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="249">
|
||||
<rect key="frame" x="134" y="122" width="165" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="USA ratings are always shown." id="250">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -48,7 +49,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="133">
|
||||
<rect key="frame" x="124" y="43" width="182" height="32"/>
|
||||
<rect key="frame" x="136" y="54" width="172" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Clear recent searches" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="134">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -58,7 +59,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="80">
|
||||
<rect key="frame" x="129" y="229" width="121" height="18"/>
|
||||
<rect key="frame" x="136" y="276" width="117" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Remember Size" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="86">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -71,8 +72,8 @@
|
||||
</binding>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="139">
|
||||
<rect key="frame" x="18" y="53" width="107" height="16"/>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="139">
|
||||
<rect key="frame" x="18" y="58" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Privacy:" id="140">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -80,7 +81,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="1000" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="82">
|
||||
<rect key="frame" x="129" y="203" width="236" height="18"/>
|
||||
<rect key="frame" x="136" y="216" width="232" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Create Preview Images at position:" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="84">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -94,15 +95,15 @@
|
||||
</connections>
|
||||
</button>
|
||||
<slider verticalHuggingPriority="1000" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="JhA-jk-CGt">
|
||||
<rect key="frame" x="147" y="170" width="220" height="28"/>
|
||||
<rect key="frame" x="154" y="192" width="214" height="16"/>
|
||||
<sliderCell key="cell" state="on" alignment="left" maxValue="1" doubleValue="0.5" tickMarkPosition="below" numberOfTickMarks="7" sliderType="linear" id="iKX-dX-4IV"/>
|
||||
<connections>
|
||||
<binding destination="3" name="value" keyPath="values.SBChaptersPreviewPosition" id="JtQ-lM-MNU"/>
|
||||
<binding destination="3" name="enabled" keyPath="values.chaptersPreviewTrack" id="hNU-uO-zsL"/>
|
||||
</connections>
|
||||
</slider>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="206">
|
||||
<rect key="frame" x="18" y="129" width="107" height="16"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="206">
|
||||
<rect key="frame" x="18" y="142" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Show ratings for:" id="207">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -110,7 +111,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="136">
|
||||
<rect key="frame" x="124" y="13" width="182" height="32"/>
|
||||
<rect key="frame" x="136" y="20" width="172" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Delete cached metadata" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="137">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -119,8 +120,8 @@
|
||||
<action selector="deleteCachedMetadata:" target="-2" id="141"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="81">
|
||||
<rect key="frame" x="18" y="204" width="107" height="16"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="81">
|
||||
<rect key="frame" x="18" y="216" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Chapters:" id="85">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -128,7 +129,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="B5v-6Q-3Qa">
|
||||
<rect key="frame" x="129" y="269" width="246" height="18"/>
|
||||
<rect key="frame" x="136" y="316" width="242" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Automatically check for update daily" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="2Pf-pq-4IX">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -137,24 +138,24 @@
|
||||
<binding destination="3" name="value" keyPath="values.SUEnableAutomaticChecks" id="6AF-uh-wt7"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="77">
|
||||
<rect key="frame" x="18" y="292" width="107" height="16"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="77">
|
||||
<rect key="frame" x="18" y="338" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="At Launch:" id="89">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tVb-Qq-sU7">
|
||||
<rect key="frame" x="343" y="156" width="24" height="14"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tVb-Qq-sU7">
|
||||
<rect key="frame" x="346" y="172" width="24" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="End" id="He0-rl-DBi">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="78">
|
||||
<rect key="frame" x="18" y="230" width="107" height="16"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="78">
|
||||
<rect key="frame" x="18" y="276" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Window:" id="88">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -162,7 +163,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="logFormatPopup">
|
||||
<rect key="frame" x="128" y="78" width="167" height="25"/>
|
||||
<rect key="frame" x="136" y="90" width="160" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="logFormatCell">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
@@ -178,7 +179,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="79">
|
||||
<rect key="frame" x="129" y="291" width="130" height="18"/>
|
||||
<rect key="frame" x="136" y="338" width="126" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Show open panel" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="87">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -188,7 +189,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="1000" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="236">
|
||||
<rect key="frame" x="128" y="122" width="187" height="25"/>
|
||||
<rect key="frame" x="136" y="138" width="180" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="237">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
@@ -204,22 +205,63 @@
|
||||
<binding destination="123" name="selectedValue" keyPath="values.SBRatingsCountry" previousBinding="245" id="248"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mNP-6I-gV4">
|
||||
<rect key="frame" x="235" y="156" width="44" height="14"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mNP-6I-gV4">
|
||||
<rect key="frame" x="239" y="172" width="44" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Middle" id="2o1-dB-mt1">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="logFormatLabel">
|
||||
<rect key="frame" x="18" y="85" width="107" height="16"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="logFormatLabel">
|
||||
<rect key="frame" x="18" y="94" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Log Format:" id="logFormatLabelCell">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="saveLocationLabel">
|
||||
<rect key="frame" x="18" y="246" width="112" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Save As Location:" id="saveLocationLabelCell">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="saveLocationPopUp">
|
||||
<rect key="frame" x="136" y="242" width="180" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" title="Automatic" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="saveLocationLastUsed" id="saveLocationCell">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
<menu key="menu" id="saveLocationMenu">
|
||||
<items>
|
||||
<menuItem title="Automatic" state="on" id="saveLocationLastUsed">
|
||||
<connections>
|
||||
<action selector="setSaveLocation:" target="-2" id="saveLocationLastUsedAction"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Same as File" tag="1" id="saveLocationSameAsFile">
|
||||
<connections>
|
||||
<action selector="setSaveLocation:" target="-2" id="saveLocationSameAsFileAction"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="saveLocationSeparator"/>
|
||||
<menuItem title="Other…" tag="3" id="saveLocationOther">
|
||||
<connections>
|
||||
<action selector="chooseSaveLocation:" target="-2" id="saveLocationOtherAction"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="180" id="saveLocationWidth"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="saveLocationLabel" id="saveLocationAccessibility"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="133" firstAttribute="width" secondItem="136" secondAttribute="width" id="05F-cw-fMw"/>
|
||||
@@ -237,7 +279,7 @@
|
||||
<constraint firstItem="XPF-Mh-XYC" firstAttribute="firstBaseline" secondItem="mNP-6I-gV4" secondAttribute="firstBaseline" id="AFc-cn-ab1"/>
|
||||
<constraint firstItem="77" firstAttribute="top" secondItem="dxI-5Q-gDD" secondAttribute="top" constant="20" symbolic="YES" id="D9x-E1-HxF"/>
|
||||
<constraint firstItem="82" firstAttribute="leading" secondItem="JhA-jk-CGt" secondAttribute="leading" constant="-18" id="E8S-ti-ghL"/>
|
||||
<constraint firstItem="82" firstAttribute="top" secondItem="80" secondAttribute="bottom" constant="10" id="ELH-2G-UJe"/>
|
||||
<constraint firstItem="82" firstAttribute="top" secondItem="saveLocationPopUp" secondAttribute="bottom" constant="10" id="ELH-2G-UJe"/>
|
||||
<constraint firstItem="mNP-6I-gV4" firstAttribute="firstBaseline" secondItem="tVb-Qq-sU7" secondAttribute="firstBaseline" id="ElQ-mv-Pfd"/>
|
||||
<constraint firstItem="206" firstAttribute="width" secondItem="logFormatLabel" secondAttribute="width" id="G5L-ax-8Io"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="B5v-6Q-3Qa" secondAttribute="trailing" id="Ies-Bx-zqg"/>
|
||||
@@ -272,6 +314,12 @@
|
||||
<constraint firstItem="JhA-jk-CGt" firstAttribute="centerX" secondItem="mNP-6I-gV4" secondAttribute="centerX" id="oJD-2R-bDt"/>
|
||||
<constraint firstItem="logFormatLabel" firstAttribute="width" secondItem="139" secondAttribute="width" id="rof-yU-4Yg"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="136" secondAttribute="trailing" id="s3j-nY-Z3K"/>
|
||||
<constraint firstItem="saveLocationLabel" firstAttribute="firstBaseline" secondItem="saveLocationPopUp" secondAttribute="firstBaseline" id="saveLocationBaseline"/>
|
||||
<constraint firstItem="saveLocationPopUp" firstAttribute="leading" secondItem="saveLocationLabel" secondAttribute="trailing" constant="8" symbolic="YES" id="saveLocationHorizontalSpace"/>
|
||||
<constraint firstItem="saveLocationLabel" firstAttribute="width" secondItem="206" secondAttribute="width" id="saveLocationLabelWidth"/>
|
||||
<constraint firstItem="saveLocationLabel" firstAttribute="leading" secondItem="206" secondAttribute="leading" id="saveLocationLeading"/>
|
||||
<constraint firstItem="saveLocationPopUp" firstAttribute="top" secondItem="80" secondAttribute="bottom" constant="10" id="saveLocationTop"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="saveLocationPopUp" secondAttribute="trailing" id="saveLocationTrailing"/>
|
||||
<constraint firstItem="77" firstAttribute="width" secondItem="78" secondAttribute="width" id="uK9-gt-tF8"/>
|
||||
<constraint firstItem="80" firstAttribute="leading" secondItem="78" secondAttribute="trailing" constant="8" symbolic="YES" id="v25-j6-krj"/>
|
||||
<constraint firstItem="139" firstAttribute="firstBaseline" secondItem="133" secondAttribute="firstBaseline" id="w1s-Sg-fws"/>
|
||||
|
||||
+4
-25
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
@@ -23,12 +23,6 @@
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check for Updates…" id="529">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="checkForUpdates:" target="530" id="531"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Donate…" id="ojS-sZ-qGM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
@@ -38,7 +32,7 @@
|
||||
<menuItem isSeparatorItem="YES" id="236">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="129" userLabel="121">
|
||||
<menuItem title="Preferences…" preferredImageVisibility="hidden" keyEquivalent="," id="129" userLabel="121">
|
||||
<connections>
|
||||
<action selector="showPrefsWindow:" target="-1" id="558"/>
|
||||
</connections>
|
||||
@@ -199,20 +193,6 @@ CA
|
||||
<action selector="removeCompletedItems:" target="-1" id="ouO-db-qWo"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="7Ls-cX-HSz" userLabel="2">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Page Setup..." keyEquivalent="P" id="77" userLabel="5">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="-1" id="87"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="78" userLabel="6">
|
||||
<connections>
|
||||
<action selector="printDocument:" target="-1" id="373"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
@@ -506,7 +486,7 @@ CA
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
<point key="canvasLocation" x="106" y="-246"/>
|
||||
<point key="canvasLocation" x="214" y="-221"/>
|
||||
</menu>
|
||||
<customObject id="419" customClass="NSFontManager"/>
|
||||
<customObject id="449" userLabel="AppDelegate" customClass="AppDelegate" customModule="Subler" customModuleProvider="target">
|
||||
@@ -514,6 +494,5 @@ CA
|
||||
<outlet property="sendToExternalApp" destination="597" id="Kz4-8d-I4D"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="530" customClass="SPUStandardUpdaterController"/>
|
||||
</objects>
|
||||
</document>
|
||||
+145
-166
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -32,11 +32,11 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<view id="1lR-dE-p3x">
|
||||
<rect key="frame" x="0.0" y="0.0" width="550" height="466"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="550" height="505"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bfj-tB-Wq2">
|
||||
<rect key="frame" x="439" y="13" width="98" height="32"/>
|
||||
<rect key="frame" x="446" y="20" width="84" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Add" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="PqB-NK-OtT">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -49,7 +49,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zM1-YP-Au2">
|
||||
<rect key="frame" x="343" y="13" width="98" height="32"/>
|
||||
<rect key="frame" x="350" y="20" width="84" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="PJC-dF-B1z">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -64,52 +64,31 @@ Gw
|
||||
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="QEr-1S-JZX">
|
||||
<rect key="frame" x="20" y="20" width="16" height="16"/>
|
||||
</progressIndicator>
|
||||
<tabView translatesAutoresizingMaskIntoConstraints="NO" id="6hW-RR-cfF">
|
||||
<rect key="frame" x="-12" y="347" width="574" height="115"/>
|
||||
<tabView horizontalHuggingPriority="249" verticalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="6hW-RR-cfF">
|
||||
<rect key="frame" x="-11" y="383" width="572" height="118"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="102" id="bDZ-xh-EwQ"/>
|
||||
</constraints>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="Movie" identifier="1" id="apc-8c-iyM">
|
||||
<view key="view" id="e2g-GX-p4j">
|
||||
<rect key="frame" x="10" y="33" width="554" height="69"/>
|
||||
<rect key="frame" x="10" y="33" width="552" height="72"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="150" translatesAutoresizingMaskIntoConstraints="NO" id="gBb-mO-eZD">
|
||||
<rect key="frame" x="18" y="45" width="44" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Movie:" id="uyt-vh-nv6">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Dyr-Xb-8vA">
|
||||
<rect key="frame" x="67" y="42" width="395" height="21"/>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Dyr-Xb-8vA">
|
||||
<rect key="frame" x="20" y="44" width="434" height="24"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="sXD-8k-I7r">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="gBb-mO-eZD" id="V6J-SK-ibX"/>
|
||||
<outlet property="delegate" destination="-2" id="HI8-qI-i23"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qsS-B6-c2q">
|
||||
<rect key="frame" x="64" y="6" width="187" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="tuc-lL-n0W">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
<menu key="menu" id="obN-m7-G5Q"/>
|
||||
</popUpButtonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="180" id="t4t-2B-C6I"/>
|
||||
</constraints>
|
||||
<accessibility description="Language"/>
|
||||
<connections>
|
||||
<action selector="metadataProviderLanguageSelected:" target="-2" id="WiO-tU-ojJ"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="0aO-Wz-ASZ">
|
||||
<rect key="frame" x="424" y="6" width="117" height="25"/>
|
||||
<popUpButton horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="0aO-Wz-ASZ">
|
||||
<rect key="frame" x="20" y="10" width="125" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" title="iTunes Store" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" inset="2" selectedItem="nn6-mR-Bh1" id="k9r-Fo-4Nl">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
@@ -120,17 +99,14 @@ Gw
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="110" id="4MR-8H-PO9"/>
|
||||
</constraints>
|
||||
<accessibility description="Metadata Provider"/>
|
||||
<connections>
|
||||
<action selector="metadataProviderSelected:" target="-2" id="Z6X-nl-ffA"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="x4l-iV-xgr">
|
||||
<rect key="frame" x="467" y="36" width="77" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HF1-WK-lv1">
|
||||
<rect key="frame" x="466" y="44" width="66" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HF1-WK-lv1">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent" base64-UTF8="YES">
|
||||
@@ -141,107 +117,63 @@ DQ
|
||||
<action selector="searchForResults:" target="-2" id="Oy5-RZ-YGX"/>
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qsS-B6-c2q">
|
||||
<rect key="frame" x="153" y="10" width="130" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="tuc-lL-n0W">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
<menu key="menu" id="obN-m7-G5Q"/>
|
||||
</popUpButtonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="130" id="TL8-uD-R6K"/>
|
||||
</constraints>
|
||||
<accessibility description="Language"/>
|
||||
<connections>
|
||||
<action selector="metadataProviderLanguageSelected:" target="-2" id="WiO-tU-ojJ"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="0aO-Wz-ASZ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="qsS-B6-c2q" secondAttribute="trailing" constant="20" id="9UN-0q-TUf"/>
|
||||
<constraint firstItem="Dyr-Xb-8vA" firstAttribute="leading" secondItem="gBb-mO-eZD" secondAttribute="trailing" constant="7" id="Gas-Hm-DaP"/>
|
||||
<constraint firstItem="0aO-Wz-ASZ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="e2g-GX-p4j" secondAttribute="leading" constant="20" symbolic="YES" id="Hk6-CI-CYe"/>
|
||||
<constraint firstItem="0aO-Wz-ASZ" firstAttribute="leading" secondItem="e2g-GX-p4j" secondAttribute="leading" constant="20" symbolic="YES" id="80g-EC-tOh"/>
|
||||
<constraint firstItem="x4l-iV-xgr" firstAttribute="centerY" secondItem="Dyr-Xb-8vA" secondAttribute="centerY" id="Hvk-C7-byp"/>
|
||||
<constraint firstItem="x4l-iV-xgr" firstAttribute="leading" secondItem="Dyr-Xb-8vA" secondAttribute="trailing" constant="12" id="LJF-Kf-dQD"/>
|
||||
<constraint firstItem="qsS-B6-c2q" firstAttribute="top" secondItem="e2g-GX-p4j" secondAttribute="top" constant="39" id="M8Q-0P-nWB"/>
|
||||
<constraint firstItem="qsS-B6-c2q" firstAttribute="bottom" secondItem="0aO-Wz-ASZ" secondAttribute="bottom" id="OEE-wC-5np"/>
|
||||
<constraint firstItem="Dyr-Xb-8vA" firstAttribute="firstBaseline" secondItem="gBb-mO-eZD" secondAttribute="firstBaseline" id="WeN-uo-QVa"/>
|
||||
<constraint firstItem="gBb-mO-eZD" firstAttribute="top" secondItem="e2g-GX-p4j" secondAttribute="top" constant="8" id="Y39-sC-lfw"/>
|
||||
<constraint firstItem="x4l-iV-xgr" firstAttribute="trailing" secondItem="0aO-Wz-ASZ" secondAttribute="trailing" id="crX-q8-6xo"/>
|
||||
<constraint firstItem="Dyr-Xb-8vA" firstAttribute="leading" secondItem="gBb-mO-eZD" secondAttribute="trailing" constant="7" id="cxE-Kb-aJS"/>
|
||||
<constraint firstItem="gBb-mO-eZD" firstAttribute="leading" secondItem="e2g-GX-p4j" secondAttribute="leading" constant="20" symbolic="YES" id="feD-8w-Skn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="x4l-iV-xgr" secondAttribute="trailing" constant="17" id="fhM-i9-sRG"/>
|
||||
<constraint firstAttribute="bottom" secondItem="qsS-B6-c2q" secondAttribute="bottom" constant="10" id="pUJ-uL-Hfg"/>
|
||||
<constraint firstItem="Dyr-Xb-8vA" firstAttribute="leading" secondItem="qsS-B6-c2q" secondAttribute="leading" id="ylB-Fv-roN"/>
|
||||
<constraint firstItem="Dyr-Xb-8vA" firstAttribute="top" secondItem="e2g-GX-p4j" secondAttribute="top" constant="4" id="RJf-nv-Vmc"/>
|
||||
<constraint firstItem="0aO-Wz-ASZ" firstAttribute="centerY" secondItem="qsS-B6-c2q" secondAttribute="centerY" id="T91-4a-kLt"/>
|
||||
<constraint firstItem="Dyr-Xb-8vA" firstAttribute="leading" secondItem="e2g-GX-p4j" secondAttribute="leading" constant="20" symbolic="YES" id="TD7-Np-2g0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0aO-Wz-ASZ" secondAttribute="bottom" constant="10" id="bqC-Gj-KcW"/>
|
||||
<constraint firstAttribute="trailing" secondItem="x4l-iV-xgr" secondAttribute="trailing" constant="20" symbolic="YES" id="fhM-i9-sRG"/>
|
||||
<constraint firstItem="0aO-Wz-ASZ" firstAttribute="top" secondItem="Dyr-Xb-8vA" secondAttribute="bottom" constant="10" id="g1y-qg-YWU"/>
|
||||
<constraint firstItem="qsS-B6-c2q" firstAttribute="leading" secondItem="0aO-Wz-ASZ" secondAttribute="trailing" constant="8" symbolic="YES" id="ubq-To-aMP"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="qsS-B6-c2q" secondAttribute="trailing" constant="20" symbolic="YES" id="ydk-pF-yHc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
<tabViewItem label="TV Episode" identifier="2" id="GPk-3A-rQI">
|
||||
<view key="view" id="pC0-6X-DbE">
|
||||
<rect key="frame" x="10" y="33" width="554" height="69"/>
|
||||
<rect key="frame" x="10" y="33" width="552" height="72"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="PoJ-z7-u2L">
|
||||
<rect key="frame" x="14" y="45" width="61" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="TV Show:" id="lE4-J1-ySV">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gWo-ag-3S4">
|
||||
<rect key="frame" x="14" y="13" width="61" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Season #" id="kz7-mH-DuT">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nYS-Uo-Puv">
|
||||
<rect key="frame" x="80" y="10" width="30" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="9CR-ib-DtF"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="7S1-uI-qok">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="gWo-ag-3S4" id="5FA-Hq-pOg"/>
|
||||
<outlet property="delegate" destination="-2" id="wF7-SW-Zgw"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PmP-Uz-mXF">
|
||||
<rect key="frame" x="184" y="10" width="30" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="JnI-dd-MkA"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Xvo-B4-9Wa">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="r32-v1-g3U" id="767-O1-jhF"/>
|
||||
<outlet property="delegate" destination="-2" id="Em3-9Q-0I2"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r32-v1-g3U">
|
||||
<rect key="frame" x="115" y="13" width="64" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Episode #" id="Zik-QU-m81">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<comboBox verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yxL-hY-Wvf">
|
||||
<rect key="frame" x="79" y="42" width="386" height="23"/>
|
||||
<comboBox focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yxL-hY-Wvf">
|
||||
<rect key="frame" x="20" y="44" width="434" height="24"/>
|
||||
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="o7O-s5-2MI">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</comboBoxCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="PoJ-z7-u2L" id="Mqw-FY-8Ae"/>
|
||||
<outlet property="dataSource" destination="-2" id="1TN-qD-O3Q"/>
|
||||
<outlet property="delegate" destination="-2" id="24Y-25-ZbJ"/>
|
||||
</connections>
|
||||
</comboBox>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4yY-id-JNb">
|
||||
<rect key="frame" x="211" y="6" width="160" height="25"/>
|
||||
<popUpButton horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4yY-id-JNb">
|
||||
<rect key="frame" x="153" y="10" width="130" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="6dD-ZJ-fLf">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
<menu key="menu" id="eDp-3G-Kg4"/>
|
||||
</popUpButtonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="153" id="aRl-QK-caF"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="130" id="Jj5-aw-h6y"/>
|
||||
</constraints>
|
||||
<accessibility description="Language"/>
|
||||
<connections>
|
||||
@@ -249,7 +181,7 @@ DQ
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton horizontalCompressionResistancePriority="749" translatesAutoresizingMaskIntoConstraints="NO" id="UTG-O0-5RG">
|
||||
<rect key="frame" x="424" y="6" width="117" height="25"/>
|
||||
<rect key="frame" x="20" y="10" width="125" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" title="iTunes Store" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" inset="2" selectedItem="j44-FV-Lpy" id="O3t-4h-3zl">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
@@ -261,16 +193,13 @@ DQ
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="110" id="yze-MC-pfr"/>
|
||||
</constraints>
|
||||
<accessibility description="Metadata provider"/>
|
||||
<connections>
|
||||
<action selector="metadataProviderSelected:" target="-2" id="nMq-JN-KOa"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EpM-F6-30O">
|
||||
<rect key="frame" x="467" y="37" width="77" height="32"/>
|
||||
<rect key="frame" x="466" y="44" width="66" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5Mu-cI-Uiu">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -282,31 +211,73 @@ DQ
|
||||
<action selector="searchForResults:" target="-2" id="dCt-ma-lyj"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gWo-ag-3S4">
|
||||
<rect key="frame" x="289" y="14" width="61" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Season #" id="kz7-mH-DuT">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nYS-Uo-Puv">
|
||||
<rect key="frame" x="355" y="10" width="30" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="j6g-V9-PJF"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="7S1-uI-qok">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="gWo-ag-3S4" id="5FA-Hq-pOg"/>
|
||||
<outlet property="delegate" destination="-2" id="wF7-SW-Zgw"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PmP-Uz-mXF">
|
||||
<rect key="frame" x="460" y="10" width="30" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="ojN-7h-wgW"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Xvo-B4-9Wa">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="r32-v1-g3U" id="767-O1-jhF"/>
|
||||
<outlet property="delegate" destination="-2" id="Em3-9Q-0I2"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r32-v1-g3U">
|
||||
<rect key="frame" x="391" y="14" width="64" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Episode #" id="Zik-QU-m81">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="gWo-ag-3S4" secondAttribute="trailing" constant="20" symbolic="YES" id="1cf-QH-GoS"/>
|
||||
<constraint firstItem="yxL-hY-Wvf" firstAttribute="leading" secondItem="nYS-Uo-Puv" secondAttribute="leading" id="3XJ-NW-2OT"/>
|
||||
<constraint firstItem="nYS-Uo-Puv" firstAttribute="baseline" secondItem="r32-v1-g3U" secondAttribute="baseline" id="5Yy-LG-A13"/>
|
||||
<constraint firstItem="UTG-O0-5RG" firstAttribute="leading" secondItem="4yY-id-JNb" secondAttribute="trailing" constant="60" id="5bZ-A2-oAt"/>
|
||||
<constraint firstItem="gWo-ag-3S4" firstAttribute="baseline" secondItem="nYS-Uo-Puv" secondAttribute="baseline" id="7w2-5k-loo"/>
|
||||
<constraint firstItem="PoJ-z7-u2L" firstAttribute="top" secondItem="pC0-6X-DbE" secondAttribute="top" constant="8" id="EVi-oc-tqE"/>
|
||||
<constraint firstItem="r32-v1-g3U" firstAttribute="baseline" secondItem="PmP-Uz-mXF" secondAttribute="baseline" id="IcC-EN-90a"/>
|
||||
<constraint firstItem="PmP-Uz-mXF" firstAttribute="leading" secondItem="r32-v1-g3U" secondAttribute="trailing" constant="7" id="Nlc-DQ-qvf"/>
|
||||
<constraint firstItem="gWo-ag-3S4" firstAttribute="width" secondItem="PoJ-z7-u2L" secondAttribute="width" id="PI1-1C-eAU"/>
|
||||
<constraint firstItem="EpM-F6-30O" firstAttribute="trailing" secondItem="UTG-O0-5RG" secondAttribute="trailing" id="PKp-73-Vbb"/>
|
||||
<constraint firstItem="PoJ-z7-u2L" firstAttribute="leading" secondItem="pC0-6X-DbE" secondAttribute="leading" constant="16" id="YbU-68-uWT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EpM-F6-30O" secondAttribute="trailing" constant="17" id="baJ-gT-gpq"/>
|
||||
<constraint firstItem="EpM-F6-30O" firstAttribute="leading" secondItem="yxL-hY-Wvf" secondAttribute="trailing" constant="12" id="e0P-Oe-Tz3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="nYS-Uo-Puv" secondAttribute="bottom" constant="10" id="ehG-Fz-i2o"/>
|
||||
<constraint firstItem="r32-v1-g3U" firstAttribute="leading" secondItem="nYS-Uo-Puv" secondAttribute="trailing" constant="7" id="iUT-w5-MQJ"/>
|
||||
<constraint firstItem="4yY-id-JNb" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="PmP-Uz-mXF" secondAttribute="trailing" priority="750" constant="8" symbolic="YES" id="lc1-tA-1Gj"/>
|
||||
<constraint firstItem="4yY-id-JNb" firstAttribute="top" secondItem="pC0-6X-DbE" secondAttribute="top" constant="39" id="n3d-4T-yVM"/>
|
||||
<constraint firstItem="4yY-id-JNb" firstAttribute="bottom" secondItem="UTG-O0-5RG" secondAttribute="bottom" id="r9M-rQ-1OL"/>
|
||||
<constraint firstItem="PoJ-z7-u2L" firstAttribute="firstBaseline" secondItem="yxL-hY-Wvf" secondAttribute="firstBaseline" constant="1" id="txE-Mz-IYh"/>
|
||||
<constraint firstItem="gWo-ag-3S4" firstAttribute="leading" secondItem="PoJ-z7-u2L" secondAttribute="leading" id="uwV-a4-QuX"/>
|
||||
<constraint firstItem="yxL-hY-Wvf" firstAttribute="leading" secondItem="PoJ-z7-u2L" secondAttribute="trailing" constant="7" id="xNm-xS-fGk"/>
|
||||
<constraint firstItem="EpM-F6-30O" firstAttribute="centerY" secondItem="yxL-hY-Wvf" secondAttribute="centerY" id="xVF-6P-gxR"/>
|
||||
<constraint firstItem="PmP-Uz-mXF" firstAttribute="bottom" secondItem="4yY-id-JNb" secondAttribute="bottom" id="xd7-a0-KTM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="UTG-O0-5RG" secondAttribute="bottom" constant="10" id="0jz-eZ-PYZ"/>
|
||||
<constraint firstItem="PmP-Uz-mXF" firstAttribute="leading" secondItem="r32-v1-g3U" secondAttribute="trailing" constant="7" id="76f-1f-IhA"/>
|
||||
<constraint firstItem="EpM-F6-30O" firstAttribute="leading" secondItem="yxL-hY-Wvf" secondAttribute="trailing" constant="12" id="Bbw-ih-qSD"/>
|
||||
<constraint firstItem="UTG-O0-5RG" firstAttribute="top" secondItem="yxL-hY-Wvf" secondAttribute="bottom" constant="10" id="Drk-HP-jyl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EpM-F6-30O" secondAttribute="trailing" constant="20" symbolic="YES" id="EpQ-oZ-M1N"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="PmP-Uz-mXF" secondAttribute="trailing" constant="20" symbolic="YES" id="GX9-Ax-mrl"/>
|
||||
<constraint firstItem="nYS-Uo-Puv" firstAttribute="firstBaseline" secondItem="r32-v1-g3U" secondAttribute="firstBaseline" id="OVu-Br-svU"/>
|
||||
<constraint firstItem="EpM-F6-30O" firstAttribute="top" secondItem="pC0-6X-DbE" secondAttribute="top" constant="4" id="RoW-MN-5l8"/>
|
||||
<constraint firstItem="gWo-ag-3S4" firstAttribute="firstBaseline" secondItem="nYS-Uo-Puv" secondAttribute="firstBaseline" id="Shj-mM-Vg8"/>
|
||||
<constraint firstItem="4yY-id-JNb" firstAttribute="leading" secondItem="UTG-O0-5RG" secondAttribute="trailing" constant="8" symbolic="YES" id="U32-Nz-YfN"/>
|
||||
<constraint firstItem="nYS-Uo-Puv" firstAttribute="leading" secondItem="gWo-ag-3S4" secondAttribute="trailing" constant="7" id="YqB-c1-I3n"/>
|
||||
<constraint firstItem="4yY-id-JNb" firstAttribute="centerY" secondItem="gWo-ag-3S4" secondAttribute="centerY" id="eLh-kH-KNh"/>
|
||||
<constraint firstItem="r32-v1-g3U" firstAttribute="leading" secondItem="nYS-Uo-Puv" secondAttribute="trailing" constant="8" symbolic="YES" id="fVO-St-Aez"/>
|
||||
<constraint firstItem="yxL-hY-Wvf" firstAttribute="leading" secondItem="pC0-6X-DbE" secondAttribute="leading" constant="20" symbolic="YES" id="hTu-YS-Eeh"/>
|
||||
<constraint firstItem="UTG-O0-5RG" firstAttribute="leading" secondItem="yxL-hY-Wvf" secondAttribute="leading" id="hp6-qT-uGH"/>
|
||||
<constraint firstItem="gWo-ag-3S4" firstAttribute="leading" secondItem="4yY-id-JNb" secondAttribute="trailing" constant="8" symbolic="YES" id="lRS-M6-Cxr"/>
|
||||
<constraint firstItem="UTG-O0-5RG" firstAttribute="centerY" secondItem="4yY-id-JNb" secondAttribute="centerY" id="nVx-52-jdh"/>
|
||||
<constraint firstItem="r32-v1-g3U" firstAttribute="firstBaseline" secondItem="PmP-Uz-mXF" secondAttribute="firstBaseline" id="rMa-Q9-tLd"/>
|
||||
<constraint firstItem="yxL-hY-Wvf" firstAttribute="top" secondItem="pC0-6X-DbE" secondAttribute="top" constant="4" id="x6j-8D-FgH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
@@ -315,7 +286,7 @@ DQ
|
||||
<outlet property="delegate" destination="-2" id="1gw-D2-r7v"/>
|
||||
</connections>
|
||||
</tabView>
|
||||
<textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dWj-kw-NVW">
|
||||
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dWj-kw-NVW">
|
||||
<rect key="frame" x="41" y="21" width="297" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Progress status" id="gYx-cY-5Xj">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
@@ -324,20 +295,20 @@ DQ
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<splitView autosaveName="SBMetadataSearchSplitView" translatesAutoresizingMaskIntoConstraints="NO" id="BfX-EM-ktQ">
|
||||
<rect key="frame" x="20" y="60" width="510" height="289"/>
|
||||
<rect key="frame" x="20" y="64" width="510" height="321"/>
|
||||
<subviews>
|
||||
<customView misplaced="YES" id="8It-Zb-03g">
|
||||
<rect key="frame" x="0.0" y="0.0" width="510" height="103"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="510" height="115"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<scrollView misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VnH-EL-2bp">
|
||||
<rect key="frame" x="0.0" y="1" width="510" height="102"/>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VnH-EL-2bp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="510" height="120"/>
|
||||
<clipView key="contentView" id="I28-fS-tPQ">
|
||||
<rect key="frame" x="1" y="1" width="508" height="100"/>
|
||||
<rect key="frame" x="1" y="1" width="508" height="118"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="15" rowSizeStyle="automatic" headerView="Bv4-ow-7Qb" viewBased="YES" id="IDz-Ox-2sW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="508" height="75"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="508" height="93"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -359,7 +330,7 @@ DQ
|
||||
<rect key="frame" x="1" y="1" width="505" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFv-ne-Jzf">
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFv-ne-Jzf">
|
||||
<rect key="frame" x="0.0" y="1" width="505" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" id="wLe-r3-x0V">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
@@ -406,25 +377,29 @@ DQ
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="VnH-EL-2bp" secondAttribute="bottom" id="IF3-gK-AfW"/>
|
||||
<constraint firstItem="VnH-EL-2bp" firstAttribute="top" secondItem="8It-Zb-03g" secondAttribute="top" id="JI5-nL-Cb4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="VnH-EL-2bp" secondAttribute="trailing" id="JL5-2S-520"/>
|
||||
<constraint firstItem="VnH-EL-2bp" firstAttribute="leading" secondItem="8It-Zb-03g" secondAttribute="leading" id="LAd-9v-90B"/>
|
||||
<constraint firstAttribute="trailing" secondItem="VnH-EL-2bp" secondAttribute="trailing" id="O4c-bt-Ef6"/>
|
||||
<constraint firstItem="VnH-EL-2bp" firstAttribute="leading" secondItem="8It-Zb-03g" secondAttribute="leading" id="QPf-58-gaz"/>
|
||||
<constraint firstItem="VnH-EL-2bp" firstAttribute="top" secondItem="8It-Zb-03g" secondAttribute="top" id="k1y-Ov-GHp"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VnH-EL-2bp" secondAttribute="bottom" id="kvH-Wg-mrC"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="120" id="oBd-XH-2sW"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<customView misplaced="YES" id="YFw-L1-xW7">
|
||||
<rect key="frame" x="0.0" y="112" width="510" height="177"/>
|
||||
<rect key="frame" x="0.0" y="124" width="510" height="197"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<scrollView misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="39" horizontalPageScroll="10" verticalLineScroll="39" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L9f-RN-ymm">
|
||||
<rect key="frame" x="0.0" y="-3" width="510" height="180"/>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="39" horizontalPageScroll="10" verticalLineScroll="39" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L9f-RN-ymm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="510" height="192"/>
|
||||
<clipView key="contentView" ambiguous="YES" id="JKj-Cf-XlS">
|
||||
<rect key="frame" x="1" y="1" width="508" height="178"/>
|
||||
<rect key="frame" x="1" y="1" width="508" height="190"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="37" rowSizeStyle="automatic" headerView="8SH-1C-Y6N" viewBased="YES" id="7Te-u0-Sax" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="508" height="153"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="508" height="165"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -446,7 +421,7 @@ DQ
|
||||
<rect key="frame" x="1" y="1" width="101" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDJ-re-Kse">
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDJ-re-Kse">
|
||||
<rect key="frame" x="0.0" y="22" width="101" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" id="5mH-2x-szO">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
@@ -482,7 +457,7 @@ DQ
|
||||
<rect key="frame" x="105" y="1" width="401" height="14"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Szc-uj-Lea">
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Szc-uj-Lea">
|
||||
<rect key="frame" x="0.0" y="0.0" width="401" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" id="cXa-al-MIH">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
@@ -505,7 +480,7 @@ DQ
|
||||
<rect key="frame" x="105" y="17" width="401" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uJ3-OT-6fm">
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uJ3-OT-6fm">
|
||||
<rect key="frame" x="0.0" y="12" width="401" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" selectable="YES" sendsActionOnEndEditing="YES" id="L0d-pm-lX4">
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
@@ -552,11 +527,15 @@ DQ
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="L9f-RN-ymm" firstAttribute="leading" secondItem="YFw-L1-xW7" secondAttribute="leading" id="CaQ-4M-NYe"/>
|
||||
<constraint firstItem="L9f-RN-ymm" firstAttribute="top" secondItem="YFw-L1-xW7" secondAttribute="top" id="DDY-yc-xwu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="L9f-RN-ymm" secondAttribute="bottom" id="Dji-UV-X83"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="160" id="MiB-Tq-jnd"/>
|
||||
<constraint firstItem="L9f-RN-ymm" firstAttribute="top" secondItem="YFw-L1-xW7" secondAttribute="top" id="Y6z-es-GyW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="L9f-RN-ymm" secondAttribute="bottom" id="Ylu-kT-cca"/>
|
||||
<constraint firstAttribute="trailing" secondItem="L9f-RN-ymm" secondAttribute="trailing" id="o50-sW-JjL"/>
|
||||
<constraint firstItem="L9f-RN-ymm" firstAttribute="leading" secondItem="YFw-L1-xW7" secondAttribute="leading" id="vYe-8Y-9O9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="L9f-RN-ymm" secondAttribute="trailing" id="wuL-0U-r1i"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
</subviews>
|
||||
@@ -567,25 +546,25 @@ DQ
|
||||
</splitView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="BfX-EM-ktQ" firstAttribute="top" secondItem="6hW-RR-cfF" secondAttribute="bottom" constant="8" symbolic="YES" id="1xg-4I-ico"/>
|
||||
<constraint firstAttribute="bottom" secondItem="QEr-1S-JZX" secondAttribute="bottom" constant="20" id="27F-h3-4J5"/>
|
||||
<constraint firstItem="6hW-RR-cfF" firstAttribute="leading" secondItem="1lR-dE-p3x" secondAttribute="leading" constant="-5" id="2VD-Jo-sCA"/>
|
||||
<constraint firstItem="6hW-RR-cfF" firstAttribute="leading" secondItem="1lR-dE-p3x" secondAttribute="leading" constant="-4" id="2VD-Jo-sCA"/>
|
||||
<constraint firstItem="6hW-RR-cfF" firstAttribute="top" secondItem="1lR-dE-p3x" secondAttribute="top" constant="10" id="40o-r6-s4C"/>
|
||||
<constraint firstItem="BfX-EM-ktQ" firstAttribute="trailing" secondItem="Bfj-tB-Wq2" secondAttribute="trailing" id="Akd-YK-H0o"/>
|
||||
<constraint firstItem="QEr-1S-JZX" firstAttribute="leading" secondItem="1lR-dE-p3x" secondAttribute="leading" constant="20" id="DRP-5G-W3e"/>
|
||||
<constraint firstAttribute="trailing" secondItem="BfX-EM-ktQ" secondAttribute="trailing" constant="20" symbolic="YES" id="EVf-1X-v1B"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Bfj-tB-Wq2" secondAttribute="bottom" constant="20" id="LeM-a8-IMO"/>
|
||||
<constraint firstItem="dWj-kw-NVW" firstAttribute="leading" secondItem="QEr-1S-JZX" secondAttribute="trailing" constant="7" id="Nv1-th-2ki"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6hW-RR-cfF" secondAttribute="trailing" constant="-5" id="Rfl-Zu-KRL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6hW-RR-cfF" secondAttribute="trailing" constant="-4" id="Rfl-Zu-KRL"/>
|
||||
<constraint firstItem="Bfj-tB-Wq2" firstAttribute="top" secondItem="BfX-EM-ktQ" secondAttribute="bottom" constant="20" symbolic="YES" id="ST5-KA-9jo"/>
|
||||
<constraint firstItem="zM1-YP-Au2" firstAttribute="baseline" secondItem="Bfj-tB-Wq2" secondAttribute="baseline" id="Ydc-dO-pHN"/>
|
||||
<constraint firstItem="dWj-kw-NVW" firstAttribute="centerY" secondItem="QEr-1S-JZX" secondAttribute="centerY" id="ZJK-aI-ebA"/>
|
||||
<constraint firstItem="zM1-YP-Au2" firstAttribute="width" secondItem="Bfj-tB-Wq2" secondAttribute="width" id="ain-gy-U2V"/>
|
||||
<constraint firstItem="Bfj-tB-Wq2" firstAttribute="top" secondItem="BfX-EM-ktQ" secondAttribute="bottom" constant="20" id="amA-Vx-LBb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Bfj-tB-Wq2" secondAttribute="trailing" constant="20" id="fSb-kG-oqW"/>
|
||||
<constraint firstItem="BfX-EM-ktQ" firstAttribute="top" secondItem="6hW-RR-cfF" secondAttribute="bottom" constant="8" id="gB2-uH-CDQ"/>
|
||||
<constraint firstItem="BfX-EM-ktQ" firstAttribute="leading" secondItem="1lR-dE-p3x" secondAttribute="leading" constant="20" symbolic="YES" id="g9K-ua-Yl9"/>
|
||||
<constraint firstItem="Bfj-tB-Wq2" firstAttribute="leading" secondItem="zM1-YP-Au2" secondAttribute="trailing" constant="12" id="hPx-74-Y3U"/>
|
||||
<constraint firstItem="BfX-EM-ktQ" firstAttribute="leading" secondItem="QEr-1S-JZX" secondAttribute="leading" id="mjk-ta-h2N"/>
|
||||
<constraint firstItem="zM1-YP-Au2" firstAttribute="leading" secondItem="dWj-kw-NVW" secondAttribute="trailing" constant="14" id="vyk-qX-8IX"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="244" y="72"/>
|
||||
<point key="canvasLocation" x="130" y="71"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
+30
-24
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24506"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -20,31 +20,31 @@
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="98" y="443" width="503" height="505"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1049"/>
|
||||
<value key="minSize" type="size" width="378" height="200"/>
|
||||
<view key="contentView" wantsLayer="YES" id="2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="503" height="505"/>
|
||||
<view key="contentView" wantsLayer="YES" misplaced="YES" id="2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="505"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="23" horizontalPageScroll="10" verticalLineScroll="23" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3">
|
||||
<rect key="frame" x="-1" y="46" width="505" height="460"/>
|
||||
<rect key="frame" x="-1" y="69" width="452" height="437"/>
|
||||
<clipView key="contentView" id="ix7-yM-0F6">
|
||||
<rect key="frame" x="1" y="1" width="503" height="458"/>
|
||||
<rect key="frame" x="1" y="1" width="431" height="435"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="19" rowSizeStyle="automatic" viewBased="YES" id="7" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="503" height="458"/>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="sequential" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="19" rowSizeStyle="automatic" viewBased="YES" id="7" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="452" height="435"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="4"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||
<tableColumns>
|
||||
<tableColumn identifier="nameColumn" editable="NO" width="462" minWidth="40" maxWidth="3000" id="8">
|
||||
<tableColumn identifier="nameColumn" editable="NO" width="452" minWidth="40" maxWidth="3000" id="8">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="nameColumn">
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</tableHeaderCell>
|
||||
<textFieldCell key="dataCell" lineBreakMode="charWrapping" selectable="YES" editable="YES" alignment="left" id="11">
|
||||
<textFieldCell key="dataCell" lineBreakMode="truncatingMiddle" selectable="YES" editable="YES" alignment="left" id="11">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -52,26 +52,23 @@
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView id="ofF-gY-wBR">
|
||||
<rect key="frame" x="1" y="2" width="471" height="19"/>
|
||||
<rect key="frame" x="1" y="2" width="428" height="19"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
||||
<rect key="frame" x="29" y="2" width="413" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
||||
<rect key="frame" x="29" y="2" width="370" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" title="Name" usesSingleLineMode="YES" id="srx-EJ-mK6">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Xeb-eQ-90j">
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Xeb-eQ-90j">
|
||||
<rect key="frame" x="7" y="2" width="16" height="16"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="EncodeComplete" id="uXb-c3-MQO"/>
|
||||
</imageView>
|
||||
<button toolTip="Show item info" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o98-wM-YAQ">
|
||||
<rect key="frame" x="448" y="2" width="16" height="16"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<button toolTip="Show item info" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="o98-wM-YAQ">
|
||||
<rect key="frame" x="405" y="2" width="16" height="16"/>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="info" imagePosition="overlaps" alignment="center" alternateImage="info-pressed" imageScaling="proportionallyDown" inset="2" id="AFW-1U-iaL">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -82,6 +79,15 @@
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Xeb-eQ-90j" firstAttribute="centerY" secondItem="ofF-gY-wBR" secondAttribute="centerY" id="90b-BW-lff"/>
|
||||
<constraint firstItem="o98-wM-YAQ" firstAttribute="leading" secondItem="pjh-GC-aOA" secondAttribute="trailing" constant="8" symbolic="YES" id="CaB-q0-ftY"/>
|
||||
<constraint firstItem="Xeb-eQ-90j" firstAttribute="leading" secondItem="ofF-gY-wBR" secondAttribute="leading" constant="7" id="G9p-cq-HKH"/>
|
||||
<constraint firstItem="o98-wM-YAQ" firstAttribute="centerY" secondItem="ofF-gY-wBR" secondAttribute="centerY" id="USV-VJ-xKf"/>
|
||||
<constraint firstItem="pjh-GC-aOA" firstAttribute="leading" secondItem="Xeb-eQ-90j" secondAttribute="trailing" constant="8" symbolic="YES" id="ZBk-XN-nd9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="o98-wM-YAQ" secondAttribute="trailing" constant="7" id="mX3-LL-ent"/>
|
||||
<constraint firstItem="pjh-GC-aOA" firstAttribute="centerY" secondItem="ofF-gY-wBR" secondAttribute="centerY" id="odE-Gg-80F"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="imageView" destination="Xeb-eQ-90j" id="Q6V-gj-mwY"/>
|
||||
<outlet property="textField" destination="pjh-GC-aOA" id="PQK-Y7-IFu"/>
|
||||
@@ -100,7 +106,7 @@
|
||||
</subviews>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6">
|
||||
<rect key="frame" x="1" y="443" width="503" height="16"/>
|
||||
<rect key="frame" x="1" y="420" width="431" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="4">
|
||||
@@ -109,7 +115,7 @@
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="12">
|
||||
<rect key="frame" x="8" y="16" width="339" height="16"/>
|
||||
<rect key="frame" x="8" y="39" width="267" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Queue items" id="13">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -117,7 +123,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<progressIndicator wantsLayer="YES" maxValue="100" indeterminate="YES" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="91">
|
||||
<rect key="frame" x="353" y="13" width="140" height="20"/>
|
||||
<rect key="frame" x="281" y="14" width="140" height="41"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="140" id="zk9-SM-dx0"/>
|
||||
</constraints>
|
||||
@@ -138,7 +144,7 @@
|
||||
<connections>
|
||||
<outlet property="delegate" destination="-2" id="c4X-w0-NMZ"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="165.5" y="60.5"/>
|
||||
<point key="canvasLocation" x="294.5" y="35.5"/>
|
||||
</window>
|
||||
<menu id="78">
|
||||
<items>
|
||||
|
||||
+52
-54
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -16,18 +16,15 @@
|
||||
<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="382" height="642"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="395" height="687"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zEH-aV-Tl7">
|
||||
<rect key="frame" x="111" y="88" width="68" height="16"/>
|
||||
<rect key="frame" x="112" y="89" width="65" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
</buttonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="67" id="st2-UI-Qkc"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.optimize" id="2oW-EB-1dq">
|
||||
<dictionary key="options">
|
||||
@@ -37,7 +34,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Clear existing metadata" translatesAutoresizingMaskIntoConstraints="NO" id="9GN-f6-r2j">
|
||||
<rect key="frame" x="111" y="607" width="145" height="16"/>
|
||||
<rect key="frame" x="112" y="653" width="142" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -51,7 +48,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="754" translatesAutoresizingMaskIntoConstraints="NO" id="MGZ-hB-jhx">
|
||||
<rect key="frame" x="112" y="39" width="132" height="16"/>
|
||||
<rect key="frame" x="113" y="40" width="129" height="14"/>
|
||||
<buttonCell key="cell" type="check" title="Auto-Start the queue" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="LYO-G0-9jA">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -65,7 +62,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Organize the mp4 alternate groups" verticalHuggingPriority="757" translatesAutoresizingMaskIntoConstraints="NO" id="ccd-Xn-Dj3">
|
||||
<rect key="frame" x="111" y="440" width="110" height="16"/>
|
||||
<rect key="frame" x="112" y="466" width="107" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -79,7 +76,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Load the external srt subtitles file" verticalHuggingPriority="758" translatesAutoresizingMaskIntoConstraints="NO" id="etc-K7-Atw">
|
||||
<rect key="frame" x="111" y="400" width="142" height="16"/>
|
||||
<rect key="frame" x="112" y="426" width="138" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -93,7 +90,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="86l-GG-SpO">
|
||||
<rect key="frame" x="195" y="127" width="130" height="17"/>
|
||||
<rect key="frame" x="195" y="132" width="130" height="20"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -122,7 +119,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="vJ5-JB-k1m">
|
||||
<rect key="frame" x="132" y="129" width="56" height="14"/>
|
||||
<rect key="frame" x="132" y="135" width="56" 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"/>
|
||||
@@ -130,7 +127,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="NhN-Lg-awX">
|
||||
<rect key="frame" x="126" y="149" width="62" height="14"/>
|
||||
<rect key="frame" x="126" y="159" 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"/>
|
||||
@@ -138,7 +135,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="eTL-yP-QQ5">
|
||||
<rect key="frame" x="126" y="565" width="48" height="14"/>
|
||||
<rect key="frame" x="126" y="608" 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"/>
|
||||
@@ -149,7 +146,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="bDo-OD-bck">
|
||||
<rect key="frame" x="126" y="519" width="63" height="14"/>
|
||||
<rect key="frame" x="126" y="554" 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"/>
|
||||
@@ -168,7 +165,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="S7L-mA-j3Y">
|
||||
<rect key="frame" x="49" y="608" width="58" height="14"/>
|
||||
<rect key="frame" x="49" y="653" width="58" 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"/>
|
||||
@@ -176,7 +173,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DVM-Js-DwK">
|
||||
<rect key="frame" x="195" y="147" width="130" height="17"/>
|
||||
<rect key="frame" x="195" y="156" width="130" height="20"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -208,7 +205,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZVm-yi-3cE">
|
||||
<rect key="frame" x="181" y="563" width="150" height="17"/>
|
||||
<rect key="frame" x="181" y="605" width="150" height="20"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="CbR-eu-sGI">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -235,7 +232,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tLh-V3-OfB">
|
||||
<rect key="frame" x="195" y="517" width="150" height="17"/>
|
||||
<rect key="frame" x="195" y="551" width="150" height="20"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -262,7 +259,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="BWL-Nn-iGH">
|
||||
<rect key="frame" x="142" y="499" width="63" height="14"/>
|
||||
<rect key="frame" x="142" y="530" width="63" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="58" id="vbR-Os-38g"/>
|
||||
</constraints>
|
||||
@@ -276,7 +273,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="Ns9-7q-hsh">
|
||||
<rect key="frame" x="126" y="471" width="54" height="14"/>
|
||||
<rect key="frame" x="126" y="498" width="54" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="98L-OX-PB1"/>
|
||||
</constraints>
|
||||
@@ -290,7 +287,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ce4-O7-Iu4">
|
||||
<rect key="frame" x="212" y="497" width="150" height="17"/>
|
||||
<rect key="frame" x="212" y="527" width="150" height="20"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -318,7 +315,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="73q-gi-fe2">
|
||||
<rect key="frame" x="142" y="545" width="63" height="14"/>
|
||||
<rect key="frame" x="142" y="584" 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"/>
|
||||
@@ -329,7 +326,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5rh-cM-iOg">
|
||||
<rect key="frame" x="212" y="543" width="150" height="17"/>
|
||||
<rect key="frame" x="212" y="581" width="150" height="20"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -358,14 +355,11 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button toolTip="Organize the audio fallbacks" verticalHuggingPriority="756" translatesAutoresizingMaskIntoConstraints="NO" id="TV6-Sk-Bqr">
|
||||
<rect key="frame" x="111" y="420" width="118" height="16"/>
|
||||
<rect key="frame" x="112" y="446" width="115" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
</buttonCell>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="117" id="8uL-Xd-FJM"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.options.fixFallbacks" id="W1e-uB-NXG">
|
||||
<dictionary key="options">
|
||||
@@ -375,7 +369,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Set tracks without a language to the selected one" verticalHuggingPriority="756" translatesAutoresizingMaskIntoConstraints="NO" id="slL-2h-MPl">
|
||||
<rect key="frame" x="111" y="320" width="159" height="16"/>
|
||||
<rect key="frame" x="112" y="346" width="156" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -389,7 +383,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="swT-iM-shZ">
|
||||
<rect key="frame" x="126" y="302" width="64" height="14"/>
|
||||
<rect key="frame" x="126" y="325" width="64" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="60" id="x6U-u1-ezQ"/>
|
||||
</constraints>
|
||||
@@ -403,7 +397,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZZk-4j-Ji7">
|
||||
<rect key="frame" x="197" y="300" width="111" height="17"/>
|
||||
<rect key="frame" x="197" y="322" width="111" height="20"/>
|
||||
<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"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -431,7 +425,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="ntU-85-AaJ">
|
||||
<rect key="frame" x="126" y="262" width="63" height="14"/>
|
||||
<rect key="frame" x="126" y="283" width="63" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Language:" id="963-dI-WCB">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -442,7 +436,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ztL-LO-XhV">
|
||||
<rect key="frame" x="196" y="260" width="111" height="17"/>
|
||||
<rect key="frame" x="196" y="280" width="111" height="20"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="tj2-P4-OCU">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -470,7 +464,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button horizontalHuggingPriority="248" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3et-YT-WBR">
|
||||
<rect key="frame" x="111" y="279" width="195" height="16"/>
|
||||
<rect key="frame" x="112" y="303" width="192" height="14"/>
|
||||
<string key="toolTip">In files with multiple audio tracks in different languages, this will enable the preferred langauge and disable all other tracks. For AppleTV and some other players, this allows the preferred language audio to play by default. An audio track labeled with the selected language and tagged as main program content must exist. </string>
|
||||
<buttonCell key="cell" type="check" title="Enable audio track with language" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="nC7-4d-Is1">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
@@ -485,7 +479,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="LiA-V6-VEx" userLabel="Change Subtitle Language Track">
|
||||
<rect key="frame" x="111" y="242" width="211" height="16"/>
|
||||
<rect key="frame" x="112" y="262" width="208" height="14"/>
|
||||
<string key="toolTip">In files with multiple subtitle tracks in different languages, this will enable the preferred langauge and disable all other tracks. For AppleTV and some other players, this allows the preferred language subtitles to play by default. A subtitle track labeled with the preferred language must exist in the file.</string>
|
||||
<buttonCell key="cell" type="check" title="Enable subtitles track with language" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="LD5-Kv-x0M" userLabel="Change Subtitle Language Track">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
@@ -500,7 +494,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="755" translatesAutoresizingMaskIntoConstraints="NO" id="yI9-2a-q2a">
|
||||
<rect key="frame" x="112" y="19" width="178" height="16"/>
|
||||
<rect key="frame" x="113" y="20" width="175" height="14"/>
|
||||
<buttonCell key="cell" type="check" title="Show Notification When Done" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="n6P-IC-SEp">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -514,7 +508,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Delete all custom track names" verticalHuggingPriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="22k-mA-HyA">
|
||||
<rect key="frame" x="111" y="380" width="122" height="16"/>
|
||||
<rect key="frame" x="112" y="406" width="119" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -528,7 +522,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Rename audio tracks according to channel count (Mono, Stereo, Surround)" verticalHuggingPriority="753" translatesAutoresizingMaskIntoConstraints="NO" id="81E-pQ-vyQ">
|
||||
<rect key="frame" x="111" y="360" width="159" height="16"/>
|
||||
<rect key="frame" x="112" y="386" width="156" height="14"/>
|
||||
<buttonCell key="cell" type="check" title="Prettify audio track names" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="akF-dR-OPB" userLabel="Prettify audio track names">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -542,7 +536,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="Rename chapters titles to "Chapter N" format." verticalHuggingPriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="0qr-Nt-Pan">
|
||||
<rect key="frame" x="111" y="340" width="142" height="16"/>
|
||||
<rect key="frame" x="112" y="366" width="139" height="14"/>
|
||||
<buttonCell key="cell" type="check" title="Rename chapters titles" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="yFm-Nq-s66" userLabel="Prettify audio track names">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -556,7 +550,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="08Q-2k-0Gb">
|
||||
<rect key="frame" x="187" y="469" width="70" height="17"/>
|
||||
<rect key="frame" x="187" y="495" width="90" height="20"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -587,7 +581,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button toolTip="Set the color space of video tracks to the selected one" verticalHuggingPriority="755" translatesAutoresizingMaskIntoConstraints="NO" id="Pdq-s0-erT">
|
||||
<rect key="frame" x="111" y="205" width="115" height="16"/>
|
||||
<rect key="frame" x="112" y="221" width="112" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -601,7 +595,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="2Hf-2V-95U">
|
||||
<rect key="frame" x="126" y="187" width="76" height="14"/>
|
||||
<rect key="frame" x="126" y="201" 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"/>
|
||||
@@ -612,7 +606,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="s2g-Iz-52P">
|
||||
<rect key="frame" x="209" y="185" width="150" height="18"/>
|
||||
<rect key="frame" x="209" y="198" width="150" height="20"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" title="Implicit" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="psY-0V-t0k" id="QT5-Bh-4Hc">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -641,7 +635,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button toolTip="Search metadata online" verticalHuggingPriority="759" translatesAutoresizingMaskIntoConstraints="NO" id="s8r-Cf-VfB">
|
||||
<rect key="frame" x="111" y="587" width="103" height="16"/>
|
||||
<rect key="frame" x="112" y="633" width="100" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -655,7 +649,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="zVi-vU-sh2">
|
||||
<rect key="frame" x="111" y="69" width="145" height="16"/>
|
||||
<rect key="frame" x="112" y="70" width="142" height="14"/>
|
||||
<buttonCell key="cell" type="check" title="Send to AppleTV/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="label" size="11"/>
|
||||
@@ -669,7 +663,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="k33-Yf-DbF">
|
||||
<rect key="frame" x="263" y="469" width="73" height="17"/>
|
||||
<rect key="frame" x="283" y="495" width="92" height="20"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" title="Standard" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" selectedItem="goC-ck-how" id="obA-0k-yqE">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -694,7 +688,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="FJc-Hc-zCR">
|
||||
<rect key="frame" x="126" y="225" width="63" height="14"/>
|
||||
<rect key="frame" x="126" y="242" width="63" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Language:" id="E4E-3v-z24">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -705,7 +699,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YJ5-of-VuU">
|
||||
<rect key="frame" x="196" y="223" width="111" height="17"/>
|
||||
<rect key="frame" x="196" y="239" width="111" height="20"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="muE-Km-mrP">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -733,7 +727,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Hjl-i0-gFW">
|
||||
<rect key="frame" x="111" y="166" width="124" height="16"/>
|
||||
<rect key="frame" x="112" y="179" width="121" height="14"/>
|
||||
<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="label" size="11"/>
|
||||
@@ -743,7 +737,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KWg-Ak-bB6">
|
||||
<rect key="frame" x="195" y="107" width="130" height="17"/>
|
||||
<rect key="frame" x="195" y="108" width="130" height="20"/>
|
||||
<popUpButtonCell key="cell" type="roundRect" title="mp4" bezelStyle="roundedRect" imagePosition="left" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" tag="10" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="iXb-rA-1f3" id="Tgc-fW-mN5">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="label" size="11"/>
|
||||
@@ -763,7 +757,7 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="muY-E0-hVI">
|
||||
<rect key="frame" x="129" y="109" width="59" height="14"/>
|
||||
<rect key="frame" x="129" y="111" width="59" 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"/>
|
||||
@@ -790,10 +784,12 @@
|
||||
<constraint firstItem="zEH-aV-Tl7" firstAttribute="top" secondItem="KWg-Ak-bB6" secondAttribute="bottom" constant="5" id="G6e-3t-3Qo"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ccd-Xn-Dj3" secondAttribute="trailing" constant="20" symbolic="YES" id="GMb-eq-e9x"/>
|
||||
<constraint firstItem="Ce4-O7-Iu4" firstAttribute="top" secondItem="tLh-V3-OfB" secondAttribute="bottom" constant="4" id="GZU-yB-OvD"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="81E-pQ-vyQ" secondAttribute="trailing" constant="20" symbolic="YES" id="HI8-BQ-BTo"/>
|
||||
<constraint firstItem="swT-iM-shZ" firstAttribute="leading" secondItem="slL-2h-MPl" secondAttribute="leading" constant="16" id="IET-Co-LEB"/>
|
||||
<constraint firstItem="DVM-Js-DwK" firstAttribute="baseline" secondItem="NhN-Lg-awX" secondAttribute="baseline" id="IIu-ZN-CEa"/>
|
||||
<constraint firstItem="ztL-LO-XhV" firstAttribute="leading" secondItem="ntU-85-AaJ" secondAttribute="trailing" constant="9" id="K3L-f4-IZc"/>
|
||||
<constraint firstItem="Hjl-i0-gFW" firstAttribute="top" secondItem="s2g-Iz-52P" secondAttribute="bottom" constant="5" id="KsR-cp-dYg"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="etc-K7-Atw" secondAttribute="trailing" constant="20" symbolic="YES" id="LBm-Pp-APA"/>
|
||||
<constraint firstItem="tLh-V3-OfB" firstAttribute="leading" secondItem="bDo-OD-bck" secondAttribute="trailing" constant="8" symbolic="YES" id="LkT-ae-DtF"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="9GN-f6-r2j" secondAttribute="trailing" constant="20" symbolic="YES" id="MDf-Y0-K0I"/>
|
||||
<constraint firstItem="FJc-Hc-zCR" firstAttribute="leading" secondItem="LiA-V6-VEx" secondAttribute="leading" constant="16" id="MQ9-dx-nHh"/>
|
||||
@@ -821,7 +817,6 @@
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="s2g-Iz-52P" secondAttribute="trailing" constant="20" symbolic="YES" id="X1t-8Y-baf"/>
|
||||
<constraint firstItem="TV6-Sk-Bqr" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="trailing" constant="7" id="X37-Ek-Obs"/>
|
||||
<constraint firstItem="DVM-Js-DwK" firstAttribute="top" secondItem="Hjl-i0-gFW" secondAttribute="bottom" constant="3" id="X54-PH-kRj"/>
|
||||
<constraint firstItem="etc-K7-Atw" firstAttribute="trailing" secondItem="0qr-Nt-Pan" secondAttribute="trailing" id="XT5-Su-3cJ"/>
|
||||
<constraint firstItem="eTL-yP-QQ5" firstAttribute="leading" secondItem="s8r-Cf-VfB" secondAttribute="leading" constant="16" id="Z6O-Is-xJw"/>
|
||||
<constraint firstItem="k33-Yf-DbF" firstAttribute="leading" secondItem="08Q-2k-0Gb" secondAttribute="trailing" constant="6" id="aBD-L7-WLH"/>
|
||||
<constraint firstItem="MGZ-hB-jhx" firstAttribute="leading" secondItem="Uoo-hZ-D1f" secondAttribute="trailing" constant="8" symbolic="YES" id="bZX-aT-V7w"/>
|
||||
@@ -840,9 +835,11 @@
|
||||
<constraint firstItem="22k-mA-HyA" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="trailing" constant="7" id="gf1-Gn-HmD"/>
|
||||
<constraint firstItem="ZVm-yi-3cE" firstAttribute="top" secondItem="s8r-Cf-VfB" secondAttribute="bottom" constant="8" symbolic="YES" id="guH-Zh-HOj"/>
|
||||
<constraint firstItem="9GN-f6-r2j" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="trailing" constant="7" id="h8R-Ut-8qp"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="TV6-Sk-Bqr" secondAttribute="trailing" constant="20" symbolic="YES" id="hcL-c5-CaR"/>
|
||||
<constraint firstItem="08Q-2k-0Gb" firstAttribute="leading" secondItem="Ns9-7q-hsh" secondAttribute="trailing" constant="9" id="iQj-1h-1cO"/>
|
||||
<constraint firstItem="2Hf-2V-95U" firstAttribute="baseline" secondItem="s2g-Iz-52P" secondAttribute="baseline" id="iuc-CH-gRQ"/>
|
||||
<constraint firstItem="86l-GG-SpO" firstAttribute="leading" secondItem="vJ5-JB-k1m" secondAttribute="trailing" constant="9" id="jVT-Dw-cxd"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="k33-Yf-DbF" secondAttribute="trailing" constant="20" symbolic="YES" id="kql-Sm-3Q6"/>
|
||||
<constraint firstItem="S7L-mA-j3Y" firstAttribute="baseline" secondItem="9GN-f6-r2j" secondAttribute="baseline" id="lQw-5e-sOv"/>
|
||||
<constraint firstItem="etc-K7-Atw" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="trailing" constant="7" id="lRh-Vo-1XH"/>
|
||||
<constraint firstItem="KWg-Ak-bB6" firstAttribute="firstBaseline" secondItem="muY-E0-hVI" secondAttribute="firstBaseline" id="lu4-VE-F0x"/>
|
||||
@@ -854,6 +851,7 @@
|
||||
<constraint firstItem="5rh-cM-iOg" firstAttribute="top" secondItem="ZVm-yi-3cE" secondAttribute="bottom" constant="4" id="o3T-cH-W5B"/>
|
||||
<constraint firstItem="5rh-cM-iOg" firstAttribute="leading" secondItem="73q-gi-fe2" secondAttribute="trailing" constant="9" id="oAW-Hc-PIL"/>
|
||||
<constraint firstItem="s8r-Cf-VfB" firstAttribute="leading" secondItem="9GN-f6-r2j" secondAttribute="leading" id="oUh-bK-O8z"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="0qr-Nt-Pan" secondAttribute="trailing" constant="20" symbolic="YES" id="p6g-Q8-2JO"/>
|
||||
<constraint firstItem="S7L-mA-j3Y" firstAttribute="top" secondItem="UlG-O3-eNc" secondAttribute="top" constant="20" id="qfC-zl-k6y"/>
|
||||
<constraint firstItem="tLh-V3-OfB" firstAttribute="top" secondItem="5rh-cM-iOg" secondAttribute="bottom" constant="10" id="qgN-Bo-MoW"/>
|
||||
<constraint firstItem="YJ5-of-VuU" firstAttribute="leading" secondItem="FJc-Hc-zCR" secondAttribute="trailing" constant="9" id="s62-9o-HgE"/>
|
||||
@@ -870,7 +868,7 @@
|
||||
<constraint firstItem="MGZ-hB-jhx" firstAttribute="top" secondItem="zVi-vU-sh2" secondAttribute="bottom" constant="16" id="zMD-eX-e2y"/>
|
||||
<constraint firstItem="MGZ-hB-jhx" firstAttribute="leading" secondItem="yI9-2a-q2a" secondAttribute="leading" id="zpo-Kd-EaI"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-1040" y="-23"/>
|
||||
<point key="canvasLocation" x="-1250" y="-137"/>
|
||||
</customView>
|
||||
<arrayController objectClassName="Preset" automaticallyPreparesContent="YES" id="vyv-na-Xpo" userLabel="Set Controller">
|
||||
<declaredKeys>
|
||||
|
||||
+245
@@ -0,0 +1,245 @@
|
||||
# CHANGES — SublerMKV fork
|
||||
|
||||
Executive summary of everything this fork adds or changes relative to the
|
||||
original Subler checkout.
|
||||
|
||||
- **Baseline**: upstream commit `0c3d7de` (2026-10-20, "Fix wobbling preference
|
||||
panels switch animation caused by macOS 27.2") — the last commit inherited
|
||||
from the GitHub Subler project.
|
||||
- **Since then**: 18 commits in the app repository and 15 in the
|
||||
**MP42Foundation** submodule (2026-11-25 → 2026-11-28).
|
||||
- **Fork identity**: version `1.9.5mkv1` (upstream base + `mkv` + a fork
|
||||
change counter), builds as `SublerMKV.app` (`org.galad.SublerMKV`);
|
||||
development moved from GitHub to Gitea (`git.technomancer.com:Scott-Files/`).
|
||||
|
||||
## Executive summary
|
||||
|
||||
Two headline capabilities, plus the packaging to support them:
|
||||
|
||||
1. **Matroska files can now be opened and edited in place.** Subler previously
|
||||
forced `.mkv`/`.mka`/`.mks` through a convert-to-MP4 import. The fork opens
|
||||
them directly as documents: metadata, cover art, track fields, chapters,
|
||||
subtitle-track additions, and track deletions all save back *as Matroska*,
|
||||
without a lossy transcode and without ever writing QuickTime atoms over an
|
||||
MKV.
|
||||
2. **A complete BLU-RAY PGS subtitle pipeline.** Raw `.sup` PGS files import
|
||||
natively; PGS tracks inside MKVs convert to VobSub (`subp`) at the stream's
|
||||
**own resolution** (e.g. 1920x1080, not the old forced 720x480 DVD frame);
|
||||
and subtitle filenames are recognized for language and type flags (SDH,
|
||||
forced, commentary, …) the way mkvmerge does it.
|
||||
|
||||
Supporting work: direct metadata lookups from IDs embedded in filenames, the
|
||||
project + submodules re-hosted on Gitea, the Sparkle auto-updater removed, and
|
||||
two command-line helpers (`extractsubs`, `sup2vob`) now built and shipped
|
||||
inside the app bundle so they never drift from the app's own code.
|
||||
|
||||
## 1. Matroska in-place editing
|
||||
|
||||
*App: `eb386a5`, `3302367`, `8520d72`, `f457b4e`, `06ecb0a` — Framework: `1040f47`, `8ba3f25`, `0cf79ec`, `10dcee3`, `e8231de`*
|
||||
|
||||
- **Direct open**: `.mkv/.mka/.mks` open into a tags-only `MP42File` model
|
||||
instead of the convert-import sheet. MP4-only properties stay read-only;
|
||||
the four fields Matroska actually stores per track — **name, language,
|
||||
enabled, subtitle-forced** — are editable, along with all metadata and
|
||||
cover art.
|
||||
- **Two save engines** (in MP42Foundation), chosen automatically:
|
||||
- `MP42MkvTagWriter` — mkvpropedit-style **in-place** rewrite of the `Tags`
|
||||
element, cover-art attachment, and per-track fields. Reuses the old extent
|
||||
+ Void padding when the payload fits; otherwise rebuilds the file tail
|
||||
with recomputed SeekHead/Cues positions (temp file + atomic replace).
|
||||
Untouched tracks diff to **byte-for-byte no-ops**; foreign tag groups,
|
||||
unknown TrackEntry children, and non-cover attachments are preserved
|
||||
verbatim; a size+mtime staleness guard refuses writes on changed files.
|
||||
- `MP42MkvRemuxer` — stream-copy **rebuild** used when the structure must
|
||||
change: deleted tracks, added subtitle tracks, chapter edits, Save-As, or
|
||||
File ▸ Optimize. Every block is copied bit-for-bit (blocks of removed
|
||||
tracks dropped by unmarked-vint track number), clusters are header-only
|
||||
scanned, SeekHead positions are patched at the end, Cues are regenerated
|
||||
only when the source had them, and `Info/Duration` is recomputed from
|
||||
written block extents.
|
||||
- **Track management**: real tracks can be deleted (pairing TrackEntry ↔ model
|
||||
by object identity, immune to index shifts); `.srt`/`.ssa`/`.ass` subtitle
|
||||
tracks can be **added** (re-parsed from source at save time, written as
|
||||
`S_TEXT/UTF8` with proper `BlockGroup` framing and synthesized clusters
|
||||
when timestamps demand it). Reordering stays blocked on MKV to protect the
|
||||
pairing; destinations must remain mkv/mka/mks.
|
||||
- **Chapters are first-class**: editable rows, `.txt` (mp4chaps) import to
|
||||
bootstrap chapters on a chapter-less file, `.csv` update, single-chapter
|
||||
insertion (timestamped 1 s past the latest start, clamped), bulk "insert
|
||||
every N", deletion of the whole chapter track (removes the `Chapters`
|
||||
element). Chapter changes ride the remuxer (detected via a model snapshot),
|
||||
and chapter **language round-trips** at track level. TagsOnly mode mirrors
|
||||
the file's chapter atoms verbatim — no MP4-path normalization — so an
|
||||
untouched save never shifts or drops atoms.
|
||||
- **AppleScript**: `save as` routes Matroska documents through the proper
|
||||
Matroska save path (the raw MP4 writer would corrupt them); direct file
|
||||
import mirrors the panel's extension dispatch; PGS/MKV naming conventions
|
||||
respected without MP4-only model reshuffling.
|
||||
- **Queue parity**: batched MKVs are retagged **in place** instead of being
|
||||
converted to MP4. The window's whole save branching moved into a shared
|
||||
`MatroskaSaver` (baseline snapshots + tag-writer-vs-remuxer choice) used
|
||||
by both `Document` and `QueueItem`: queue items import tags-only, keep the
|
||||
mkv/mka/mks extension (in place, or stream-copy into a destination folder),
|
||||
and remux only when an edit demands it (found `.srt/.ass/.ssa` additions,
|
||||
renamed chapters, optimize, renamed output). MP4-only queue actions
|
||||
(organize groups, fix fallbacks, color space, atom optimize) no-op on MKV;
|
||||
send-to-queue from a window hands the item the document's model *and*
|
||||
pairing baseline; editing a queued MKV opens a real MKV document.
|
||||
- **Spec traps handled** (all verified against mkvtoolnix-written files):
|
||||
correct `Language`/`LanguageIETF`/`TrackFlagEnabled` element ids,
|
||||
`ChapterAtom = 0xB6`, chapter timecodes in absolute nanoseconds, mandatory
|
||||
`ChapterUID`/`EditionUID` derived deterministically from content, and
|
||||
community-style SimpleTags (`RATING`, `CONTENTRATING`, `MEDIAKIND`, `HD`,
|
||||
`CAST`, `NETWORK`, `EPISODEID`) so Movie-tab fields with no Matroska-spec
|
||||
tag still round-trip.
|
||||
|
||||
## 2. Subtitle pipeline
|
||||
|
||||
*App: `5d6c0cd`, `dd956fa`, `87e0c82`, `401584a` — Framework: `e02f60b`, `5777208`, `837aa1c`, `30dd96f`, `e7c7b80`, `e428558`*
|
||||
|
||||
- **BLU-RAY PGS `.sup` import**: `MP42VobSubImporter` claims `.sup` directly,
|
||||
converting via **sup2vob** — the upstream Swift sources vendored into
|
||||
MP42Foundation (`MP42/Sup2Vob/`) with only the CLI globals and facade
|
||||
adapted, so upstream fixes re-merge cleanly. Result: a real VobSub track
|
||||
(muxable into MP4 as `subp`, or tx3g-convertible), language taken from the
|
||||
filename, track URL kept on the user's `.sup`.
|
||||
- **PGS inside MKV → VobSub**: the import sheet offers a VobSub conversion
|
||||
action for PGS-format tracks. Requires rebuilding the `.sup` stream from
|
||||
mkvmerge's stripped-envelope, zlib-compressed blocks (reconstructing the
|
||||
13-byte `PG` segment framing byte-identically to mkvextract) before the
|
||||
same sup2vob machinery runs.
|
||||
- **Full source resolution**: the conversion always runs sup2vob's `--full`
|
||||
passthrough — frames keep the PGS's own PCS canvas (typically 1920x1080)
|
||||
instead of being downscaled to the 720x480/576 DVD frame the old code
|
||||
forced. Verified end-to-end: framework output is **byte-identical** to
|
||||
`sup2vob --full`, and ffprobe reports `dvd_subtitle 1920x1080` on muxed
|
||||
output from both the `.sup` and the MKV path.
|
||||
- **VobSub frame sizes honored**: `.sub`/`.idx` additions now mux at the
|
||||
frame size declared in the idx rather than a default.
|
||||
- **Filename intelligence** (mkvmerge-style, right-to-left token scan):
|
||||
ISO 639-2/B and B-code language tags (`pt-BR` extended tags survive), and
|
||||
community type tokens (`sdh`, `cc`, `commentary`, `forced`, `lyrics`,
|
||||
deaf/hearing-impaired variants) — any flagged track is named **SDH**, the
|
||||
one recognizable convention players show, which then picks up media
|
||||
characteristics automatically. MKV track names run through the same
|
||||
recognizer on the conversion path (track name, falling back to the MKV's
|
||||
own filename).
|
||||
- **Bug fix**: SSA files without a `[V4+ Styles]` section no longer fail to
|
||||
parse.
|
||||
|
||||
## 3. Metadata
|
||||
|
||||
*App: `f20ad7e`*
|
||||
|
||||
- **Direct metadata lookup from filename IDs**: names like
|
||||
`Movie (2024) {tmdb-1015812}` or embedded IMDb/TVDB IDs are parsed
|
||||
(ParseFilename now handles parenthesized years and brace-wrapped service
|
||||
IDs, IMDb IDs widened to 7–9 digits) and emitted as `id:<kind>:<value>`.
|
||||
The search sheet, the queue metadata action, and the AppleScript
|
||||
fetch-metadata command try the direct TMDb lookup first and fall back to
|
||||
title search when the ID is unknown or unsupported.
|
||||
|
||||
## 4. Fork infrastructure and distribution
|
||||
|
||||
*App: `0f8d251`, `628ccfe`, `20438f3`, `475737a`, `e96773f` — Framework: `79c251c`, `7ff1ed4`, `a287ea6`*
|
||||
|
||||
- **Gitea migration**: project, README clone URLs, and the `contrib`
|
||||
submodule all moved from GitHub to Gitea (SSH for development, public
|
||||
HTTPS URLs in the README/submodule config).
|
||||
- **Sparkle removed**: the auto-updater integration (framework, updater menu
|
||||
item, feed URL/public key, SPM package reference) is gone — this fork
|
||||
updates itself however its users choose.
|
||||
- **Fork version scheme `<upstream>.mkv<N>`** distinguishes fork builds from
|
||||
upstream without touching the forked-from version: the trailing counter in
|
||||
`MARKETING_VERSION`/`CURRENT_PROJECT_VERSION` (currently `1.9.5mkv1`)
|
||||
increments with each batch of fork changes, and restarts at 1 whenever
|
||||
upstream's base version moves.
|
||||
- **Build output renamed `SublerMKV.app`**: target renamed and `PRODUCT_NAME`
|
||||
set to `SublerMKV`; the interpolated bundle id becomes
|
||||
`org.galad.SublerMKV`, so fork builds are fully independent of an installed
|
||||
upstream `Subler.app` — own preferences (API tokens re-entered once), own
|
||||
queue defaults, and its own LaunchServices registration instead of two
|
||||
same-idded apps competing to open files.
|
||||
- **Own storage folder**: all App Support data moved from
|
||||
`Application Support/Subler/` to `Application Support/SublerMKV/` — the
|
||||
queue (renamed `queue.sbmkvqueue`), presets, downloaded OCR tessdata, and
|
||||
the debug log — so both apps can run without sharing any file.
|
||||
`Queue.saveToDisk` also gained the missing parent-directory creation the
|
||||
old (always-existing) folder had masked; without it the atomic write error
|
||||
is swallowed and the queue silently never persists.
|
||||
- **Spec trap found**: the Swift **module name** feeds every class's
|
||||
ObjC-runtime registration (`Subler.LanguageTransformer`), and XIB binding
|
||||
value-transformers reference that exact name — renaming the product alone
|
||||
made the queue-options nib throw `Cannot find value transformer` mid-load
|
||||
(dead popups, frozen checkboxes). `PRODUCT_MODULE_NAME = Subler` pins the
|
||||
module whatever the product is called; no XIB edits.
|
||||
- **Xcode 27.2 project migration** for both the app and the framework.
|
||||
|
||||
## 5. Command-line tools shipped in the app bundle
|
||||
|
||||
*App: `c08d607`, `5111294`, `56d843c` — Framework: `72e879e`*
|
||||
|
||||
- **`extractsubs`** bundles into `Contents/Resources/`: extracts subtitle
|
||||
tracks from mkv/mp4 files via ffmpeg stream copy, named
|
||||
`<input>.<track>[.<type>].<lang>.<ext>` — exactly the shape Subler's
|
||||
filename recognizer probes, so results drag straight back into the app —
|
||||
and runs `sup2vob --full` on extracted PGS. Defaults to English tracks
|
||||
(`--all` for everything); up-front dependency checks with clear messages;
|
||||
single-invocation extraction with per-track retry; a mkvmerge/mkvextract
|
||||
rescue path for `S_TEXT/WEBVTT` tracks ffmpeg cannot read.
|
||||
- **`sup2vob` slim CLI** (`MP42Foundation/sup2vob/`): only `main.swift` + a
|
||||
Makefile — it compiles the framework's own `MP42/Sup2Vob/` sources, so CLI
|
||||
and app conversion code can never drift, and the CLI doubles as the
|
||||
byte-identity oracle for the framework converter.
|
||||
- **Built into the app**: the Subler build runs that Makefile (incremental)
|
||||
and installs the binary at `Contents/MacOS/sup2vob`, so building Subler
|
||||
refreshes the CLI, and the bundled `extractsubs` finds it as a bundle
|
||||
sibling — the shipped pair needs no install beyond ffmpeg/ffprobe.
|
||||
|
||||
## Appendix — commit index
|
||||
|
||||
### SublerMKV (app), since `0c3d7de`
|
||||
|
||||
| Commit | Subject |
|
||||
|---|---|
|
||||
| `eb386a5` | Open and edit Matroska files in place, including track removal |
|
||||
| `3302367` | Add subtitle tracks to open Matroska documents |
|
||||
| `8520d72` | Edit and add chapters in Matroska documents |
|
||||
| `f457b4e` | Make chapter tracks deletable, insertable, and language-editable |
|
||||
| `06ecb0a` | Route AppleScript chapter imports and make File > Optimize work on MKV |
|
||||
| `401584a` | Mux added VobSub tracks at the frame size declared in the idx |
|
||||
| `f20ad7e` | Search metadata directly from IDs embedded in file names |
|
||||
| `0f8d251` | Point the project at Gitea and document the fork |
|
||||
| `628ccfe` | Use the gitea SSH login in clone URLs |
|
||||
| `20438f3` | Pull the contrib dependency from Gitea too |
|
||||
| `475737a` | Drop the Sparkle updater and stamp the fork version 1.9.5mkv |
|
||||
| `e96773f` | Point the submodule and README at the public HTTPS URLs |
|
||||
| `5d6c0cd` | Add PGS .sup subtitle import and filename flag recognition |
|
||||
| `dd956fa` | Offer VobSub conversion for PGS subtitle tracks |
|
||||
| `87e0c82` | Document the sup2vob full-frame passthrough for PGS conversions |
|
||||
| `c08d607` | Ship the extractsubs subtitle-extraction helper with the app |
|
||||
| `56d843c` | Document the slim sup2vob CLI in the submodule |
|
||||
| `5111294` | Build sup2vob into the app bundle so it ships and stays fresh |
|
||||
|
||||
### MP42Foundation (submodule), same period
|
||||
|
||||
| Commit | Subject |
|
||||
|---|---|
|
||||
| `1040f47` | Add Matroska tagging and track-removal support |
|
||||
| `e428558` | Fix SSA header parsing for files without a [V4+ Styles] section |
|
||||
| `8ba3f25` | Write added subtitle tracks during Matroska remux |
|
||||
| `0cf79ec` | Rebuild Matroska chapters on remux and recompute Info Duration |
|
||||
| `10dcee3` | Round trip the chapter language between model and Matroska |
|
||||
| `e8231de` | Mirror the file's chapter atoms verbatim in tagsOnly mode |
|
||||
| `e7c7b80` | Mux VobSub subpic tracks at the frame size declared by the idx |
|
||||
| `79c251c` | Move the contrib submodule to Gitea |
|
||||
| `a287ea6` | Adopt Xcode 27.2 project migration |
|
||||
| `7ff1ed4` | Serve the contrib submodule URL over HTTPS |
|
||||
| `30dd96f` | Recognize subtitle language and type tokens in filenames |
|
||||
| `e02f60b` | Import BLU-RAY PGS .sup files via vendored sup2vob |
|
||||
| `5777208` | Convert Matroska PGS tracks to VobSub and name flagged tracks SDH |
|
||||
| `837aa1c` | Keep the PGS source resolution through the sup2vob conversion |
|
||||
| `72e879e` | Add a slim sup2vob CLI built from the vendored Sup2Vob sources |
|
||||
|
||||
*(The submodule's pre-fork history was re-hosted on Gitea, so its commits are
|
||||
listed by date range rather than as a range from the base checkout.)*
|
||||
@@ -0,0 +1,69 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
Subler is a macOS AppKit application for muxing and tagging MP4/M4V/M4A files: it demuxes video/audio/subtitle/chapter tracks from mov, mp4, mkv, and raw formats, muxes them into QuickTime-compatible MP4 files (including Apple-compatible tx3g subtitle tracks), and edits metadata with lookups against TMDb, TVDB, and the iTunes Store.
|
||||
|
||||
- App layer (`Classes/`) is pure Swift 5; the app has no storyboards — UI is XIB-based AppKit (`MainMenu.xib` plus per-controller `.xib`/`.strings`).
|
||||
- All container-level demux/mux/encode work lives in the **MP42Foundation** git submodule (Objective-C/Objective-C++), built as a framework.
|
||||
- Single app target (named `SublerMKV`, builds `SublerMKV.app` via `PRODUCT_NAME`; legacy productName "MP4Sub"; bundle id `org.galad.SublerMKV`, so fork builds keep their own prefs/LaunchServices registration apart from an installed upstream `org.galad.Subler`). `PRODUCT_MODULE_NAME = Subler` deliberately **pins the Swift module to the original name**: XIB binding value-transformers reference Swift classes module-qualified (`Subler.LanguageTransformer`), and Swift registers runtime names by module — letting the module follow the product made the QueueOptions nib throw `Cannot find value transformer with name "Subler.LanguageTransformer"` mid-binding-load (queue-settings checkboxes/popups dead, frozen at design-time state), so any product rename must keep this setting fixed), deployment target `$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)` (upstream was 10.13). No external package dependencies: the fork removed the Sparkle auto-update integration (updater menu item, `SPUStandardUpdaterController` in MainMenu.xib, `SUFeedURL`/`SUPublicEDKey` in Info.plist, the SPM package reference in the pbxproj).
|
||||
|
||||
## Build
|
||||
|
||||
The MP42Foundation submodule must be initialized or the app will not compile:
|
||||
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Build with Xcode (Subler scheme) or CLI:
|
||||
|
||||
```
|
||||
xcodebuild -project Subler.xcodeproj -scheme Subler -configuration Debug build
|
||||
```
|
||||
|
||||
No deployment-target override is needed: the projects moved from upstream's 10.13 to `$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)` (recent toolchains refuse 10.13).
|
||||
|
||||
There is **no test target and no CI** — changes are verified by building and running the app manually. Of the `Utilities/` tools, MP4Dump (legacy ObjC debugging) is not part of the app build, but `ParseFilename/` **is** — it's copied into the app bundle and executed at runtime by `MetadataHelper.parseFilename` via `Process`. `extractsubs` is also copied into the bundle (Resources phase → `Contents/Resources/extractsubs`, exec bit preserved by the copy) but **nothing in the app invokes it** — it's a user-facing CLI helper shipped with the app: it extracts subtitle tracks from mkv/mp4 files via ffmpeg stream copy (named `<input>.<track>[.<type>].<lang>.<ext>` — the shape `getFilenameLanguage`/`getFilenameSubtitlesTrackName` probe, so results drag straight back in) and runs `sup2vob --full` on extracted PGS `.sup` files. It needs ffprobe/ffmpeg on PATH; sup2vob comes from PATH **or from the bundle next to the script** (`Contents/MacOS/sup2vob`, built by the app — see the submodule section), so the bundled pair needs no install. mkvtoolnix and python3 are only needed for its `S_TEXT/WEBVTT` rescue path, and it skips extraction with a clear message rather than failing per-track mid-pipeline.
|
||||
|
||||
## Architecture
|
||||
|
||||
Two layers with a strict boundary:
|
||||
|
||||
### 1. App layer (`Classes/`, Swift)
|
||||
|
||||
- **Document flow**: `Document.swift` (NSDocument subclass) owns the opened file; `read(from:)` produces an `MP42File`. `DocumentWindowController` hosts the per-document window (tracks table, property view tabs). Export goes through `Document.save(to:...)` / `SaveOptions` and runs asynchronously; `sendToQueue` hands the document to the queue instead.
|
||||
- **MKV tags-only mode**: `.mkv/.mka/.mks` open directly (`DocumentController.openDocument` in `AppDelegate.swift` passes them through instead of forcing the convert-import sheet). `Document.isMatroska` then drives everything: the model is an in-memory `MP42File` filled from `MP42FileImporter` in **tagsOnly mode** (`initWithURL:tagsOnly:` — mirrors the file's own `TrackFlagEnabled` instead of the MP4 "first-of-type enabled" heuristic, so untouched tracks don't look edited), The save branching lives in **`MatroskaSaver`** (`Classes/MatroskaSaver.swift`, shared by `Document.writeMatroska` and `QueueItem` so a queued MKV saves exactly like the window): plain edits rewrite metadata + per-track fields in place via `MP42MkvTagWriter` (never touching clusters), while **deleted/added tracks, chapter edits, a forced rebuild (optimize/Save-As) or a destination different from the source** trigger the stream-copy rebuild via `MP42MkvRemuxer` (temp file + atomic rename even in place; destination must stay mkv/mka/mks — validated in `MatroskaSaver.save`). `MatroskaSaver.buildModel(from:)` is the shared tags-only model builder (conversion settings for un-muxable codecs to satisfy `addTrack:`, 1-based display trackIds; the caller wires `undo` afterwards so read opens no undo groups). MKV documents' `sendToQueue` skips the save panel and queues an in-place retag item carrying the document's model *and* its `MatroskaSaver` (`attachMatroskaSaver:` — the pairing is object identity and cannot be rebuilt from a bare model); the AppleScript send-to-queue does the same but keeps the script's destination URL (validated Matroska at save time). The remuxer pairs `TrackEntry` elements against the `MatroskaSaver`'s importer-order snapshot (built in `readMatroska`) with keep/drop decided by **object identity**, so the deletion check is immune to model index shifts; after a successful remux the snapshot is re-filtered in the same order **plus the added tracks appended** (matching the order the remuxer writes their TrackEntry elements last in the output). Subtitle tracks can be **added** to MKV docs (`.srt`/`.ssa`/`.ass` only): `DocumentWindowController.selectFile`/`showImportSheet` route MKV docs to `importSubtitleTracksForMatroska` (direct `MP42FileImporter` per file, no track-selection sheet; the accepted-extension list `matroskaSubtitleExtensions` must stay in sync with the remuxer's gate), and the `didSelect`/AppleScript `importFilesDirectly` path skips `organizeAlternateGroups`/`inferMediaCharacteristics` for MKV for the same pairing-protection reason. The AppleScript `save as` command (ScriptCommand.swift) must route Matroska docs through `Document.save(...)` — the raw `mp4.write(to:)` path would mux QuickTime atoms over an MKV document. Reordering must never happen on MKV docs (it would break the pairing): drag stays blocked and `DocumentWindowController.delete(tracks:)` skips `organizeAlternateGroups`/`inferMediaCharacteristics` for MKV. Save-As is enabled for MKV, and so is **File ▸ Optimize** (`saveAndOptimize`): on Matroska documents optimize means `writeMatroska`'s forced structural branch — a full remuxer rebuild of the file from the existing tracks (the container-equivalent of QuickTime atom-ordering), not `MP42File optimize`. Its validation precondition is `fileURL != nil` on MKV, because tags-only models answer `hasFileRepresentation == false` (their tracks are never muxed) and would otherwise keep the menu disabled forever. NSDocument Duplicate needs no MKV gate because **no nib wires `duplicateDocument:`** — that menu item doesn't exist for any container. Track **reorder and MP4-only properties stay gated** (`PropertyView.isReadOnly` disables the tabs; metadata tabs stay editable; adding stays restricted to the subtitle files and chapter txt/csv described here), but real tracks **and the chapter pseudo-track** can be **deleted** (deleting the chapter track empties the model, so the save remuxes and removes the `Chapters` element — same as emptying the Chapters tab), and the four fields Matroska actually stores per track are editable and saved — name, language, enabled, subtitle forced. UI split: `TracksViewController.isReadOnly` gates drag/reorder while `isFieldEditable(_:)` re-enables the name/language/enabled cells on real (non-chapter) rows; `PropertyView.allowsTrackEditing` lets `VideoViewController` re-enable just the subtitle forced popup (Never/All only — the per-sample "Any samples" option has no Matroska equivalent).Chapters are **editable** on MKV docs (`didSelect` exempts `ChapterViewController` from the read-only blanket alongside `MovieViewController`) and chapter-less docs can **gain chapters** via `.txt` import (OGG/mp4chaps format → `addChapters`, which replaces the model's chapter track since `MP42File addTrack:` replaces previous chapter tracks) or update an existing track via `.csv` (`updateChapters`) — routed from `selectFile`'s MKV branch, drag-drop, and the AppleScript `impLine truncated
|
||||
- **Queue engine**: `QueueController` (window UI) → `Queue` (serial `DispatchQueue` worker, persists `[QueueItem]` to disk via `NSKeyedArchiver` at `Application Support/SublerMKV/queue.sbmkvqueue` — the fork's storage folder, shared by presets/tessdata/logs; `saveToDisk` creates the folder, as the swallowed write error would otherwise mean silent non-persistence — holds IOKit sleep assertions while working) → `QueueItem` (imports a source file into an `MP42File`, then muxes to the destination) → `QueueAction` objects (`QueueActionProtocol`, `.pre`/`.post` types) apply individual transformations (set metadata, force subtitles, language fixes, etc.) to a queue item. Watch for `Queue.Working/Completed/Failed/Cancelled` notifications driving UI updates. **Matroska items match the window's save instead of converting**: `QueueItem.isMatroska` (derived from the source file's extension, never archived) makes `prepare()` do the tags-only import (`MatroskaSaver.buildModel`) and `process()` write back through the same `MatroskaSaver` — `QueueController.destination(for:)` keeps the mkv/mka/mks extension for it (the file itself, or the same name inside a queue destination folder → stream-copy remux there, the Save-As equivalent). On MKV items the queue's Optimize forces the remux rebuild (`QueueOptimizeAction` itself no-ops — `MP4Optimize` has nothing to reorder on a tags-only model), `QueueOrganizeGroupsAction`/`QueueFixFallbacksAction`/`QueueColorSpaceAction` no-op (MP4-only concepts; organize churn would corrupt the tag writer's positional TrackEntry diff), while `QueueSubtitlesAction`'s adjacent `.srt/.ass/.ssa` finds ride the remuxer as added tracks (it sets conversion settings to satisfy `addTrack:` like the window's MKV import path). Queue restores never carry the tags-only model (identity pairing can't be archived; the item re-imports and pre-actions re-run), and decoding normalizes legacy items' retired convert-to-mp4 destinations back to the source; editing an MKV item opens the source file as a real MKV document rather than wrapping the item's model.
|
||||
- **Import**: `FileImportController` wraps `MP42FileImporter` to let users pick which source tracks to import; `isTrackMuxable` / `trackNeedConversion` (in `Utilities.swift`) gate which tracks pass through vs. get converted. BLU-RAY PGS `.sup` files flow through this same machinery automatically (the open panel and drag-drop key off `MP42FileImporter.supportedFileFormats()/supportedContentTypes()`): they're produced by `MP42VobSubImporter`, which converts them to VobSub first — see the submodule section. They stay out of Matroska documents: `matroskaSubtitleExtensions` deliberately does not list `sup` (the remuxer only writes S_TEXT/UTF8 additions). All three subtitle importers (`MP42SrtImporter`/`MP42SSAImporter`/`MP42VobSubImporter`) take language from the filename via `getFilenameLanguage`, which scans separator-split tokens **right-to-left** (mkvmerge-style: 3-char tokens try ISO 639-2/T then the library's B codes `fre`/`ger`/`dut`/`chi`; the dash is deliberately not a separator, so `pt-BR` survives as one extended tag instead of its region half being misread as ISO 639-1 `br`=Breton); `und` when nothing decodes lets SRT/SSA fall back to `guessStringLanguage` and the sup path keep the converter's idx default. Community type tokens in the name (`sdh`/`hearing_impaired`/`impaired`/`deaf`, `cc`/`closed caption`, `commentary`/`commentaries`, `forced`, `lyrics`/`lyric`) make `getFilenameSubtitlesTrackName` name **any** flagged track `SDH` — one recognizable name serves users better than one name per type, and MP4 has no flag anyway, the name is the convention players show (the `SDH` name then picks up `transcribes-spoken-dialog`/`describes-music-and-sound` through `MP42File organizeMediaCharacteristicsForMediaType:`; the old per-type name→tag choreography like `forced-only` no longer fires from filenames — deliberate). The language deliberately stays out of the name since it rides its own element. MKV container tracks run through the same recognizer on the **conversion path** (`getSubtitleTypeTokenFromString` applied to the `TrackEntry Name` in `MP42MkvImporter`; a track without a TrackName inherits the token from the MKV's own filename — the decision keys on the TrackName element's presence, never the model name, because every track starts life with a default localized "<type> Track" name); tagsOnly mode is exempt — that model is the tag writer's diff baseline. MKV-added subtitle tracks carry the name via the remuxer's `Name` element.
|
||||
- **Metadata**: `Classes/MetadataImporters/` holds a `MetadataImporter` protocol with concrete importers (TheMovieDB, TheTVDB, iTunesStore, AppleTV, SquaredTVArt, chapter DBs). Note: the chapter-DB search (`DocumentWindowController.searchChapters`, which stays in the always-valid branch of `validateUserInterfaceItem`) is currently **orphaned** — no menu item, XIB connection or code path invokes it. Search results (`MetadataResult`/`MetadataResultMap`) are applied onto `MP42Metadata` via `MetadataSearchController`. API credentials are **compiled-in constants** in the service classes (TMDb `TheMovieDBService.key`, TVDB `TheTVDBService.apiKey`, SquaredTVArt's URL key), so they need no user setup and don't live in prefs; only the short-lived TVDB bearer-token session is cached in `UserDefaults` (`SBTheTVBDv4Token`, ~4 h validity) and re-fetched automatically on expiry. (`Token.swift` is unrelated — it's the filename-template tokenizer.)
|
||||
- **Presets**: `Preset` / `QueuePreset` / `MetadataPreset` + `PresetManager` — user-defined rule sets that auto-apply actions and metadata to queue items.
|
||||
- **Preferences**: `Prefs.swift` is the single source of truth for settings — nested enums of `@Stored` / `@StoredEnum` property-wrapped `UserDefaults` keys (defaults are auto-registered at startup). Add new settings here, not ad-hoc `UserDefaults` calls.
|
||||
- **AppleScript**: `Subler.sdef` defines the scripting dictionary; `ScriptCommand.swift` / `QueueScriptCommand.swift` implement the commands (e.g., "send to queue").
|
||||
- **Logging**: `Logger.shared` is the app-wide log sink; `ActivityWindowController` renders the log UI.
|
||||
|
||||
### 2. MP42Foundation (git submodule, own `MP42Foundation.xcodeproj`)
|
||||
|
||||
Referenced by the main project; `MP42Foundation.framework` is linked and copied into the app bundle. Imported throughout the app as `import MP42Foundation`. Key types: `MP42File` (in-memory MP4 model + muxing/writing), `MP42FileImporter` (demuxing mov/mp4/mkv/subtitle sources, FFmpeg-based), track classes (`MP42VideoTrack`, `MP42AudioTrack`, `MP42SubtitleTrack`, `MP42ChapterTrack`), `MP42Metadata` / `MP42MetadataItem`, `MP42AudioMixdown` / `MP42AudioConversionSettings`, `MP42Languages`.
|
||||
|
||||
The app never parses MP4/atom data directly — codec, container, and subtitle-conversion work belongs in the submodule, not in `Classes/`. `Classes/MP42FileAdditions.swift` extends framework types with app-level conveniences.
|
||||
|
||||
PGS `.sup` subtitle import: `MP42VobSubImporter` claims both `idx` and `sup`. A `.sup` is converted up-front to a private temp `.idx/.sub` pair via `MP42SupConverter` (the `@objc` façade over the sup2vob Swift sources vendored in `MP42/Sup2Vob/` from https://git.technomancer.com/Scott-Files/sup2vob — upstream logic is kept identical so upstream fixes re-merge cleanly; upstream's CLI-only globals and `main.swift` are the framework's only adaptations), then the existing VobSub machinery handles everything: the track comes out as `kMP42SubtitleCodecType_VobSub` (muxable straight into MP4 as `subp` via `MP4AddSubpicTrack`, or tx3g-convertible via `MP42BitmapSubConverter`), the frame size rides the idx `size:` line into `track.width/height`, language comes from the source filename (`getFilenameLanguage`, since PGS carries none — the generated idx `id:` is just "en"), and `track.URL` stays the user's `.sup`. The façade always runs upstream's `--full` mode (`fullFramePassthrough = true`, set in the adaptation layer `MP42SupConverter.swift`): frames keep the geometry the PGS itself defines — the idx size line is the **PCS canvas** (e.g. 1920x1080) and nothing is downscaled to the 720x480/576 DVD frame, which now only survives as fallback for a stream with no usable canvas (the framework's output is byte-identical to `sup2vob --full`). The temp pair is deleted in the importer's `dealloc` — safe because tracks hold the importer strongly through export. The ObjC→Swift hop uses the existing `MP42-Shared-Swift.h` shim (generated header), new Swift files must join both targets' Sources phases like `SampleDescription.swift`. The **same vendored sources** also build the CLI: `MP42Foundation/sup2vob/` holds only upstream's `main.swift` (adapted once: the two CLI globals `debugFrames`/`fullFramePassthrough` belong to the vendored `Convert.swift`, so main.swift drops its re-declaration) plus a `Makefile` compiling against `../MP42/Sup2Vob/` — one upstream merge updates app and CLI together, nothing can drift, and the CLI's `--full` output doubles as the byte-identical oracle for the framework converter. The Subler app build **invokes this same Makefile** (the "Build sup2vob CLI" run-script phase, `make -C MP42Foundation/sup2vob` — incremental, a no-op when unchanged) and installs the product into `Subler.app/Contents/MacOS/sup2vob`, so building Subler refreshes the CLI; a terminal `sup2vob` can just be a symlink to that bundle binary. The phase is why the Subler target sets `ENABLE_USER_SCRIPT_SANDBOXING = NO` (build-script file access within the source tree only — unrelated to the app's runtime security); the CLI itself also stays buildable standalone (`make && sudo make install`).
|
||||
|
||||
PGS-from-MKV → VobSub: a PGS track inside an MKV imports as a **real subp track**, not just OCR'd tx3g text. `FileImportController`'s subtitle action sheet gains a `VobSub` entry (tag 2, default follows `Prefs.subtitleConvertBitmap` like VobSub sources) for PGS-format tracks; selecting it sets `MP42ConversionSettings.subtitlesVobSubConversion`, and the muxer's bitmap-converter branch recognizes PGS-source + VobSub-target and uses `MP42PgsToVobSubConverter` instead of `MP42BitmapSubConverter`. That converter runs the whole sup2vob conversion synchronously in `initWithTrack:error:` (sup2vob derives one global palette/geometry for the track — the PGS canvas size — and the muxer needs `magicCookie` + `frameWidth/Height` before creating the subpic track); the live muxing stream is discarded and `copyEncodedSample` replays prepass-collected samples, ending on exactly one EOF-flagged buffer. **Matroska traps found empirically here:** mkvmerge stores each PGS segment with its 13-byte "PG" envelope removed (blocks are `type` + 2-byte-be `len` + payload repeated, blank frames are real blank presentations, everything zlib-compressed) — a plain concatenation of demuxed blocks is NOT a `.sup`; phase 1 must walk each block's stripped segments and rebuild `PG + pts:4(90kHz from the block's ns timestamp ×9/100000) + 4 zero bytes + type + len` (mkvextract reconstructs exactly this — the rebuilt stream is byte-identical to it; blocks that already carry envelopes pass through verbatim for other muxers). The rebuilt temp `.sup` is fed to a second `MP42VobSubImporter` (the same machinery as `.sup` drag-import) whose demux supplies the subpic samples/palette. The converter header isn't exported (matches `MP42BitmapSubConverter`'s non-Public Headers-phase convention), and it can't be exercised from outside the framework via `copyNextSample`/`MP42FileImporter+Private` — those are `objc_direct`/internal, so harnesses must stay in public API (see the `@selector`-on-direct-method constraint noted in the converter source).
|
||||
|
||||
Matroska tagging in the submodule: `MP42Ebml` provides EBML vint/ID primitives and a Segment top-level scanner (element extents + Void slack); `MP42MatroskaTagMapping` holds the read/write tag maps shared with `MP42MkvImporter` (reader and writer can't drift — a metadata key with no SimpleTag name in the map is **silently dropped** on save, so any new editable metadata key needs a map entry); `MP42MkvTagWriter.writeMetadata:tracks:` rewrites the `Tags` element, cover-art `AttachedFile`, and per-track `TrackEntry` fields (name/language/enabled/forced) in place (mkvpropedit-style: reuse the old extent + Void padding when the payload fits, otherwise rebuild the file tail with recomputed SeekHead/Cues positions through a temp file + atomic replace; size+mtime staleness guard refuses writes on files changed since open; foreign tag groups, unknown TrackEntry children, and non-cover attachments are preserved verbatim; each TrackEntry is diffed against the model's **effective** values so an untouched save is byte-for-byte a no-op). `MP42MkvTagWriter+Internal.h` (framework-internal, not in the umbrella) shares its kid/file model types and payload builders with `MP42MkvRemuxer`, the stream-copy track-removal/subtitle-addition engine: it rebuilds the whole file, copying every block verbatim except blocks whose unmarked-vint track number (`MP42Ebml.blockTrackNumberAt:`, ≤255) belongs to a removed track — kept tracks keep their original TrackNumbers, so **gaps after a removal are intentional** and no block header is ever rewritten; clusters are scanned header-only (BlockGroup track decided from a ≤64KB peek at its `Block` child), emptied clusters skipped, the trailing unknown-size cluster materialized; SeekHead is written with 8-wide placeholder positions pwrite-patched at the end, and Cues are regenerated at EOF (per-track `CueTrackPositions` incl. `CueRelativePosition`) only when the source had them; `Info` copies verbatim except that an existing `Duration` is recomputed: the pass tracks the greatest written block start+1ms (`_writtenMaxBlockEnd`) and pwrite-patches an 8-byte double slot at the Info write site (never +BlockDuration — added blocks must measure exactly like source blocks or remux idempotence breaks); files without a source Duration keep having none; values are TimecodeScale units. Dangling `DefaultTrackUID`/`ChapterTrackUID` refs are preserved. Chapters: the source `Chapters` element copies verbatim unless `replacementChapters` is set — non-nil rebuilds `EditionEntry{ChapterAtom{...}}` from the model track (sorted ascending, ties clamped to previous+1ms, "Chapter N" fallback titles), and a track with `chapterCount == 0` removes the element and its SeekHead entry. Chapter writing lives in the remuxer only because `Chapters` sits before the Clusters — any size change shifts every following byte, which the tag writer's tail-only in-place machinery can't absorb. It refuses multiple Segments, stray unknown-size elements, count mismatches between TrackEntry and the passed-in `sourceTracks`, and zero-remaining-track remuxes (the drop-all guard fires before additions, so drop-all-plus-add stays refused). Added tracks = `currentTracks` members absent from `sourceTracks` (identity); each must be an `MP42SubtitleTrack` whose `URL.pathExtension` is srt/ssa/ass (kept in sync with `DocumentWindowController.matroskaSubtitleExtensions`) — the model never holds subtitle text, so lines are **re-parsed from `track.URL` at save time** (SRT via `LoadSRTFromURL` + serializer drain; SSA/ASS via `MP42SSAParser`, styling stripped) and written as `S_TEXT/UTF8`. Each added track gets an appended `TrackEntry` (TrackNumber = max of all entries + 1 ≤ 0x3FFF, CodecID `S_TEXT/UTF8`, ISO `0x22B59C` + IETF `0x22B59D` language). Blocks are `BlockGroup{Block(unmarked-vint TrackNumber + int16 BE relative TC + UTF-8), BlockDuration}` — the `BlockGroup` wrapper is **mandatory**: a bare `Block` as a direct Cluster child is silently ignored by libebml readers even though ffmpeg tolerates it. Each line rides in the last existing Cluster whose Timecode ≤ its start time (negative relTCs are legal); lines whose relTC would exceed ±32767 go into **synthesized Clusters** emitted right after that cluster, original clusters are never rewritten or split.
|
||||
|
||||
Movie-tab fields that have no Matroska-spec tag (Rating, ContentRating, MediaKind, HDVideo, Cast, TVNetwork, TVEpisodeID) round-trip through community-style SimpleTag names `RATING`/`CONTENTRATING`/`MEDIAKIND`/`HD`/`CAST`/`NETWORK`/`EPISODEID`. Array-typed model values (Cast, Director, Producer, Screenwriters) are written joined with `", "` and re-split by the importer. The importer only synthesizes a TVEpisodeID from season/episode on the **conversion** path — in tagsOnly mode a synthesized value would leak into the file as a tag the user never set.
|
||||
|
||||
The Matroska track-field element ids are a trap: the ids that actually work in the wild (libebml/mkvtoolnix/ffmpeg and every reader) are `0x22B59C` = ISO-639-2/B `Language`, `0x22B59D` = BCP-47 `LanguageIETF`, `0xB9` = `TrackFlagEnabled`. The EBML spec's later `0x447A` carries the same ISO value but mkvtoolnix never writes it — `MatroskaParser.c` reads it defensively, the writer normalizes it to `0x22B59C`. Modern mkvtoolnix files may carry **only** `0x22B59D` (mkvmerge derives the ISO code from the IETF tag), so `Language` can be absent; the importer/writer prefer `LanguageIETF` when present and fall back to the ISO element. Match TrackEntry↔model by file order (chapter pseudo-track filtered); a count mismatch refuses the write.
|
||||
|
||||
Chapter elements are their own trap set (all verified empirically against mkvmerge-written files): `ChapterAtom` is `0xB6` — **not** `0xB0`, which is PixelWidth in TrackEntry scope (`MatroskaParser.c` has always parsed 0xB6 correctly; don't "fix" it). Chapter timecodes are absolute **nanoseconds**, not TimecodeScale units like nearly every other Matroska time — libmatroska writes and mkvtoolnix/ffmpeg both read them as ns regardless of segment scale, so the importer's plain `/1e6` to ms and the remuxer's plain `×1e6` back are right. `ChapterUID` (`0x73C4`) is mandatory in practice: ffmpeg **silently skips** atoms without it (mkvtoolnix still lists them, which makes the loss easy to miss); `EditionUID` likewise. The writer derives both deterministically from the chapter content so re-saving unchanged input reproduces the file. The importer's chapter normalization (force first start to 0, drop non-first zero-start atoms) is an **MP4 conversion-path** quirk only — **tagsOnly mode mirrors the file's atoms verbatim**, offset first starts and duplicate zero starts included (mkvmerge writes both shapes). That asymmetry matters because the tagsOnly model is the baseline a Chapters rewrite rebuilds from: dropping or shifting atoms at read time would silently corrupt them on the first edit, so instead the remuxer's strictly-ascending clamp shifts tied starts by +1 ms at write time and nothing is lost. Chapter language round-trips at **track level**: the importer adopts the first `ChapterDisplay/ChapterLanguage` (0x437C) it finds as the model track's `language`, and the remuxer stamps that track language into every atom — omitted when nil/absent or when it maps to ISO `eng` (the spec default; keeps rewrites byte-identical to language-less files). `MP42Languages ISO_639_2CodeForExtendedTag:` answers unknown tags with `"und"`, so a garbage language explicitly writes `und` rather than silently defaulting — extended tags are locale-identifier style (`"en"`, `"it"`), not English names. The chapter-row language popup stays enabled on MKV (`TracksViewController.isLanguageEditable`) because the value rides the remuxer's chapter rebuild, not the tag writer (no TrackEntry), and the saver's chapter-snapshot rows carry the language so a language-only edit flips `chaptersChanged`. Note: `ffprobe -show_chapters` does NOT surface ChapterLanguage in its chapter tags — assert it with `mkvinfo` ("Chapter language: …").
|
||||
|
||||
## Cross-cutting concerns
|
||||
|
||||
- **Sandbox vs non-sandbox builds**: `#if SB_SANDBOX` guards App Store code paths (security-scoped bookmarks via `MP42SecurityAccessToken`); the default build is the non-sandboxed variant (`Subler.entitlements` exist for the sandboxed config).
|
||||
- **Localization**: 183 `.strings` files live in per-locale `.lproj` directories scattered next to the code/XIBs they localize (repo root, `Classes/`, `Classes/PropertyView/`), not one central file. Locales: Base (English), it, fr, es-419, pt-BR, zh-CN, zh-Hans. When adding a UI string, find the sibling `.strings` used by that XIB/view.
|
||||
- **Static data**: `Resources/*.json` — `Alpha2.json` (ISO language codes, used by `LanguageTransformer`), `iTunesStores.json`, `Storefronts.json`, `Ratings.json`.
|
||||
@@ -40,7 +40,10 @@ final class DocumentController : NSDocumentController {
|
||||
override func openDocument(withContentsOf url: URL, display displayDocument: Bool, completionHandler: @escaping (NSDocument?, Bool, Error?) -> Void) {
|
||||
let ext = url.pathExtension.lowercased()
|
||||
|
||||
if ["mkv", "mka", "mks", "mov", "264", "h264"].contains(ext) {
|
||||
// Matroska files open directly as tags-only documents (see
|
||||
// Document.read); the remaining formats below can only be converted
|
||||
// to MP4, so offer the import sheet on a fresh untitled document.
|
||||
if ["mov", "264", "h264"].contains(ext) {
|
||||
do {
|
||||
let doc = try self.openUntitledDocumentAndDisplay(displayDocument)
|
||||
completionHandler(doc, false, nil)
|
||||
|
||||
@@ -186,7 +186,7 @@ final class ArtworkSelectorController: NSViewController, NSCollectionViewDataSou
|
||||
view.wantsLayer = true
|
||||
|
||||
imageBrowser.register(ArtworkSelectorViewItem.self, forItemWithIdentifier: ArtworkSelectorController.itemView)
|
||||
loadMoreArtworks(count: 8)
|
||||
loadMoreArtworks(count: 11)
|
||||
|
||||
let type = metadata.mediaKind.description
|
||||
|
||||
@@ -245,7 +245,7 @@ final class ArtworkSelectorController: NSViewController, NSCollectionViewDataSou
|
||||
imageBrowser.reloadItems(at: [indexPath])
|
||||
}
|
||||
|
||||
imageBrowser.selectionIndexPaths = selectionIndexPaths
|
||||
imageBrowser.selectionIndexPaths = selectionIndexPaths
|
||||
}
|
||||
|
||||
private func selectArtwork(at index: Int) {
|
||||
@@ -294,7 +294,8 @@ final class ArtworkSelectorController: NSViewController, NSCollectionViewDataSou
|
||||
}
|
||||
|
||||
private func selectedArtworks() -> [ArtworkImageObject] {
|
||||
return imageBrowser.selectionIndexPaths.map { artworks[$0.item] }
|
||||
let indexes = imageBrowser.selectionIndexPaths.map { $0.item } .sorted()
|
||||
return indexes.map { artworks[$0] }
|
||||
}
|
||||
|
||||
// MARK - UI state
|
||||
|
||||
@@ -10,7 +10,8 @@ import AVFoundation
|
||||
|
||||
final class ArtworkSelectorViewItemLabel : NSTextField {
|
||||
|
||||
@IBInspectable var highlightColor: NSColor = .alternateSelectedControlColor
|
||||
|
||||
@IBInspectable var highlightColor: NSColor = .alternateSelectedControlColor //.selectedContentBackgroundColor
|
||||
@IBInspectable var highlightTextColor: NSColor = .alternateSelectedControlTextColor
|
||||
@IBInspectable var cornerRadius: CGFloat = 3
|
||||
|
||||
@@ -162,7 +163,11 @@ final class ArtworkSelectorViewItemView: NSView {
|
||||
|
||||
backgroundLayer.anchorPoint = CGPoint.zero
|
||||
backgroundLayer.position = CGPoint(x: 0, y: paddingBottom)
|
||||
backgroundLayer.backgroundColor = NSColor.controlHighlightColor.cgColor
|
||||
if #available(macOS 10.14, *) {
|
||||
backgroundLayer.backgroundColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||
} else {
|
||||
backgroundLayer.backgroundColor = NSColor.controlHighlightColor.cgColor
|
||||
}
|
||||
backgroundLayer.cornerRadius = 8
|
||||
backgroundLayer.isHidden = true
|
||||
backgroundLayer.isOpaque = true
|
||||
@@ -171,7 +176,11 @@ final class ArtworkSelectorViewItemView: NSView {
|
||||
emptyLayer.position = CGPoint(x: padding, y: padding + paddingBottom)
|
||||
emptyLayer.lineWidth = 3.0
|
||||
emptyLayer.lineDashPattern = [12,5]
|
||||
emptyLayer.strokeColor = NSColor.secondarySelectedControlColor.cgColor
|
||||
if #available(macOS 10.14, *) {
|
||||
emptyLayer.strokeColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||
} else {
|
||||
emptyLayer.strokeColor = NSColor.secondarySelectedControlColor.cgColor
|
||||
}
|
||||
emptyLayer.fillColor = NSColor.windowBackgroundColor.cgColor
|
||||
emptyLayer.isOpaque = true
|
||||
|
||||
@@ -197,12 +206,21 @@ final class ArtworkSelectorViewItemView: NSView {
|
||||
}
|
||||
|
||||
private func updateBackgroundColor() {
|
||||
if #available(OSX 10.14, *) {
|
||||
if #available(macOS 11, *) {
|
||||
effectiveAppearance.performAsCurrentDrawingAppearance {
|
||||
imageLayer.shadowColor = NSColor.labelColor.cgColor
|
||||
backgroundLayer.backgroundColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||
emptyLayer.strokeColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||
emptyLayer.fillColor = NSColor.windowBackgroundColor.cgColor
|
||||
}
|
||||
} else {
|
||||
let saved = NSAppearance.current
|
||||
NSAppearance.current = effectiveAppearance
|
||||
|
||||
imageLayer.shadowColor = NSColor.labelColor.cgColor
|
||||
backgroundLayer.backgroundColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||
if #available(macOS 10.14, *) {
|
||||
backgroundLayer.backgroundColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||
}
|
||||
emptyLayer.strokeColor = NSColor.secondarySelectedControlColor.cgColor
|
||||
emptyLayer.fillColor = NSColor.windowBackgroundColor.cgColor
|
||||
|
||||
@@ -276,6 +294,9 @@ final class ArtworkSelectorViewItem: NSCollectionViewItem {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
textField?.layer?.isOpaque = true
|
||||
let recognizer = NSClickGestureRecognizer(target: self, action: #selector(handleGesture))
|
||||
recognizer.numberOfClicksRequired = 2
|
||||
self.view.addGestureRecognizer(recognizer)
|
||||
}
|
||||
|
||||
private func updateLabels() {
|
||||
@@ -337,11 +358,9 @@ final class ArtworkSelectorViewItem: NSCollectionViewItem {
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
override func mouseUp(with event: NSEvent) {
|
||||
if event.clickCount > 1, let action = doubleAction {
|
||||
@objc func handleGesture() {
|
||||
if let action = doubleAction {
|
||||
target?.performSelector(onMainThread: action, with: nil, waitUntilDone: true)
|
||||
} else {
|
||||
super.mouseUp(with: event)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -19,7 +19,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="128" height="171"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wkh-6c-0tU" customClass="ArtworkSelectorViewItemLabel" customModule="Subler" customModuleProvider="target">
|
||||
<textField wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wkh-6c-0tU" customClass="ArtworkSelectorViewItemLabel" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="-4" y="17" width="136" height="15"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" alignment="center" title="Label" usesSingleLineMode="YES" id="TsL-Ak-xnf">
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fGU-Kh-WjD">
|
||||
<textField wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fGU-Kh-WjD">
|
||||
<rect key="frame" x="-4" y="4" width="136" height="13"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" alignment="center" title="Label" usesSingleLineMode="YES" id="ggX-Q2-CZ0">
|
||||
<font key="font" metaFont="system" size="10"/>
|
||||
@@ -40,7 +40,6 @@
|
||||
<constraint firstItem="fGU-Kh-WjD" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="-2" id="0Wf-6t-6Lg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Wkh-6c-0tU" secondAttribute="trailing" constant="-2" id="9df-FA-2lX"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Wkh-6c-0tU" secondAttribute="bottom" constant="17" id="EOh-x3-ntT"/>
|
||||
<constraint firstItem="Wkh-6c-0tU" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="HaR-VX-NRg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fGU-Kh-WjD" secondAttribute="bottom" constant="4" id="Xx6-ak-lcw"/>
|
||||
<constraint firstItem="Wkh-6c-0tU" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="-2" id="cPi-y8-nFz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fGU-Kh-WjD" secondAttribute="trailing" constant="-2" id="fLm-DU-mGT"/>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -14,10 +13,10 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" toolbarStyle="expanded" id="s5f-yH-26m" userLabel="Window">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="200" y="500" width="520" height="510"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1049"/>
|
||||
<value key="minSize" type="size" width="520" height="510"/>
|
||||
<view key="contentView" id="rip-YL-WpY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="520" height="510"/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -19,17 +19,17 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="642" height="497"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="642" height="518"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1XK-zr-YdW">
|
||||
<rect key="frame" x="166" y="142" width="456" height="311"/>
|
||||
<rect key="frame" x="166" y="167" width="456" height="307"/>
|
||||
<clipView key="contentView" id="mho-zw-2Ud">
|
||||
<rect key="frame" x="1" y="1" width="454" height="309"/>
|
||||
<rect key="frame" x="1" y="1" width="454" height="305"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" tableStyle="plain" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="REl-53-Sku" viewBased="YES" id="Tid-Rc-Ljr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="454" height="286"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="454" height="282"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -139,7 +139,7 @@
|
||||
</tableHeaderView>
|
||||
</scrollView>
|
||||
<tokenField focusRingType="none" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y15-gP-AOw">
|
||||
<rect key="frame" x="18" y="67" width="606" height="15"/>
|
||||
<rect key="frame" x="18" y="88" width="606" height="15"/>
|
||||
<tokenFieldCell key="cell" selectable="YES" allowsUndo="NO" alignment="left" allowsEditingTextAttributes="YES" id="rG5-g2-YmU">
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -151,7 +151,7 @@
|
||||
</connections>
|
||||
</tokenField>
|
||||
<button toolTip="Remove selected item" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sd5-qb-K5v">
|
||||
<rect key="frame" x="207" y="107" width="44" height="32"/>
|
||||
<rect key="frame" x="229" y="135" width="38" height="24"/>
|
||||
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSRemoveTemplate" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="9UV-xM-L5F">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -161,7 +161,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton toolTip="Add annotation" verticalHuggingPriority="249" horizontalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="Jdh-Cj-6ef">
|
||||
<rect key="frame" x="163" y="110" width="53" height="25"/>
|
||||
<rect key="frame" x="166" y="135" width="61" height="24"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="center" lineBreakMode="truncatingTail" borderStyle="border" inset="2" pullsDown="YES" selectedItem="5wF-Yq-18d" id="Hfq-XE-kzZ">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="message"/>
|
||||
@@ -178,13 +178,13 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h1q-Xr-y6R">
|
||||
<rect key="frame" x="20" y="142" width="138" height="311"/>
|
||||
<clipView key="contentView" id="KId-fX-q1q">
|
||||
<rect key="frame" x="1" y="1" width="136" height="309"/>
|
||||
<rect key="frame" x="20" y="167" width="138" height="307"/>
|
||||
<clipView key="contentView" ambiguous="YES" id="KId-fX-q1q">
|
||||
<rect key="frame" x="1" y="1" width="136" height="305"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="Eh9-8P-dr0" viewBased="YES" id="nXW-oy-rtu">
|
||||
<rect key="frame" x="0.0" y="0.0" width="136" height="286"/>
|
||||
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="Eh9-8P-dr0" viewBased="YES" id="nXW-oy-rtu">
|
||||
<rect key="frame" x="0.0" y="0.0" width="136" height="282"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -256,7 +256,7 @@
|
||||
</tableHeaderView>
|
||||
</scrollView>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8sr-aI-VZy">
|
||||
<rect key="frame" x="18" y="90" width="606" height="16"/>
|
||||
<rect key="frame" x="18" y="111" width="606" height="16"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Available values:" id="OYx-Dd-YIf">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -264,7 +264,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BkU-sx-jUf">
|
||||
<rect key="frame" x="494" y="107" width="135" height="32"/>
|
||||
<rect key="frame" x="498" y="135" width="124" height="24"/>
|
||||
<buttonCell key="cell" type="push" title="Restore Defaults" bezelStyle="rounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="nBh-jv-KDG">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -277,7 +277,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZpH-Zy-mAt">
|
||||
<rect key="frame" x="18" y="461" width="323" height="16"/>
|
||||
<rect key="frame" x="18" y="482" width="323" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Map the providers' metadata to the MP4 annotations" id="cUW-9F-EvO">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -285,7 +285,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="ZMK-Xt-bJh">
|
||||
<rect key="frame" x="18" y="19" width="173" height="41"/>
|
||||
<rect key="frame" x="20" y="64" width="169" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Keep empty annotations" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7Ek-lI-5Lo">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -294,8 +294,29 @@
|
||||
<binding destination="LQR-UU-5Gl" name="value" keyPath="values.SBMetadataKeepEmptyAnnotations" id="ZWu-yg-7bJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="SZd-pK-hWX">
|
||||
<rect key="frame" x="20" y="42" width="206" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Overwrite existing annotations" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7KC-Up-hGn">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="LQR-UU-5Gl" name="value" keyPath="values.SBMetadataOverwriteExistingAnnotations" id="gMZ-eG-GV4"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button toolTip="4K metadata may cause streaming issues with some Apple TV and iTunes configurations" translatesAutoresizingMaskIntoConstraints="NO" id="cEs-iS-fwI">
|
||||
<rect key="frame" x="20" y="20" width="232" height="16"/>
|
||||
<buttonCell key="cell" type="check" title="Autodetect 4K HD Video Metadata" bezelStyle="regularSquare" imagePosition="left" inset="2" id="vyR-ib-B9Q">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="LQR-UU-5Gl" name="value" keyPath="values.SBSet4KHDVideoMetadata" id="OKn-J3-W8a"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="SZd-pK-hWX" firstAttribute="leading" secondItem="ZMK-Xt-bJh" secondAttribute="leading" id="00b-Uc-cOS"/>
|
||||
<constraint firstItem="Jdh-Cj-6ef" firstAttribute="bottom" secondItem="sd5-qb-K5v" secondAttribute="bottom" id="0SP-GV-ri1"/>
|
||||
<constraint firstItem="Jdh-Cj-6ef" firstAttribute="leading" secondItem="1XK-zr-YdW" secondAttribute="leading" id="1EI-3q-Cy7"/>
|
||||
<constraint firstItem="h1q-Xr-y6R" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" id="2i2-lP-HkJ"/>
|
||||
@@ -304,16 +325,20 @@
|
||||
<constraint firstAttribute="trailing" secondItem="1XK-zr-YdW" secondAttribute="trailing" constant="20" symbolic="YES" id="9fj-nw-Dnj"/>
|
||||
<constraint firstItem="h1q-Xr-y6R" firstAttribute="bottom" secondItem="1XK-zr-YdW" secondAttribute="bottom" id="BRg-Qn-cnk"/>
|
||||
<constraint firstItem="ZpH-Zy-mAt" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" symbolic="YES" id="BpM-Kf-SfT"/>
|
||||
<constraint firstItem="SZd-pK-hWX" firstAttribute="top" secondItem="ZMK-Xt-bJh" secondAttribute="bottom" constant="6" symbolic="YES" id="DHM-ZO-C7P"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ZMK-Xt-bJh" secondAttribute="trailing" constant="20" id="GLC-tk-eTl"/>
|
||||
<constraint firstItem="8sr-aI-VZy" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" id="HFP-B1-ScR"/>
|
||||
<constraint firstItem="h1q-Xr-y6R" firstAttribute="leading" secondItem="Y15-gP-AOw" secondAttribute="leading" id="HMX-Qb-8MC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="cEs-iS-fwI" secondAttribute="bottom" constant="20" symbolic="YES" id="HUg-bO-NbS"/>
|
||||
<constraint firstItem="h1q-Xr-y6R" firstAttribute="centerY" secondItem="1XK-zr-YdW" secondAttribute="centerY" id="JHk-tE-xQI"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="SZd-pK-hWX" secondAttribute="trailing" constant="20" symbolic="YES" id="MBW-h8-eD8"/>
|
||||
<constraint firstItem="Jdh-Cj-6ef" firstAttribute="top" secondItem="h1q-Xr-y6R" secondAttribute="bottom" constant="8" id="NcZ-Os-USj"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ZpH-Zy-mAt" secondAttribute="trailing" constant="20" symbolic="YES" id="P7f-Fl-xTL"/>
|
||||
<constraint firstItem="h1q-Xr-y6R" firstAttribute="top" secondItem="ZpH-Zy-mAt" secondAttribute="bottom" constant="8" symbolic="YES" id="S2n-Cv-TwB"/>
|
||||
<constraint firstItem="BkU-sx-jUf" firstAttribute="centerY" secondItem="sd5-qb-K5v" secondAttribute="centerY" id="ZWW-ZP-Xp1"/>
|
||||
<constraint firstItem="BkU-sx-jUf" firstAttribute="trailing" secondItem="1XK-zr-YdW" secondAttribute="trailing" id="bp9-bU-BRc"/>
|
||||
<constraint firstItem="1XK-zr-YdW" firstAttribute="leading" secondItem="h1q-Xr-y6R" secondAttribute="trailing" constant="8" symbolic="YES" id="cCT-Qp-Bxz"/>
|
||||
<constraint firstItem="cEs-iS-fwI" firstAttribute="top" secondItem="SZd-pK-hWX" secondAttribute="bottom" constant="6" symbolic="YES" id="d8X-hu-sZn"/>
|
||||
<constraint firstItem="Jdh-Cj-6ef" firstAttribute="top" secondItem="sd5-qb-K5v" secondAttribute="top" id="ewc-at-D5g"/>
|
||||
<constraint firstItem="BkU-sx-jUf" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="fdW-8M-iew"/>
|
||||
<constraint firstItem="8sr-aI-VZy" firstAttribute="top" secondItem="Jdh-Cj-6ef" secondAttribute="bottom" constant="8" id="gVT-X2-Zcu"/>
|
||||
@@ -321,12 +346,13 @@
|
||||
<constraint firstItem="BkU-sx-jUf" firstAttribute="height" secondItem="Jdh-Cj-6ef" secondAttribute="height" id="lyO-6Z-Osi"/>
|
||||
<constraint firstItem="Y15-gP-AOw" firstAttribute="top" secondItem="8sr-aI-VZy" secondAttribute="bottom" constant="8" id="mFt-Ao-lHu"/>
|
||||
<constraint firstItem="Y15-gP-AOw" firstAttribute="trailing" secondItem="8sr-aI-VZy" secondAttribute="trailing" id="mXF-1R-Sbp"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ZMK-Xt-bJh" secondAttribute="bottom" constant="20" symbolic="YES" id="qbM-tp-ooC"/>
|
||||
<constraint firstItem="ZpH-Zy-mAt" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="ttK-B9-wyu"/>
|
||||
<constraint firstItem="sd5-qb-K5v" firstAttribute="leading" secondItem="Jdh-Cj-6ef" secondAttribute="trailing" constant="2" id="vIk-e5-WB3"/>
|
||||
<constraint firstItem="cEs-iS-fwI" firstAttribute="leading" secondItem="SZd-pK-hWX" secondAttribute="leading" id="wdD-k6-Agx"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="cEs-iS-fwI" secondAttribute="trailing" constant="20" symbolic="YES" id="we6-QF-WHA"/>
|
||||
<constraint firstItem="1XK-zr-YdW" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="166" id="yZg-V9-bxH"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-295.5" y="-469.5"/>
|
||||
<point key="canvasLocation" x="-296" y="-459"/>
|
||||
</customView>
|
||||
<arrayController objectClassName="NSString" id="RId-BH-Y2G" userLabel="Types Controller">
|
||||
<classReference key="objectClass" className="NSString"/>
|
||||
|
||||
@@ -41,7 +41,7 @@ final class ChapterSearchController: ViewController, NSTableViewDataSource, NSTa
|
||||
|
||||
switch info {
|
||||
|
||||
case .movie(let title):
|
||||
case .movie(let title, _):
|
||||
searchTerm = title
|
||||
case .tvShow, .none:
|
||||
searchTerm = title
|
||||
|
||||
+106
-11
@@ -15,6 +15,17 @@ final class Document: NSDocument {
|
||||
private(set) var mp4: MP42File
|
||||
private var unsupportedMp4Brand: Bool
|
||||
|
||||
// Matroska documents open in tags-only mode: the model is an in-memory
|
||||
// MP42File whose tracks are demuxed for display and whose metadata is
|
||||
// written back into the original file (Tags + cover attachment) by
|
||||
// MP42MkvTagWriter on save.
|
||||
private(set) var isMatroska = false
|
||||
// The pairing/staleness baseline (importer track snapshot, chapter rows,
|
||||
// file size/mtime) and the branching write-back (in-place tag writer vs
|
||||
// stream-copy remuxer) live in MatroskaSaver — shared with QueueItem so a
|
||||
// queued Matroska file saves exactly like the window does.
|
||||
private(set) var mkvSaver: MatroskaSaver?
|
||||
|
||||
override init() {
|
||||
self.cancelled = false
|
||||
self.options = [:]
|
||||
@@ -22,6 +33,7 @@ final class Document: NSDocument {
|
||||
self.unsupportedMp4Brand = false
|
||||
self.mp4 = MP42File()
|
||||
super.init()
|
||||
self.mp4.undo = undoManager
|
||||
}
|
||||
|
||||
init(mp4: MP42File) {
|
||||
@@ -37,6 +49,7 @@ final class Document: NSDocument {
|
||||
} else {
|
||||
updateChangeCount(.changeDone)
|
||||
}
|
||||
self.mp4.undo = undoManager
|
||||
}
|
||||
|
||||
override func makeWindowControllers() {
|
||||
@@ -58,23 +71,55 @@ final class Document: NSDocument {
|
||||
override public var isEntireFileLoaded: Bool { get { return false } }
|
||||
|
||||
override func read(from url: URL, ofType typeName: String) throws {
|
||||
if MP42FileImporter.isMatroskaFileType(url.pathExtension) {
|
||||
try readMatroska(from: url)
|
||||
return
|
||||
}
|
||||
|
||||
do {
|
||||
mp4 = try MP42File(url: url)
|
||||
mp4.undo = undoManager
|
||||
} catch {
|
||||
unsupportedMp4Brand = true
|
||||
}
|
||||
}
|
||||
|
||||
override func revert(toContentsOf url: URL, ofType typeName: String) throws {
|
||||
mp4 = try MP42File(url: url)
|
||||
if isMatroska || MP42FileImporter.isMatroskaFileType(url.pathExtension) {
|
||||
try readMatroska(from: url)
|
||||
} else {
|
||||
mp4 = try MP42File(url: url)
|
||||
mp4.undo = undoManager
|
||||
}
|
||||
|
||||
if let docController = windowControllers.first as? DocumentWindowController {
|
||||
docController.reloadData()
|
||||
undoManager?.removeAllActions()
|
||||
}
|
||||
|
||||
updateChangeCount(.changeCleared)
|
||||
}
|
||||
|
||||
private func readMatroska(from url: URL) throws {
|
||||
// tagsOnly: the importer mirrors the file's own track flags instead of
|
||||
// applying the MP4 conversion heuristic, so the model matches the file
|
||||
// (MP42MkvTagWriter diffs track fields against it on save).
|
||||
let importer = try MP42FileImporter(url: url, tagsOnly: true)
|
||||
let file = MatroskaSaver.buildModel(from: importer)
|
||||
mp4 = file
|
||||
// (file.undo was not wired during buildModel's addTrack calls, so
|
||||
// those did not open undo groups.)
|
||||
mp4.undo = undoManager
|
||||
isMatroska = true
|
||||
let saver = MatroskaSaver(sourceURL: url, importer: importer, model: file)
|
||||
// The save sheet listens on the model's progress handler (see
|
||||
// DocumentWindowController.startProgressReporting); forward through it.
|
||||
saver.progressHandler = { [weak self] progress in
|
||||
self?.mp4.progressHandler?(progress)
|
||||
}
|
||||
mkvSaver = saver
|
||||
}
|
||||
|
||||
// MARK: Save
|
||||
|
||||
override nonisolated class var autosavesInPlace: Bool { return false }
|
||||
@@ -120,10 +165,18 @@ final class Document: NSDocument {
|
||||
|
||||
if let error = error {
|
||||
completionHandler(error);
|
||||
} else if self.isMatroska {
|
||||
// The file was retagged in place; the tracks in the model are
|
||||
// still the ones on disk, so only the undo stack needs reset.
|
||||
self.undoManager?.removeAllActions()
|
||||
docController?.reloadData()
|
||||
completionHandler(error)
|
||||
} else {
|
||||
do {
|
||||
let reloadedFile = try MP42File(url: url)
|
||||
self.mp4 = reloadedFile
|
||||
self.mp4.undo = self.undoManager
|
||||
self.undoManager?.removeAllActions()
|
||||
docController?.reloadData()
|
||||
completionHandler(error)
|
||||
} catch {
|
||||
@@ -141,6 +194,7 @@ final class Document: NSDocument {
|
||||
|
||||
func cancelSave() {
|
||||
cancelled = true
|
||||
mkvSaver?.cancel()
|
||||
mp4.cancel()
|
||||
}
|
||||
|
||||
@@ -166,6 +220,18 @@ final class Document: NSDocument {
|
||||
unblockUserInteraction()
|
||||
preventSleep()
|
||||
|
||||
defer {
|
||||
allowSleep()
|
||||
optimize = false
|
||||
options = [:]
|
||||
}
|
||||
|
||||
if isMatroska {
|
||||
try writeMatroska(to: url, for: saveOperation)
|
||||
cancelled = false
|
||||
return
|
||||
}
|
||||
|
||||
if Prefs.organizeAlternateGroups {
|
||||
mp4.organizeAlternateGroups()
|
||||
if Prefs.inferMediaCharacteristics {
|
||||
@@ -174,19 +240,14 @@ final class Document: NSDocument {
|
||||
}
|
||||
}
|
||||
|
||||
defer {
|
||||
allowSleep()
|
||||
optimize = false
|
||||
options = [:]
|
||||
}
|
||||
|
||||
switch saveOperation {
|
||||
case .saveOperation:
|
||||
try mp4.update(options: options)
|
||||
case .saveAsOperation:
|
||||
try mp4.write(to: url, options: options)
|
||||
default:
|
||||
fatalError("Unsupported save operation")
|
||||
throw NSError(domain: NSCocoaErrorDomain, code: NSFileWriteUnknownError,
|
||||
userInfo: [NSLocalizedDescriptionKey: NSLocalizedString("The save operation is not supported.", comment: "Document unsupported save operation error.")])
|
||||
}
|
||||
|
||||
if optimize && cancelled == false {
|
||||
@@ -200,6 +261,17 @@ final class Document: NSDocument {
|
||||
cancelled = false
|
||||
}
|
||||
|
||||
private func writeMatroska(to url: URL, for saveOperation: NSDocument.SaveOperationType) throws {
|
||||
guard let saver = mkvSaver else {
|
||||
throw NSError(domain: NSCocoaErrorDomain, code: NSFileWriteUnknownError,
|
||||
userInfo: [NSLocalizedDescriptionKey: NSLocalizedString("The Matroska source file is unknown.", comment: "Document MKV remux missing source error.")])
|
||||
}
|
||||
// `optimize` (Save and Optimize) forces the structural rebuild, as
|
||||
// does Save-As; the saver branches in-place tag writer vs stream-copy
|
||||
// remuxer (see MatroskaSaver.save).
|
||||
try saver.save(model: mp4, to: url, forceStructural: optimize || saveOperation != .saveOperation)
|
||||
}
|
||||
|
||||
// MARK: Save panel
|
||||
|
||||
private var accessoryViewController: SaveOptions?
|
||||
@@ -227,6 +299,19 @@ final class Document: NSDocument {
|
||||
guard let windowForSheet = windowForSheet else { return }
|
||||
|
||||
let queue = QueueController.shared
|
||||
// Matroska document: match the window's save semantics — the queue
|
||||
// item writes metadata back into the original file instead of muxing
|
||||
// a converted copy, so the destination is the file itself (no save
|
||||
// panel) and the item inherits the document's Matroska baseline: the
|
||||
// TrackEntry↔track pairing is by object identity and cannot be
|
||||
// rebuilt from the model.
|
||||
if isMatroska, let fileURL = fileURL, let saver = mkvSaver {
|
||||
let item = QueueItem(mp4: mp4, fileURL: fileURL, destURL: fileURL)
|
||||
item.attachMatroskaSaver(saver)
|
||||
queue.add(item)
|
||||
close()
|
||||
return
|
||||
}
|
||||
if mp4.hasFileRepresentation {
|
||||
let item = QueueItem(mp4: mp4)
|
||||
queue.add(item, applyPreset: true)
|
||||
@@ -260,10 +345,20 @@ final class Document: NSDocument {
|
||||
return true
|
||||
case #selector(save(_:)) where isDocumentEdited == true:
|
||||
return true
|
||||
case #selector(saveAs(_:)),
|
||||
#selector(sendToQueue(_:)):
|
||||
case #selector(saveAs(_:)):
|
||||
// MKV Save-As runs through MP42MkvRemuxer (stream copy, same
|
||||
// container — the destination must stay .mkv/.mka/.mks, checked
|
||||
// in writeMatroska).
|
||||
return true
|
||||
case #selector(saveAndOptimize(_:)) where isDocumentEdited == false && mp4.hasFileRepresentation == true:
|
||||
case #selector(sendToQueue(_:)):
|
||||
return true
|
||||
// On a Matroska document optimize = full remuxer rebuild (see
|
||||
// writeMatroska), the container-equivalent of the atom-order optimize.
|
||||
// Tags-only models report hasFileRepresentation == false (their tracks
|
||||
// are never muxed), so the on-disk precondition there is just the
|
||||
// remux source: fileURL.
|
||||
case #selector(saveAndOptimize(_:)) where isDocumentEdited == false
|
||||
&& (isMatroska ? fileURL != nil : mp4.hasFileRepresentation == true):
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
@@ -58,11 +58,16 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
|
||||
submenu.addItem(menuItem)
|
||||
}
|
||||
|
||||
let insertChapter = NSMenuItem()
|
||||
insertChapter.title = NSLocalizedString("Insert a chapter", comment: "Toolbar")
|
||||
insertChapter.action = #selector(DocumentWindowController.insertChapter(_:))
|
||||
|
||||
let chapters = NSMenuItem()
|
||||
chapters.title = NSLocalizedString("Insert a chapter every", comment: "Toolbar")
|
||||
chapters.submenu = submenu
|
||||
|
||||
let menu = NSMenu()
|
||||
menu.addItem(insertChapter)
|
||||
menu.addItem(chapters)
|
||||
menu.addItem(NSMenuItem.separator())
|
||||
menu.addItem(withTitle: NSLocalizedString("Organize alternate groups", comment: "Toolbar"),
|
||||
@@ -92,7 +97,7 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
|
||||
if #available(macOS 26.0, *) {
|
||||
item.showsIndicator = false
|
||||
item.image = NSImage.init(systemSymbolName: "ellipsis", accessibilityDescription: nil)
|
||||
} else if #available(macOS 26.0, *) {
|
||||
} else if #available(macOS 11.0, *) {
|
||||
item.image = NSImage.init(systemSymbolName: "ellipsis.circle", accessibilityDescription: nil)
|
||||
} else {
|
||||
item.image = NSImage(named:"NSActionTemplate")
|
||||
@@ -149,7 +154,7 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
|
||||
}
|
||||
|
||||
@MainActor func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
|
||||
return [.importTracks, .searchMetadata, .actions, .space, .deleteTracks, .flexibleSpace, .sendToQueue, .showQueue,]
|
||||
return [.importTracks, .searchMetadata, .space, .actions, .space, .deleteTracks, .flexibleSpace, .sendToQueue, .showQueue,]
|
||||
}
|
||||
|
||||
@MainActor func toolbarAllowedItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
|
||||
import Cocoa
|
||||
import MP42Foundation
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
final class DocumentWindowController: NSWindowController, TracksViewControllerDelegate, MetadataSearchViewControllerDelegate, FileImportControllerDelegate, ProgressViewControllerDelegate, NSDraggingDestination, NSUserInterfaceValidations {
|
||||
final class DocumentWindowController: NSWindowController, NSWindowDelegate, TracksViewControllerDelegate, MetadataSearchViewControllerDelegate, ChapterSearchControllerDelegate, FileImportControllerDelegate, ProgressViewControllerDelegate, NSDraggingDestination, NSUserInterfaceValidations {
|
||||
|
||||
private var doc: Document {
|
||||
return document as! Document
|
||||
@@ -50,9 +51,9 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
toolbar.allowsUserCustomization = true
|
||||
toolbar.autosavesConfiguration = true
|
||||
if #available(macOS 26, *) {
|
||||
toolbar.displayMode = .iconAndLabel
|
||||
} else {
|
||||
toolbar.displayMode = .iconOnly
|
||||
} else {
|
||||
toolbar.displayMode = .iconAndLabel
|
||||
}
|
||||
self.window?.toolbar = toolbar
|
||||
|
||||
@@ -67,11 +68,26 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
splitViewController.splitView.identifier = DocumentWindowController.splitViewResorationIdentifier
|
||||
}
|
||||
else {
|
||||
window.setContentSize(NSSize(width: 690, height: 510))
|
||||
splitViewController.splitView.setPosition(160, ofDividerAt: 0)
|
||||
window.setContentSize(NSSize(width: 692, height: 600))
|
||||
splitViewController.splitView.setPosition(240, ofDividerAt: 0)
|
||||
}
|
||||
|
||||
didSelect(tracks: [])
|
||||
|
||||
let update: (Notification) -> Void = { [weak self] notification in
|
||||
guard let s = self else { return }
|
||||
s.reloadDataAfterAnUndo()
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(forName: NSNotification.Name.NSUndoManagerDidUndoChange,
|
||||
object: doc.undoManager,
|
||||
queue: OperationQueue.main,
|
||||
using: update)
|
||||
|
||||
NotificationCenter.default.addObserver(forName: NSNotification.Name.NSUndoManagerDidRedoChange,
|
||||
object: doc.undoManager,
|
||||
queue: OperationQueue.main,
|
||||
using: update)
|
||||
}
|
||||
|
||||
private static let splitViewResorationIdentifier = NSUserInterfaceItemIdentifier(rawValue: "splitViewSave")
|
||||
@@ -127,16 +143,20 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
}
|
||||
|
||||
private func clearDetailsViewControllers() {
|
||||
saveTabIndex(metadataViewController)
|
||||
saveTabIndexes()
|
||||
metadataViewController = nil
|
||||
saveTabIndex(videoViewController)
|
||||
videoViewController = nil
|
||||
saveTabIndex(soundViewController)
|
||||
soundViewController = nil
|
||||
chapterViewController = nil
|
||||
multiViewController = nil
|
||||
}
|
||||
|
||||
private func saveTabIndexes() {
|
||||
saveTabIndex(metadataViewController)
|
||||
saveTabIndex(videoViewController)
|
||||
saveTabIndex(soundViewController)
|
||||
}
|
||||
|
||||
private func detailsViewController(_ tracks: [MP42Track]) -> PropertyView {
|
||||
if tracks.count > 1 {
|
||||
let controller = MultiSelectViewController(numberOfTracks: UInt(tracks.count))
|
||||
@@ -175,7 +195,10 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
return emptyViewController!
|
||||
|
||||
default:
|
||||
if metadataViewController == nil {
|
||||
if let metadataViewController = metadataViewController {
|
||||
metadataViewController.metadata = mp4.metadata
|
||||
}
|
||||
else {
|
||||
metadataViewController = MovieViewController(mp4: mp4, metadata: mp4.metadata)
|
||||
}
|
||||
return metadataViewController!
|
||||
@@ -188,12 +211,20 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
tracksViewController.mp4 = doc.mp4
|
||||
}
|
||||
|
||||
func reloadDataAfterAnUndo() {
|
||||
let firstResponder = self.window?.firstResponder;
|
||||
saveTabIndexes()
|
||||
tracksViewController.reloadData()
|
||||
if let firstResponder = firstResponder as? NSView, firstResponder.window != nil {
|
||||
self.window?.makeFirstResponder(firstResponder)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Tracks controller delegate
|
||||
|
||||
func didSelect(tracks: [MP42Track]) {
|
||||
let detailsItem = splitViewController.splitViewItems[1]
|
||||
if let detailsViewController = detailsItem.viewController.children.first {
|
||||
doc.undoManager?.removeAllActions(withTarget: detailsViewController)
|
||||
detailsViewController.view.removeFromSuperviewWithoutNeedingDisplay()
|
||||
detailsItem.viewController.removeChild(at: 0)
|
||||
}
|
||||
@@ -204,17 +235,38 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
trackViewController.view.autoresizingMask = [NSView.AutoresizingMask.width, NSView.AutoresizingMask.height]
|
||||
detailsItem.viewController.view.addSubview(trackViewController.view)
|
||||
|
||||
// Tags-only mode: tracks are displayed but cannot be modified, except
|
||||
// for the fields MP42MkvTagWriter writes back (see allowsTrackEditing)
|
||||
// and the chapters tab (ChapterViewController edits ride the remuxer's
|
||||
// replacementChapters). Set after the view is loaded so it wins over
|
||||
// controls that the view controllers enable during their own updates.
|
||||
trackViewController.isMatroskaDocument = doc.isMatroska
|
||||
if doc.isMatroska, !(trackViewController is MovieViewController),
|
||||
!(trackViewController is ChapterViewController) {
|
||||
trackViewController.allowsTrackEditing = true
|
||||
trackViewController.isReadOnly = true
|
||||
} else {
|
||||
trackViewController.allowsTrackEditing = false
|
||||
trackViewController.isReadOnly = false
|
||||
}
|
||||
|
||||
selectTabViewItem(for: trackViewController)
|
||||
}
|
||||
|
||||
func delete(tracks: [MP42Track]) {
|
||||
// On MKV docs the save path stream-copy-remuxes removed real tracks'
|
||||
// blocks away (MP42MkvRemuxer); a removed chapter pseudo-track makes
|
||||
// the model report "no chapters", which deletes the Chapters element.
|
||||
if tracks.isEmpty == false {
|
||||
mp4.removeTracks(tracks)
|
||||
|
||||
if Prefs.organizeAlternateGroups { mp4.organizeAlternateGroups() }
|
||||
if Prefs.inferMediaCharacteristics { mp4.inferMediaCharacteristics() }
|
||||
if doc.isMatroska == false {
|
||||
// Both heuristics reorder the track model, which would break
|
||||
// the TrackEntry/order pairing the MKV writers depend on.
|
||||
if Prefs.organizeAlternateGroups { mp4.organizeAlternateGroups() }
|
||||
if Prefs.inferMediaCharacteristics { mp4.inferMediaCharacteristics() }
|
||||
}
|
||||
|
||||
doc.updateChangeCount(.changeDone)
|
||||
tracksViewController.reloadData()
|
||||
}
|
||||
}
|
||||
@@ -224,21 +276,33 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||
switch item.action {
|
||||
|
||||
case #selector(selectFile(_:)),
|
||||
#selector(selectMetadataFile(_:)),
|
||||
case #selector(selectMetadataFile(_:)),
|
||||
#selector(searchMetadata(_:)),
|
||||
#selector(sendToQueue(_:)),
|
||||
#selector(insertChapter(_:)),
|
||||
#selector(addChaptersEvery(_:)),
|
||||
#selector(iTunesFriendlyTrackGroups(_:)),
|
||||
#selector(searchChapters(_:)):
|
||||
return true
|
||||
|
||||
// Matroska documents may import subtitle text files (written as
|
||||
// S_TEXT/UTF8 by the stream-copy remuxer on save).
|
||||
case #selector(selectFile(_:)):
|
||||
return true
|
||||
|
||||
// Track bulk modifications: unavailable in Matroska tags-only mode.
|
||||
// Chapter actions (searchChapters, the Insert-a-chapter commands) are
|
||||
// NOT on this list — chapter changes ride the stream-copy remuxer,
|
||||
// so they work on MKV too.
|
||||
case #selector(iTunesFriendlyTrackGroups(_:)),
|
||||
#selector(clearTrackNames(_:)),
|
||||
#selector(prettifyAudioTrackNames(_:)),
|
||||
#selector(fixAudioFallbacks(_:)),
|
||||
#selector(sendToQueue(_:)):
|
||||
return true
|
||||
#selector(fixAudioFallbacks(_:)):
|
||||
return !doc.isMatroska
|
||||
|
||||
case #selector(sendToExternalApp(_:)) where mp4.hasFileRepresentation && doc.isDocumentEdited == false:
|
||||
return true
|
||||
|
||||
case #selector(showTrackOffsetSheet(_:)) where tracksViewController.selectedTracks.isEmpty == false:
|
||||
case #selector(showTrackOffsetSheet(_:)) where doc.isMatroska == false && tracksViewController.selectedTracks.isEmpty == false:
|
||||
return true
|
||||
|
||||
case #selector(export(_:)) where tracksViewController.selectedTracks.isEmpty == false:
|
||||
@@ -249,6 +313,9 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
}
|
||||
|
||||
case #selector(DocumentWindowController.deleteTrack(_:)):
|
||||
// MKV documents allow deleting real tracks (stream-copy remux on
|
||||
// save) and the chapter pseudo-track (the Chapters element is
|
||||
// removed on save), so any non-empty selection is deletable.
|
||||
return tracksViewController.selectedTracks.isEmpty == false && NSApp.isActive
|
||||
|
||||
default:
|
||||
@@ -307,8 +374,58 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
delete(tracks: tracksViewController.selectedTracks)
|
||||
}
|
||||
|
||||
// Single-chapter insert that also bootstraps the chapter track, so it
|
||||
// works on documents without any chapters yet (both containers: on MKV
|
||||
// the new rows ride the remuxer on save, like the Chapters tab's edits).
|
||||
@IBAction func insertChapter(_ sender: Any) {
|
||||
let track: MP42ChapterTrack
|
||||
if let existing = mp4.chapters {
|
||||
track = existing
|
||||
} else {
|
||||
track = MP42ChapterTrack()
|
||||
mp4.addTrack(track) // addTrack: replaces any previous chapter track
|
||||
if doc.isMatroska {
|
||||
// addTrack: zeroes trackId; keep the table numbering dense.
|
||||
track.trackId = (mp4.tracks.map { $0.trackId }.max() ?? 0) + 1
|
||||
}
|
||||
}
|
||||
|
||||
// A brand-new track gets its first chapter at 0; inserting into an
|
||||
// existing track places the chapter 1s after the latest start, so it
|
||||
// never ties with a stored chapter (ties get clamped +1ms on write,
|
||||
// which would silently shift the user's own chapter times). The user
|
||||
// retimes/renames the row either way.
|
||||
var newTimestamp: UInt64 = 0
|
||||
if let last = track.chapters.max(by: { $0.timestamp < $1.timestamp }) {
|
||||
newTimestamp = last.timestamp + 1000
|
||||
if track.duration > last.timestamp + 1, newTimestamp >= track.duration {
|
||||
newTimestamp = track.duration - 1
|
||||
}
|
||||
}
|
||||
let index = track.addChapter("Chapter", timestamp: newTimestamp)
|
||||
|
||||
if doc.isMatroska {
|
||||
// The tags-only model has no muxing step to mark the document.
|
||||
doc.updateChangeCount(.changeDone)
|
||||
}
|
||||
|
||||
tracksViewController.reloadData()
|
||||
tracksViewController.selectTracks([track])
|
||||
chapterViewController?.selectChapter(at: Int(index))
|
||||
}
|
||||
|
||||
@IBAction func addChaptersEvery(_ sender: NSMenuItem) {
|
||||
let track: MP42ChapterTrack = mp4.chapters ?? { let track = MP42ChapterTrack(); self.mp4.addTrack(track); return track }()
|
||||
// Creates the chapter track when the document has none (same
|
||||
// bookkeeping as insertChapter: addTrack: zeroes trackId and the
|
||||
// tags-only model has no muxing step to mark the document dirty).
|
||||
let existing = mp4.chapters
|
||||
let track: MP42ChapterTrack = existing ?? MP42ChapterTrack()
|
||||
if existing == nil {
|
||||
mp4.addTrack(track) // addTrack: replaces any previous chapter track
|
||||
if doc.isMatroska {
|
||||
track.trackId = (mp4.tracks.map { $0.trackId }.max() ?? 0) + 1
|
||||
}
|
||||
}
|
||||
let minutes = sender.tag * 60 * 1000
|
||||
|
||||
if minutes > 0 {
|
||||
@@ -320,8 +437,12 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
track.addChapter("Chapter 1", timestamp: 0)
|
||||
}
|
||||
|
||||
doc.updateChangeCount(.changeDone)
|
||||
if doc.isMatroska {
|
||||
doc.updateChangeCount(.changeDone)
|
||||
}
|
||||
|
||||
tracksViewController.reloadData()
|
||||
tracksViewController.selectTracks([track])
|
||||
}
|
||||
|
||||
@IBAction func iTunesFriendlyTrackGroups(_ sender: Any) {
|
||||
@@ -329,7 +450,6 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
mp4.inferTracksLanguages()
|
||||
mp4.inferMediaCharacteristics()
|
||||
|
||||
doc.updateChangeCount(.changeDone)
|
||||
tracksViewController.reloadData()
|
||||
}
|
||||
|
||||
@@ -338,7 +458,6 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
track.name = ""
|
||||
}
|
||||
|
||||
doc.updateChangeCount(.changeDone)
|
||||
tracksViewController.reloadData()
|
||||
}
|
||||
|
||||
@@ -348,13 +467,11 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
track.name = track.prettyTrackName
|
||||
}
|
||||
|
||||
doc.updateChangeCount(.changeDone)
|
||||
tracksViewController.reloadData()
|
||||
}
|
||||
|
||||
@IBAction func fixAudioFallbacks(_ sender: Any) {
|
||||
mp4.setAutoFallback()
|
||||
doc.updateChangeCount(.changeDone)
|
||||
tracksViewController.reloadData()
|
||||
}
|
||||
|
||||
@@ -403,9 +520,10 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
func didSelect(metadata: MetadataResult) {
|
||||
let map = metadata.mediaKind == .movie ? MetadataPrefs.movieResultMap : MetadataPrefs.tvShowResultMap
|
||||
let keepEmptyKeys = MetadataPrefs.keepEmptyAnnotations
|
||||
let overwriteExisting = MetadataPrefs.overwriteExistingAnnotations
|
||||
|
||||
let result = metadata.mappedMetadata(to: map, keepEmptyKeys: keepEmptyKeys)
|
||||
mp4.metadata.merge(result)
|
||||
mp4.metadata.merge(result, overwrite: overwriteExisting)
|
||||
|
||||
if let hdType = mp4.hdType {
|
||||
for item in mp4.metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyHDVideo) {
|
||||
@@ -414,25 +532,60 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
mp4.metadata.addItem(MP42MetadataItem(identifier: MP42MetadataKeyHDVideo, value: NSNumber(value: hdType.rawValue),
|
||||
dataType: .integer, extendedLanguageTag: nil))
|
||||
}
|
||||
doc.updateChangeCount(.changeDone)
|
||||
metadataViewController?.metadata = mp4.metadata
|
||||
tracksViewController.selectTracks([])
|
||||
}
|
||||
|
||||
@IBAction func searchChapters(_ sender: Any?) {
|
||||
let name = mp4.metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyName).first?.stringValue
|
||||
let url = mp4.firstSourceURL ?? doc.fileURL
|
||||
let title = (name?.isEmpty == false ? name : url?.lastPathComponent) ?? ""
|
||||
let duration = UInt64(mp4.duration)
|
||||
|
||||
let controller = ChapterSearchController(delegate: self, title: title, duration: duration)
|
||||
contentViewController?.presentAsSheet(controller)
|
||||
}
|
||||
|
||||
func didSelect(chapters: [MP42TextSample]) {
|
||||
let chapterTrack = MP42ChapterTrack()
|
||||
for chapter in chapters {
|
||||
chapterTrack.addChapter(chapter)
|
||||
}
|
||||
|
||||
mp4.addTrack(chapterTrack) // addTrack: replaces any previous chapter track
|
||||
if doc.isMatroska {
|
||||
// Tags-only bookkeeping, same as addChapters/insertChapter:
|
||||
// addTrack: zeroes trackId, and nothing else marks the document.
|
||||
chapterTrack.trackId = (mp4.tracks.map { $0.trackId }.max() ?? 0) + 1
|
||||
doc.updateChangeCount(.changeDone)
|
||||
}
|
||||
tracksViewController.reloadData()
|
||||
tracksViewController.selectTracks([chapterTrack])
|
||||
}
|
||||
|
||||
// MARK: File import
|
||||
|
||||
private func addChapters(fileURL: URL) {
|
||||
mp4.addTrack(MP42ChapterTrack(fromFile: fileURL))
|
||||
|
||||
doc.updateChangeCount(.changeDone)
|
||||
let track = MP42ChapterTrack(fromFile: fileURL)
|
||||
mp4.addTrack(track) // replaces any previous chapter track
|
||||
if doc.isMatroska {
|
||||
// addTrack: zeroes trackId; keep the table numbering dense, and
|
||||
// flag the document dirty (the tags-only model has no muxing to
|
||||
// mark it, same as importSubtitleTracksForMatroska).
|
||||
track.trackId = (mp4.tracks.map { $0.trackId }.max() ?? 0) + 1
|
||||
doc.updateChangeCount(.changeDone)
|
||||
}
|
||||
tracksViewController.reloadData()
|
||||
tracksViewController.selectTracks([track])
|
||||
}
|
||||
|
||||
private func updateChapters(fileURL: URL) {
|
||||
do {
|
||||
try mp4.chapters?.update(fromCSVFile: fileURL)
|
||||
doc.updateChangeCount(.changeDone)
|
||||
if let track = mp4.chapters {
|
||||
chapterViewController?.track = track
|
||||
tracksViewController.selectTracks([track])
|
||||
if doc.isMatroska { doc.updateChangeCount(.changeDone) }
|
||||
}
|
||||
}
|
||||
catch {
|
||||
@@ -447,13 +600,13 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
private func addMetadata(fileURL: URL) {
|
||||
let ext = fileURL.pathExtension.lowercased()
|
||||
if ext == "xml" || ext == "nfo", let metadata = MP42Metadata(url: fileURL) {
|
||||
mp4.metadata.merge(metadata)
|
||||
doc.updateChangeCount(.changeDone)
|
||||
mp4.metadata.merge(metadata, overwrite: true)
|
||||
metadataViewController?.metadata = mp4.metadata
|
||||
tracksViewController.selectTracks([])
|
||||
} else if let file = try? MP42File(url: fileURL) {
|
||||
mp4.metadata.merge(file.metadata)
|
||||
doc.updateChangeCount(.changeDone)
|
||||
mp4.metadata.merge(file.metadata, overwrite: true)
|
||||
metadataViewController?.metadata = mp4.metadata
|
||||
tracksViewController.selectTracks([])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,7 +616,13 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
panel.allowsMultipleSelection = false
|
||||
panel.canChooseFiles = true
|
||||
panel.canChooseDirectories = false
|
||||
panel.allowedFileTypes = ["mp4", "m4v", "m4a", "xml", "nfo"]
|
||||
if #available(macOS 12, *) {
|
||||
panel.allowedContentTypes = [.mpeg4Movie, .mpeg4Audio,
|
||||
.appleProtectedMPEG4Video,
|
||||
.xml, UTType(filenameExtension: "nfo")!]
|
||||
} else {
|
||||
panel.allowedFileTypes = ["mp4", "m4v", "m4a", "xml", "nfo"]
|
||||
}
|
||||
|
||||
panel.beginSheetModal(for: windowForSheet) { (response) in
|
||||
if response == NSApplication.ModalResponse.OK, let url = panel.url {
|
||||
@@ -474,13 +633,47 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
|
||||
@IBAction func selectFile(_ sender: Any) {
|
||||
guard let windowForSheet = doc.windowForSheet else { return }
|
||||
let supportedFileFormats = MP42FileImporter.supportedFileFormats() + ["txt", "csv"]
|
||||
|
||||
let panel = NSOpenPanel()
|
||||
panel.allowsMultipleSelection = true
|
||||
panel.canChooseFiles = true
|
||||
panel.canChooseDirectories = false
|
||||
panel.allowedFileTypes = supportedFileFormats
|
||||
|
||||
if doc.isMatroska {
|
||||
// A Matroska document can gain subtitle text tracks (the
|
||||
// stream-copy remuxer writes them as S_TEXT/UTF8) and chapters
|
||||
// (.txt creates/replaces the chapter track, .csv updates an
|
||||
// existing one — same dispatch the MP4 branch uses below).
|
||||
let chapterExtensions = ["txt", "csv"]
|
||||
if #available(macOS 11, *) {
|
||||
panel.allowedContentTypes = (DocumentWindowController.matroskaSubtitleExtensions + chapterExtensions).compactMap {
|
||||
UTType(filenameExtension: $0)
|
||||
}
|
||||
} else {
|
||||
panel.allowedFileTypes = DocumentWindowController.matroskaSubtitleExtensions + chapterExtensions
|
||||
}
|
||||
panel.beginSheetModal(for: windowForSheet) { (response) in
|
||||
guard response == NSApplication.ModalResponse.OK else { return }
|
||||
var subtitleURLs: [URL] = []
|
||||
for url in panel.urls {
|
||||
switch url.pathExtension.lowercased() {
|
||||
case "txt": self.addChapters(fileURL: url)
|
||||
case "csv": self.updateChapters(fileURL: url)
|
||||
default: subtitleURLs.append(url)
|
||||
}
|
||||
}
|
||||
if subtitleURLs.isEmpty == false {
|
||||
self.showImportSheet(fileURLs: subtitleURLs)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if #available(macOS 11, *) {
|
||||
panel.allowedContentTypes = MP42FileImporter.supportedContentTypes() + [.text, .commaSeparatedText]
|
||||
} else {
|
||||
panel.allowedFileTypes = MP42FileImporter.supportedFileFormats() + ["txt", "csv"]
|
||||
}
|
||||
|
||||
panel.beginSheetModal(for: windowForSheet) { (response) in
|
||||
if response == NSApplication.ModalResponse.OK {
|
||||
@@ -498,7 +691,16 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
}
|
||||
}
|
||||
|
||||
/// Subtitle text files a Matroska document can gain — must stay in sync
|
||||
/// with the extension gate in MP42MkvRemuxer's added-track validation.
|
||||
static let matroskaSubtitleExtensions = ["srt", "ssa", "ass"]
|
||||
|
||||
func showImportSheet(fileURLs: [URL]) {
|
||||
if doc.isMatroska {
|
||||
importSubtitleTracksForMatroska(fileURLs: fileURLs)
|
||||
return
|
||||
}
|
||||
|
||||
do {
|
||||
let controller = try FileImportController(fileURLs: fileURLs, delegate: self)
|
||||
|
||||
@@ -518,9 +720,69 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
}
|
||||
}
|
||||
|
||||
// A Matroska document gains subtitle tracks by re-parsing the source text
|
||||
// file at save time (MP42MkvRemuxer writes S_TEXT/UTF8 BlockGroups), so
|
||||
// the model only needs the track object with its URL — no FileImportController
|
||||
// sheet, and crucially none of didSelect's organizeAlternateGroups/
|
||||
// inferMediaCharacteristics churn, which would shift model indices and
|
||||
// break the remuxer's TrackEntry↔sourceTracks identity pairing.
|
||||
func importSubtitleTracksForMatroska(fileURLs: [URL]) {
|
||||
let allowed = DocumentWindowController.matroskaSubtitleExtensions
|
||||
let subtitleURLs = fileURLs.filter { allowed.contains($0.pathExtension.lowercased()) }
|
||||
guard subtitleURLs.isEmpty == false else { return }
|
||||
|
||||
var addedTracks: [MP42Track] = []
|
||||
var nextDisplayId: MP42TrackId = (mp4.tracks.map { $0.trackId }.max() ?? 0) + 1
|
||||
for url in subtitleURLs {
|
||||
do {
|
||||
let importer = try MP42FileImporter(url: url)
|
||||
for track in importer.tracks {
|
||||
guard track.isMember(of: MP42ChapterTrack.self) == false else { continue }
|
||||
// Same addTrack: invariant the tags-only read establishes
|
||||
// (see Document.readMatroska) — codecs MP4 cannot carry
|
||||
// as-is must carry conversion settings.
|
||||
if trackNeedConversion(track.format) {
|
||||
(track as? MP42SubtitleTrack)?.conversionSettings = MP42ConversionSettings.subtitlesConversion()
|
||||
}
|
||||
mp4.addTrack(track)
|
||||
// addTrack: zeroes trackId; keep the table numbering dense.
|
||||
track.trackId = nextDisplayId
|
||||
nextDisplayId += 1
|
||||
addedTracks.append(track)
|
||||
}
|
||||
}
|
||||
catch {
|
||||
if let windowForSheet = doc.windowForSheet {
|
||||
presentError(error, modalFor: windowForSheet, delegate: nil, didPresent: nil, contextInfo: nil)
|
||||
} else {
|
||||
presentError(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
guard addedTracks.isEmpty == false else { return }
|
||||
doc.updateChangeCount(.changeDone)
|
||||
tracksViewController.reloadData()
|
||||
tracksViewController.selectTracks(addedTracks)
|
||||
}
|
||||
|
||||
@objc func importFilesDirectly(_ fileURLs: [URL]) {
|
||||
// Mirror the open panel's extension routing (selectFile): chapter
|
||||
// text files go to the chapter commands — addChapters bootstraps the
|
||||
// chapter track on both containers — everything else to the regular
|
||||
// track importer.
|
||||
var mediaURLs: [URL] = []
|
||||
for url in fileURLs {
|
||||
switch url.pathExtension.lowercased() {
|
||||
case "txt": addChapters(fileURL: url)
|
||||
case "csv": updateChapters(fileURL: url)
|
||||
default: mediaURLs.append(url)
|
||||
}
|
||||
}
|
||||
guard mediaURLs.isEmpty == false else { return }
|
||||
|
||||
do {
|
||||
let controller = try FileImportController(fileURLs: fileURLs, delegate: self)
|
||||
let controller = try FileImportController(fileURLs: mediaURLs, delegate: self)
|
||||
|
||||
// Call addTracks directly - the Settings initialization logic runs when the controller is created
|
||||
controller.addTracks(self)
|
||||
@@ -539,9 +801,11 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
mp4.addTrack(track)
|
||||
}
|
||||
|
||||
if tracks.isEmpty == false {
|
||||
doc.updateChangeCount(.changeDone)
|
||||
|
||||
// Reordering must never touch a Matroska document: the remuxer pairs
|
||||
// TrackEntry elements against the saver's importer-order snapshot by
|
||||
// identity, and a reordered model would mispair them (same rule as
|
||||
// delete(tracks:)).
|
||||
if tracks.isEmpty == false, doc.isMatroska == false {
|
||||
if Prefs.organizeAlternateGroups {
|
||||
mp4.organizeAlternateGroups()
|
||||
if Prefs.inferMediaCharacteristics {
|
||||
@@ -551,13 +815,17 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
}
|
||||
}
|
||||
|
||||
if let metadata = metadata {
|
||||
mp4.metadata.merge(metadata)
|
||||
doc.updateChangeCount(.changeDone)
|
||||
metadataViewController?.metadata = mp4.metadata
|
||||
if let metadata, metadata.items.isEmpty == false {
|
||||
mp4.metadata.merge(metadata, overwrite: true)
|
||||
}
|
||||
|
||||
tracksViewController.reloadData()
|
||||
|
||||
if let metadata, metadata.items.isEmpty == false {
|
||||
tracksViewController.selectTracks([])
|
||||
} else if tracks.isEmpty == false {
|
||||
tracksViewController.selectTracks(tracks)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Drag & drop
|
||||
@@ -578,8 +846,18 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
let items = pasteboard.readObjects(forClasses: [NSURL.classForCoder()], options: [:]) as? [URL]
|
||||
else { return false }
|
||||
|
||||
let chapters = items.filter { $0.pathExtension.lowercased() == "txt" }
|
||||
if let url = chapters.first {
|
||||
// Metadata drops are fine in tags-only mode. Chapters ride the
|
||||
// remuxer on Matroska documents, so txt/csv drops route there too;
|
||||
// everything else that would add a track goes through the import
|
||||
// panel (which routes Matroska docs to the subtitle-only path).
|
||||
if doc.isMatroska {
|
||||
if let url = items.first(where: { $0.pathExtension.lowercased() == "txt" }) {
|
||||
addChapters(fileURL: url)
|
||||
}
|
||||
if let url = items.first(where: { $0.pathExtension.lowercased() == "csv" }) {
|
||||
updateChapters(fileURL: url)
|
||||
}
|
||||
} else if let url = items.first(where: { $0.pathExtension.lowercased() == "txt" }) {
|
||||
addChapters(fileURL: url)
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,16 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
|
||||
tag: 0,
|
||||
enabled: needsConversion == false)
|
||||
actions.append(action)
|
||||
|
||||
|
||||
// PGS can be kept as bitmap subtitles: the muxer converts the
|
||||
// stream to VobSub (sup2vob) and writes a real MP4 subp track.
|
||||
if track.format == kMP42SubtitleCodecType_PGS {
|
||||
let bitmapAction = Action(title: NSLocalizedString("VobSub", comment: "File Import action menu item."),
|
||||
tag: 2,
|
||||
enabled: true)
|
||||
actions.append(bitmapAction)
|
||||
}
|
||||
|
||||
if (needsConversion || track.format == kMP42SubtitleCodecType_VobSub) {
|
||||
let conversionAction = Action(title: NSLocalizedString("Tx3g", comment: "File Import action menu item."),
|
||||
tag: 1,
|
||||
@@ -157,6 +166,11 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
|
||||
}
|
||||
}
|
||||
}
|
||||
// PGS: keep it bitmap — VobSub by default, tx3g only if the
|
||||
// user's bitmap-subtitles-to-tx3g preference says so
|
||||
else if track.format == kMP42SubtitleCodecType_PGS {
|
||||
self.selectedActionTag = Prefs.subtitleConvertBitmap ? 1 : 2
|
||||
}
|
||||
// Vobsub
|
||||
else if track.format == kMP42SubtitleCodecType_VobSub && Prefs.subtitleConvertBitmap {
|
||||
self.selectedActionTag = 1
|
||||
@@ -371,7 +385,10 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
|
||||
|
||||
case let track as MP42SubtitleTrack:
|
||||
|
||||
if trackSettings.selectedActionTag > 0 {
|
||||
if trackSettings.selectedActionTag == 2 {
|
||||
// PGS → VobSub: mux as a bitmap subp track (sup2vob)
|
||||
track.conversionSettings = MP42ConversionSettings.subtitlesVobSubConversion()
|
||||
} else if trackSettings.selectedActionTag > 0 {
|
||||
track.conversionSettings = MP42ConversionSettings.subtitlesConversion()
|
||||
}
|
||||
selectedTracks.append(trackSettings.track)
|
||||
@@ -455,6 +472,7 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
|
||||
case checkColumn?:
|
||||
let cell = tableView.makeView(withIdentifier: checkColumn, owner:self) as? CheckBoxCellView
|
||||
cell?.checkboxButton?.state = settings.checked ? .on : .off
|
||||
cell?.checkboxButton?.isEnabled = settings.importable
|
||||
return cell
|
||||
|
||||
case trackIdColumn?:
|
||||
|
||||
@@ -23,6 +23,84 @@ class GeneralPrefsViewController: NSViewController {
|
||||
return "GeneralPrefsViewController"
|
||||
}
|
||||
|
||||
// MARK: Save As location popUp
|
||||
|
||||
@IBOutlet var saveLocationPopUp: NSPopUpButton!
|
||||
|
||||
private let customLocationTag = 2
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
prepareSaveLocationPopUp()
|
||||
}
|
||||
|
||||
private func menuItem(url: URL) -> NSMenuItem {
|
||||
let icon = NSWorkspace.shared.icon(forFile: url.path)
|
||||
icon.size = NSSize(width: 16, height: 16)
|
||||
|
||||
let values = try? url.resourceValues(forKeys: [.localizedNameKey])
|
||||
let title = values?.localizedName ?? url.lastPathComponent
|
||||
|
||||
let item = NSMenuItem(title: title, action: #selector(setSaveLocation(_:)), keyEquivalent: "")
|
||||
item.image = icon
|
||||
item.target = self
|
||||
item.representedObject = url
|
||||
item.toolTip = url.path
|
||||
item.tag = customLocationTag
|
||||
return item
|
||||
}
|
||||
|
||||
/// Rebuilds the custom folder item, then selects the current location.
|
||||
private func prepareSaveLocationPopUp() {
|
||||
guard let menu = saveLocationPopUp.menu else { return }
|
||||
|
||||
if let item = menu.items.first(where: { $0.tag == customLocationTag }) {
|
||||
menu.removeItem(item)
|
||||
}
|
||||
|
||||
if let url = Prefs.saveAsCustomLocation {
|
||||
menu.insertItem(NSMenuItem.separator(), at: 2)
|
||||
menu.insertItem(menuItem(url: url), at: 3)
|
||||
}
|
||||
|
||||
selectCurrentSaveLocation()
|
||||
}
|
||||
|
||||
private func selectCurrentSaveLocation() {
|
||||
let location = Prefs.saveAsLocation
|
||||
|
||||
if location == .custom && Prefs.saveAsCustomLocation == nil {
|
||||
saveLocationPopUp.selectItem(withTag: SaveAsLocation.automatic.rawValue)
|
||||
} else {
|
||||
saveLocationPopUp.selectItem(withTag: location.rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func setSaveLocation(_ sender: NSMenuItem) {
|
||||
if let url = sender.representedObject as? URL {
|
||||
Prefs.saveAsCustomLocation = url
|
||||
Prefs.saveAsLocation = .custom
|
||||
} else {
|
||||
Prefs.saveAsLocation = SaveAsLocation(rawValue: sender.tag) ?? .automatic
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func chooseSaveLocation(_ sender: Any) {
|
||||
let panel = NSOpenPanel()
|
||||
panel.allowsMultipleSelection = false
|
||||
panel.canChooseFiles = false
|
||||
panel.canChooseDirectories = true
|
||||
panel.canCreateDirectories = true
|
||||
|
||||
panel.begin { response in
|
||||
if response == .OK, let url = panel.url {
|
||||
Prefs.saveAsCustomLocation = url
|
||||
Prefs.saveAsLocation = .custom
|
||||
}
|
||||
self.prepareSaveLocationPopUp()
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func clearRecentSearches(_ sender: Any) {
|
||||
MetadataSearchController.clearRecentSearches()
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ final class Logger : NSObject, MP42Logging {
|
||||
private static func appSupportURL() -> URL {
|
||||
let fileManager = FileManager.default
|
||||
if let url = fileManager.urls(for: .applicationSupportDirectory, in: .userDomainMask)
|
||||
.first?.appendingPathComponent("Subler") {
|
||||
.first?.appendingPathComponent("SublerMKV") {
|
||||
|
||||
do {
|
||||
if fileManager.fileExists(atPath: url.path) == false {
|
||||
|
||||
@@ -27,7 +27,7 @@ extension MP42File {
|
||||
var hdType: TrackHDType? {
|
||||
for track in tracks(withMediaType: kMP42MediaType_Video) as! [MP42VideoTrack] {
|
||||
if (track.width > 1920 && track.height > 1088) {
|
||||
return nil // .hd4k 4k breaks AppleTV streaming
|
||||
return Prefs.set4KHDVideoMetadata ? .hd4k : nil
|
||||
} else if (track.width > 1280 || track.height > 720) && track.width <= 1920 && track.height <= 1088 {
|
||||
return .hd1080p
|
||||
} else if track.width >= 960 && track.height >= 720 || track.width >= 1280 {
|
||||
@@ -91,6 +91,10 @@ extension MP42File {
|
||||
}
|
||||
}
|
||||
|
||||
func firstSourceDirectoryURL() -> URL? {
|
||||
return tracks.compactMap { $0.url }.first?.deletingLastPathComponent()
|
||||
}
|
||||
|
||||
func formattedFileName() -> String? {
|
||||
guard let mediaKindValue = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyMediaKind).first?.numberValue?.intValue,
|
||||
let mediaKind = MediaKind(rawValue: mediaKindValue)
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
//
|
||||
// MatroskaSaver.swift
|
||||
// Subler
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MP42Foundation
|
||||
|
||||
/// Owns the on-disk baseline of a tags-only Matroska source file and writes
|
||||
/// model changes back into it with the window's save semantics: in-place
|
||||
/// metadata/track-field retagging via MP42MkvTagWriter, or a stream-copy
|
||||
/// rebuild via MP42MkvRemuxer when the edit is structural (deleted/added
|
||||
/// tracks, chapter changes), when a full rebuild is forced (optimize,
|
||||
/// Save-As-style different destination), never producing an MP4.
|
||||
///
|
||||
/// Shared by Document (window saves) and QueueItem (queue retags MKVs in
|
||||
/// place instead of converting them) so the pairing/staleness bookkeeping
|
||||
/// cannot drift between the two save paths.
|
||||
final class MatroskaSaver {
|
||||
|
||||
private var sourceURL: URL
|
||||
// Tracks exactly as the importer produced them (file order, chapter
|
||||
// pseudo-track filtered): the baseline MP42MkvRemuxer pairs TrackEntry
|
||||
// elements against, so a deleted track is detected by object identity.
|
||||
private var sourceTracks: [MP42Track]
|
||||
// Chapter rows as the file's baseline holds them (model milliseconds,
|
||||
// plus the track-level chapter language the remuxer stamps as
|
||||
// ChapterLanguage). nil when the last read/written file had no chapters.
|
||||
// Compared model-vs-snapshot against the model on save: because the
|
||||
// importer itself drops some atoms (duplicate zero timestamps), those
|
||||
// silently-dropped atoms must not look like edits.
|
||||
private var chaptersSnapshot: [(timestamp: UInt64, title: String, language: String)]?
|
||||
// The tag writer refuses to overwrite a file that changed on disk since
|
||||
// we read it; NSDocument doesn't perform that check for us here (and the
|
||||
// queue certainly doesn't).
|
||||
private var fileSize: UInt64 = 0
|
||||
private var fileModificationDate: Date?
|
||||
|
||||
private var activeWriter: MP42MkvTagWriter?
|
||||
private var activeRemuxer: MP42MkvRemuxer?
|
||||
|
||||
// Called on the writing thread; hosts forward it to their progress UI
|
||||
// (the window's save sheet listens on the model's progress handler, the
|
||||
// queue on its delegate).
|
||||
var progressHandler: ((Double) -> Void)?
|
||||
|
||||
/// Builds the tags-only display model for a Matroska importer: metadata
|
||||
/// merged in, every importer track added (chapter pseudo-track included)
|
||||
/// with 1-based display trackIds like MKV players number tracks.
|
||||
///
|
||||
/// The returned file's undo manager is deliberately not wired yet — the
|
||||
/// caller wires it after this returns so these addTrack: calls do not
|
||||
/// open undo groups.
|
||||
static func buildModel(from importer: MP42FileImporter) -> MP42File {
|
||||
let file = MP42File()
|
||||
file.metadata.merge(importer.metadata, overwrite: true)
|
||||
var displayTrackId: MP42TrackId = 0
|
||||
for track in importer.tracks {
|
||||
// -[MP42File addTrack:] asserts that tracks whose codec cannot be
|
||||
// muxed into MP4 as-is (mp3, vorbis, srt, pgs, …) carry conversion
|
||||
// settings. Tags-only documents never mux these tracks, but
|
||||
// satisfy the invariant with the same defaults the convert-import
|
||||
// flow uses (see FileImportController.addTracks).
|
||||
if trackNeedConversion(track.format), track.isMember(of: MP42ChapterTrack.self) == false {
|
||||
switch track {
|
||||
case let audioTrack as MP42AudioTrack:
|
||||
audioTrack.conversionSettings = MP42AudioConversionSettings.audioConversion(withBitRate: Prefs.audioBitrate,
|
||||
mixDown: MP42AudioMixdown(Prefs.audioMixdown),
|
||||
drc: Prefs.audioDRC)
|
||||
case let subtitleTrack as MP42SubtitleTrack:
|
||||
subtitleTrack.conversionSettings = MP42ConversionSettings.subtitlesConversion()
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
file.addTrack(track)
|
||||
// addTrack: zeroes trackId (pending-mux bookkeeping, the real
|
||||
// IDs come from the muxer) and tags-only documents are never
|
||||
// muxed, so assign display IDs 1-based like MKV players number
|
||||
// tracks. The chapter track is numbered too, matching how the
|
||||
// muxer would eventually number it.
|
||||
displayTrackId += 1
|
||||
track.trackId = displayTrackId
|
||||
}
|
||||
return file
|
||||
}
|
||||
|
||||
/// - parameter model: the tags-only model built by `buildModel(from:)`
|
||||
/// from this same `importer` (track identity is the pairing baseline).
|
||||
init(sourceURL: URL, importer: MP42FileImporter, model: MP42File) {
|
||||
self.sourceURL = sourceURL
|
||||
// Order-sensitive snapshot for the remuxer's TrackEntry pairing; the
|
||||
// chapter pseudo-track has no TrackEntry and must not shift positions.
|
||||
self.sourceTracks = importer.tracks.filter { $0.isMember(of: MP42ChapterTrack.self) == false }
|
||||
self.chaptersSnapshot = Self.chapterRows(model.chapters)
|
||||
snapshotSourceFile()
|
||||
}
|
||||
|
||||
// MARK: Save
|
||||
|
||||
/// Writes the model back with the window's save branching.
|
||||
///
|
||||
/// - parameter forceStructural: forces the remuxer rebuild even without
|
||||
/// detected model changes — what the window passes for optimize and
|
||||
/// Save-As, and what the queue passes when the destination differs
|
||||
/// from the source (a renamed output or a queue destination folder).
|
||||
func save(model: MP42File, to url: URL, forceStructural: Bool) throws {
|
||||
guard MP42FileImporter.isMatroskaFileType(url.pathExtension) else {
|
||||
throw NSError(domain: NSCocoaErrorDomain, code: NSFileWriteUnknownError,
|
||||
userInfo: [NSLocalizedDescriptionKey: NSLocalizedString("Matroska documents can only be saved as a .mkv, .mka or .mks file.", comment: "Document MKV save destination type error.")])
|
||||
}
|
||||
|
||||
let currentTracks = model.tracks.filter { $0.isMember(of: MP42ChapterTrack.self) == false }
|
||||
// Structural change == some importer-created track is gone, or the
|
||||
// model carries a track the importer never produced (an imported
|
||||
// subtitle). Tracks are paired by object identity, so a reordered
|
||||
// (impossible: reorder is gated on MKV docs) or merely renamed track
|
||||
// still compares equal.
|
||||
let tracksChanged = currentTracks.count != sourceTracks.count ||
|
||||
currentTracks.contains { track in sourceTracks.contains(where: { $0 === track }) == false }
|
||||
// Chapters ride the remuxer too: the Chapters element sits before the
|
||||
// Clusters, so any size change shifts every following byte (the tag
|
||||
// writer's in-place machinery is tail-only). An added-but-empty
|
||||
// chapter track means "delete every chapter" — the remuxer removes
|
||||
// the element.
|
||||
let modelChapterRows = Self.chapterRows(model.chapters)
|
||||
let chaptersChanged: Bool
|
||||
switch (modelChapterRows, chaptersSnapshot) {
|
||||
case (nil, nil): chaptersChanged = false
|
||||
case let (model?, snapshot?):
|
||||
chaptersChanged = model.count != snapshot.count ||
|
||||
zip(model, snapshot).contains { $0.timestamp != $1.timestamp
|
||||
|| $0.title != $1.title || $0.language != $1.language }
|
||||
default: chaptersChanged = true
|
||||
}
|
||||
|
||||
// A forced rebuild is the Matroska equivalent of reordering atoms:
|
||||
// rebuilding the whole file — blocks stream-copied verbatim,
|
||||
// Tracks/Tags rewritten, SeekHead and Cues regenerated — i.e.
|
||||
// exactly the Save-As pass, done in place through the remuxer's
|
||||
// temp file + atomic rename when the destination is the source.
|
||||
if tracksChanged || chaptersChanged || forceStructural {
|
||||
// An absent model track means "no chapters" — pass an empty
|
||||
// track so the remuxer removes the element rather than copying
|
||||
// the old one verbatim (nil replacement = verbatim).
|
||||
try remux(model: model, to: url, currentTracks: currentTracks,
|
||||
replacementChapters: chaptersChanged ? (model.chapters ?? MP42ChapterTrack()) : nil)
|
||||
return
|
||||
}
|
||||
|
||||
let writer = MP42MkvTagWriter(url: url)
|
||||
writer.expectedFileSize = fileSize
|
||||
writer.expectedModificationDate = fileModificationDate
|
||||
writer.progressHandler = { [weak self] progress in
|
||||
self?.progressHandler?(progress)
|
||||
}
|
||||
activeWriter = writer
|
||||
defer { activeWriter = nil }
|
||||
// Track edits (name/language/enabled/subtitle forced) ride along; the
|
||||
// chapter pseudo-track is skipped by the writer.
|
||||
try writer.write(model.metadata, tracks: model.tracks)
|
||||
// The file we just wrote is the new baseline for the staleness check.
|
||||
snapshotSourceFile()
|
||||
}
|
||||
|
||||
func cancel() {
|
||||
activeWriter?.cancel()
|
||||
activeRemuxer?.cancel()
|
||||
}
|
||||
|
||||
// MARK: Remux
|
||||
|
||||
// Stream-copy rebuild: blocks are copied verbatim except those of removed
|
||||
// tracks, and metadata/cover/track-field edits ride in the same pass.
|
||||
// Writes a temp file and renames atomically; see MP42MkvRemuxer.h.
|
||||
private func remux(model: MP42File, to url: URL, currentTracks: [MP42Track],
|
||||
replacementChapters: MP42ChapterTrack?) throws {
|
||||
let remuxer = MP42MkvRemuxer(sourceURL: sourceURL)
|
||||
remuxer.expectedFileSize = fileSize
|
||||
remuxer.expectedModificationDate = fileModificationDate
|
||||
remuxer.progressHandler = { [weak self] progress in
|
||||
self?.progressHandler?(progress)
|
||||
}
|
||||
// nil keeps the source Chapters element verbatim.
|
||||
remuxer.replacementChapters = replacementChapters
|
||||
activeRemuxer = remuxer
|
||||
defer { activeRemuxer = nil }
|
||||
try remuxer.remux(to: url, metadata: model.metadata,
|
||||
sourceTracks: sourceTracks, currentTracks: currentTracks)
|
||||
// The written file's chapters are exactly what the model holds now
|
||||
// (modulo the writer's own sort/clamp, which the model then absorbs
|
||||
// on the next read — an untouched save must not look "changed").
|
||||
chaptersSnapshot = Self.chapterRows(model.chapters)
|
||||
// The output keeps the surviving TrackEntry elements in source file
|
||||
// order and appends one TrackEntry per added subtitle track last
|
||||
// (MP42MkvRemuxer), so re-snapshot the pairing baseline in that same
|
||||
// order — otherwise the appended track would look "added" again on
|
||||
// the next save and the TrackEntry count would mispair.
|
||||
let addedTracks = currentTracks.filter { track in
|
||||
sourceTracks.contains(where: { $0 === track }) == false
|
||||
}
|
||||
sourceTracks = sourceTracks.filter { track in
|
||||
currentTracks.contains(where: { $0 === track })
|
||||
} + addedTracks
|
||||
// A Save-As-style different destination becomes the new source: the
|
||||
// next save reads/pairs against the file we just wrote.
|
||||
if url != sourceURL {
|
||||
sourceURL = url
|
||||
}
|
||||
snapshotSourceFile()
|
||||
}
|
||||
|
||||
// MARK: Baseline helpers
|
||||
|
||||
private func snapshotSourceFile() {
|
||||
let attributes = try? FileManager.default.attributesOfItem(atPath: sourceURL.path)
|
||||
fileSize = (attributes?[.size] as? NSNumber)?.uint64Value ?? 0
|
||||
fileModificationDate = attributes?[.modificationDate] as? Date
|
||||
}
|
||||
|
||||
private static func chapterRows(_ track: MP42ChapterTrack?)
|
||||
-> [(timestamp: UInt64, title: String, language: String)]? {
|
||||
guard let track else { return nil }
|
||||
// The language is track-level; repeated per row so the zip comparison
|
||||
// above covers language-only edits.
|
||||
let language = track.language
|
||||
return track.chapters.map { ($0.timestamp, $0.title, language) }
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,7 @@ private extension MetadataResult {
|
||||
}
|
||||
|
||||
self.remoteArtworks = [item.images.coverArt16X9, item.images.coverArt].compactMap { $0?.artwork(type: .poster) }
|
||||
self.remoteArtworks += [item.images.previewFrame].compactMap { $0?.artwork(type: .backdrop) }
|
||||
self.remoteArtworks += [episode.seasonImages.coverArt16X9, episode.seasonImages.coverArt].compactMap { $0?.artwork(type: .season) }
|
||||
self.remoteArtworks += [episode.images.previewFrame].compactMap { $0?.artwork(type: .episode) }
|
||||
}
|
||||
@@ -163,9 +164,14 @@ public struct AppleTV: MetadataService {
|
||||
|
||||
if let season = metadata[.season] as? Int {
|
||||
let index = metadata.remoteArtworks.count > 1 ? 1 : 0
|
||||
metadata.remoteArtworks.insert(contentsOf: searchSeasons(id: id, season: season, store: store), at: index)
|
||||
let seasonArtworks = searchSeasons(id: id, season: season, store: store)
|
||||
|
||||
if let season16x9 = seasonArtworks.first(where: { $0.size == .rectangle } ) {
|
||||
metadata.remoteArtworks.insert(season16x9, at: index)
|
||||
}
|
||||
}
|
||||
|
||||
metadata.remoteArtworks.sortTopPicks(service: self.name)
|
||||
return metadata
|
||||
}
|
||||
|
||||
@@ -221,7 +227,8 @@ public struct AppleTV: MetadataService {
|
||||
let urlString = "\(seasonsURL)\(id)/itunesSeasons?sf=\(store.storeCode)&locale=\(store.language2)\(options)"
|
||||
if let url = URL(string: urlString), let results = sendJSONRequest(url: url, type: Wrapper<Seasons>.self) {
|
||||
let filteredResults = results.data.seasons.values.joined().filter { $0.seasonNumber == season }
|
||||
return filteredResults.compactMap { $0.images.coverArt16X9?.artwork(type: .season) }
|
||||
return filteredResults.compactMap { $0.images.coverArt16X9?.artwork(type: .season) } +
|
||||
filteredResults.compactMap { $0.images.coverArt?.artwork(type: .season) }
|
||||
}
|
||||
return []
|
||||
}
|
||||
@@ -236,7 +243,7 @@ public struct AppleTV: MetadataService {
|
||||
let items = results.data.canvas?.shelves.first?.items
|
||||
.filter { $0.type == type.description }
|
||||
|
||||
if let result = items?.filter({ $0.title == normalizedTerm }).first {
|
||||
if let result = items?.filter({ $0.title?.caseInsensitiveCompare(normalizedTerm) == .orderedSame }).first {
|
||||
return result
|
||||
} else if let result = items?.filter({ $0.title?.minimumEditDistance(other: normalizedTerm) ?? Int.max < 8 }).first {
|
||||
return result
|
||||
@@ -247,15 +254,29 @@ public struct AppleTV: MetadataService {
|
||||
|
||||
if let filteredResult = filteredResult {
|
||||
|
||||
if let artworks = filteredResult.images.coverArt16X9?.artwork(type: .poster) {
|
||||
var artworksSet = Set<Artwork>()
|
||||
|
||||
if case let MediaType.tvShow(season) = type {
|
||||
if let season = season {
|
||||
return [artworks] + searchSeasons(id: filteredResult.id, season: season, store: store)
|
||||
if let poster = filteredResult.images.coverArt16X9?.artwork(type: .poster) {
|
||||
artworksSet.insert(poster)
|
||||
}
|
||||
|
||||
if let poster = filteredResult.images.coverArt?.artwork(type: .poster) {
|
||||
artworksSet.insert(poster)
|
||||
}
|
||||
|
||||
if case let MediaType.tvShow(season) = type {
|
||||
if let season = season {
|
||||
let seasonArtworks = searchSeasons(id: filteredResult.id, season: season, store: store)
|
||||
if let season16x9 = seasonArtworks.first(where: { $0.size == .rectangle } ) {
|
||||
artworksSet.insert(season16x9)
|
||||
}
|
||||
if let seasonSquare = seasonArtworks.first(where: { $0.size == .square } ) {
|
||||
artworksSet.insert(seasonSquare)
|
||||
}
|
||||
}
|
||||
return [artworks]
|
||||
}
|
||||
|
||||
return Array(artworksSet)
|
||||
}
|
||||
}
|
||||
return []
|
||||
|
||||
@@ -9,9 +9,18 @@ import Foundation
|
||||
|
||||
// MARK: - Filename
|
||||
|
||||
/// A metadata service ID embedded in the file name (e.g. `{tmdb-1015812}`).
|
||||
public enum MetadataFileID: Equatable {
|
||||
case tmdb(Int)
|
||||
case tvdb(Int)
|
||||
/// Normalized to the `tt…` form, leading zeros preserved.
|
||||
case imdb(String)
|
||||
}
|
||||
|
||||
public enum MetadataSearchTerms {
|
||||
case none
|
||||
case movie(title: String)
|
||||
/// `id` is a metadata service ID parsed from the file name, when present.
|
||||
case movie(title: String, id: MetadataFileID? = nil)
|
||||
case tvShow(seriesName: String, season: Int?, episode: Int?)
|
||||
|
||||
public var isMovie: Bool { get {
|
||||
@@ -54,6 +63,30 @@ private func parseAnimeFilename(_ filename: String) -> MetadataSearchTerms? {
|
||||
return result
|
||||
}
|
||||
|
||||
/// Parses the `id:<kind>:<value>` line emitted by ParseFilename.pl, when present.
|
||||
private func parseFileID(_ lines: [Substring]) -> MetadataFileID? {
|
||||
guard let idLine = lines.first(where: { $0.hasPrefix("id:") }) else { return nil }
|
||||
|
||||
let components = idLine.dropFirst(3).split(separator: ":", omittingEmptySubsequences: false)
|
||||
guard components.count == 2, components[1].isEmpty == false else { return nil }
|
||||
|
||||
let kind = components[0]
|
||||
let value = components[1]
|
||||
|
||||
switch kind {
|
||||
case "tmdb":
|
||||
return Int(value).map(MetadataFileID.tmdb)
|
||||
case "tvdb":
|
||||
return Int(value).map(MetadataFileID.tvdb)
|
||||
case "imdb", "tt":
|
||||
// The parser strips the `tt` prefix from IMDb IDs; the find API wants it back.
|
||||
return .imdb("tt" + value)
|
||||
default:
|
||||
// A bare number with no known prefix is too ambiguous for a direct lookup.
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
private func parseFilename(_ filename: String) -> MetadataSearchTerms? {
|
||||
guard let path = Bundle.main.path(forResource: "ParseFilename", ofType: "") else { return nil }
|
||||
|
||||
@@ -86,7 +119,7 @@ private func parseFilename(_ filename: String) -> MetadataSearchTerms? {
|
||||
.replacingOccurrences(of: "[", with: " ")
|
||||
.replacingOccurrences(of: "]", with: " ")
|
||||
.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
|
||||
return MetadataSearchTerms.movie(title: newTitle)
|
||||
return MetadataSearchTerms.movie(title: newTitle, id: parseFileID(lines))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,10 +62,22 @@ public protocol MetadataService {
|
||||
func loadTVMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult
|
||||
|
||||
func search(movie: String, language: String) -> [MetadataResult]
|
||||
func search(movieID id: MetadataFileID, language: String) -> [MetadataResult]
|
||||
func loadMovieMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult
|
||||
|
||||
}
|
||||
|
||||
public extension MetadataService {
|
||||
|
||||
/// Direct lookup of a movie by an ID embedded in the file name.
|
||||
/// The default implementation answers an empty result, which callers treat
|
||||
/// as "not supported/not found" and fall back to the title search.
|
||||
func search(movieID id: MetadataFileID, language: String) -> [MetadataResult] {
|
||||
return []
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum MetadataNameSearch {
|
||||
case tvNameSearch(service: MetadataService, tvShow: String, language: String)
|
||||
|
||||
@@ -95,6 +107,7 @@ public enum MetadataType : Int, CustomStringConvertible, Codable {
|
||||
|
||||
public enum MetadataSearch {
|
||||
case movieSeach(service: MetadataService, movie: String, language: String)
|
||||
case movieIDSearch(service: MetadataService, id: MetadataFileID, language: String)
|
||||
case tvSearch(service: MetadataService, tvShow: String, season: Int?, episode: Int?, language: String)
|
||||
|
||||
public func search(completionHandler: @escaping ([MetadataResult]) -> Void) -> Runnable {
|
||||
@@ -102,6 +115,9 @@ public enum MetadataSearch {
|
||||
case let .movieSeach(service, movie, language):
|
||||
return RunnableTask(search: service.search(movie: movie, language: language),
|
||||
completionHandler: completionHandler)
|
||||
case let .movieIDSearch(service, id, language):
|
||||
return RunnableTask(search: service.search(movieID: id, language: language),
|
||||
completionHandler: completionHandler)
|
||||
case let .tvSearch(service, tvShow, season, episode, language):
|
||||
return RunnableTask(search: service.search(tvShow: tvShow, language: language, season: season, episode: episode),
|
||||
completionHandler: completionHandler)
|
||||
@@ -113,6 +129,10 @@ public enum MetadataSearch {
|
||||
case let .movieSeach(service, _, language):
|
||||
return RunnableTask(search: service.loadMovieMetadata(metadata, language: language),
|
||||
completionHandler: completionHandler)
|
||||
case .movieIDSearch:
|
||||
// The ID lookup already returns the full movie details.
|
||||
return RunnableTask(search: metadata,
|
||||
completionHandler: completionHandler)
|
||||
case let .tvSearch(service, _, _, _, language):
|
||||
return RunnableTask(search: service.loadTVMetadata(metadata, language: language),
|
||||
completionHandler: completionHandler)
|
||||
@@ -121,7 +141,7 @@ public enum MetadataSearch {
|
||||
|
||||
public var type: MetadataType {
|
||||
switch self {
|
||||
case .movieSeach:
|
||||
case .movieSeach, .movieIDSearch:
|
||||
return .movie
|
||||
case .tvSearch:
|
||||
return .tvShow
|
||||
|
||||
@@ -113,6 +113,55 @@ public struct Artwork: Equatable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
extension Array where Element == Artwork {
|
||||
|
||||
func first(by type: ArtworkType, size: ArtworkSize, service: String) -> Artwork? {
|
||||
if type == .backdrop || type == .episode {
|
||||
let serviceArtwork = self.filter { $0.type == type && $0.service == service }.first
|
||||
let artwork = self.filter { $0.type == type }.first
|
||||
return serviceArtwork != nil ? serviceArtwork : artwork
|
||||
}
|
||||
else {
|
||||
let serviceArtwork = self.filter { $0.type == type && $0.size == size && $0.service == service }.first
|
||||
let artwork = self.filter { $0.type == type && $0.size == size}.first
|
||||
return serviceArtwork != nil ? serviceArtwork : artwork
|
||||
}
|
||||
}
|
||||
|
||||
mutating func sortTopPicks(service: String) {
|
||||
let poster = first(by: .poster, size: .standard, service: service)
|
||||
let posterRect = first(by: .poster, size: .rectangle, service: AppleTV().name)
|
||||
let posterSquare = first(by: .poster, size: .square, service: AppleTV().name)
|
||||
let season = first(by: .season, size: .standard, service: service)
|
||||
let seasonRect = first(by: .season, size: .rectangle, service: AppleTV().name)
|
||||
let seasonSquare = first(by: .season, size: .square, service: AppleTV().name)
|
||||
let backdrop = first(by: .backdrop, size: .standard, service: service)
|
||||
let episode = first(by: .episode, size: .standard, service: service)
|
||||
|
||||
let topPicks = [poster, posterRect, posterSquare,
|
||||
season, seasonRect, seasonSquare,
|
||||
backdrop, episode]
|
||||
|
||||
for pick in topPicks {
|
||||
if let pick, let index = firstIndex(of: pick) {
|
||||
remove(at: index)
|
||||
}
|
||||
}
|
||||
|
||||
for pick in topPicks.reversed() {
|
||||
if let pick {
|
||||
insert(pick, at: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func sortedTopPicks(service: String) -> [Self.Element] {
|
||||
var sorted = self
|
||||
sorted.sortTopPicks(service: service)
|
||||
return sorted
|
||||
}
|
||||
}
|
||||
|
||||
public enum MediaKind: Int {
|
||||
case tvShow = 10
|
||||
case movie = 9
|
||||
|
||||
@@ -52,6 +52,20 @@ public struct TheMovieDB: MetadataService {
|
||||
return results.map { metadata(forMoviePartialResult: $0, language: nil) }
|
||||
}
|
||||
|
||||
public func search(movieID id: MetadataFileID, language: String) -> [MetadataResult] {
|
||||
let result: TMDBMovie?
|
||||
switch id {
|
||||
case .tmdb(let movieID):
|
||||
result = session.fetch(movieID: movieID, language: language)
|
||||
case .imdb(let imdbID):
|
||||
result = session.findMovie(id: imdbID, externalSource: "imdb_id", language: language)
|
||||
case .tvdb:
|
||||
// A TVDB ID identifies a series: no direct movie to fetch, fall back to the title search.
|
||||
return []
|
||||
}
|
||||
return result.map { [metadata(forResult: $0, language: language)] } ?? []
|
||||
}
|
||||
|
||||
// MARK: - Helpers
|
||||
|
||||
private func cleanList(items: [TMDBTuple]?) -> String? {
|
||||
@@ -111,16 +125,9 @@ public struct TheMovieDB: MetadataService {
|
||||
private func loadMovieArtworks(result: TMDBMovie) -> [Artwork] {
|
||||
var artworks: [Artwork] = []
|
||||
|
||||
var iTunesImage = [Artwork](), appleTV = [Artwork]()
|
||||
var appleTV = [Artwork]()
|
||||
let group = DispatchGroup()
|
||||
|
||||
DispatchQueue.global().async(group: group) {
|
||||
// add iTunes artwork
|
||||
if let title = result.title, let iTunesMetadata = iTunesStore.quickiTunesSearch(movieName: title) {
|
||||
iTunesImage = iTunesMetadata.remoteArtworks
|
||||
}
|
||||
}
|
||||
|
||||
DispatchQueue.global().async(group: group) {
|
||||
if let title = result.title,
|
||||
let store = iTunesStore.Store(language: "USA (English)") {
|
||||
@@ -130,7 +137,6 @@ public struct TheMovieDB: MetadataService {
|
||||
group.wait()
|
||||
|
||||
artworks.append(contentsOf: appleTV)
|
||||
artworks.append(contentsOf: iTunesImage)
|
||||
|
||||
// Add TheMovieDB artworks
|
||||
if let config = session.fetchConfiguration()?.images,
|
||||
@@ -154,7 +160,7 @@ public struct TheMovieDB: MetadataService {
|
||||
|
||||
}
|
||||
|
||||
return artworks
|
||||
return artworks.sortedTopPicks(service: self.name)
|
||||
}
|
||||
|
||||
private func metadata(forResult result: TMDBMovie, language: String?) -> MetadataResult {
|
||||
@@ -379,17 +385,8 @@ public struct TheMovieDB: MetadataService {
|
||||
|
||||
artworks.insert(contentsOf: metadata.remoteArtworks, at: 0)
|
||||
|
||||
var iTunesImage = [Artwork](), appleTV = [Artwork](), squareTVArt = [Artwork]()
|
||||
var appleTV = [Artwork](), squareTVArt = [Artwork]()
|
||||
let group = DispatchGroup()
|
||||
DispatchQueue.global().async(group: group) {
|
||||
// add iTunes artwork
|
||||
if let name = metadata[.seriesName] as? String,
|
||||
let iTunesMetadata = iTunesStore.quickiTunesSearch(tvSeriesName: name,
|
||||
seasonNum: metadata[.season] as? Int,
|
||||
episodeNum: metadata[.episodeNumber] as? Int) {
|
||||
iTunesImage = iTunesMetadata.remoteArtworks
|
||||
}
|
||||
}
|
||||
DispatchQueue.global().async(group: group) {
|
||||
if let name = metadata[.seriesName] as? String,
|
||||
let season = metadata[.season] as? Int,
|
||||
@@ -404,11 +401,10 @@ public struct TheMovieDB: MetadataService {
|
||||
}
|
||||
group.wait()
|
||||
|
||||
artworks.insert(contentsOf: iTunesImage, at: 0)
|
||||
artworks.insert(contentsOf: squareTVArt, at: 0)
|
||||
artworks.insert(contentsOf: appleTV, at: 0)
|
||||
|
||||
metadata.remoteArtworks = artworks
|
||||
metadata.remoteArtworks = artworks.sortedTopPicks(service: self.name)
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
||||
@@ -285,6 +285,21 @@ final public class TheMovieDBService {
|
||||
return result
|
||||
}
|
||||
|
||||
/// Resolves an external ID (e.g. an `tt…` IMDb ID with `external_source=imdb_id`)
|
||||
/// to a movie and fetches its full details.
|
||||
public func findMovie(id externalID: String, externalSource: String, language: String) -> TMDBMovie? {
|
||||
guard let url = URL(string: basePath + "find/" + externalID + "?api_key=" + key + "&external_source=" + externalSource),
|
||||
let result = sendJSONRequest(url: url, language: language, type: FindResults.self),
|
||||
let movieID = result.movie_results?.first?.id
|
||||
else { return nil }
|
||||
|
||||
return fetch(movieID: movieID, language: language)
|
||||
}
|
||||
|
||||
private struct FindResults : Codable {
|
||||
let movie_results: [TMDBMovieSearchResult]?
|
||||
}
|
||||
|
||||
public func search(series: String, language: String) -> [TMDBTVSearchResult] {
|
||||
let encodedName = series.urlEncoded()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public struct TheTVDB : MetadataService {
|
||||
var results: Set<String> = Set()
|
||||
|
||||
let series = session.fetch(series: tvShow)
|
||||
results.formUnion(series.compactMap { $0.translations?[language] } )
|
||||
results.formUnion(series.compactMap { $0.translations?[language] ?? $0.name } )
|
||||
|
||||
if results.isEmpty {
|
||||
return TheMovieDB().search(tvShow: tvShow, language: language)
|
||||
@@ -49,8 +49,9 @@ public struct TheTVDB : MetadataService {
|
||||
|
||||
// MARK: - TV Series ID search
|
||||
|
||||
private func match(series: TVDBSearchResult, name: String) -> Bool {
|
||||
if let seriesName = series.name, seriesName.caseInsensitiveCompare(name) == .orderedSame {
|
||||
private func match(series: TVDBSearchResult, name: String, language: String) -> Bool {
|
||||
if let seriesName = series.translations?[language] ?? series.name,
|
||||
seriesName.caseInsensitiveCompare(name) == .orderedSame {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -65,12 +66,16 @@ public struct TheTVDB : MetadataService {
|
||||
return false
|
||||
}
|
||||
|
||||
private func searchIDs(seriesName: String) -> [String] {
|
||||
private func searchIDs(seriesName: String, language: String) -> [String] {
|
||||
let series = session.fetch(series: seriesName)
|
||||
let sorted = series.sorted { el1, el2 -> Bool in
|
||||
return el1.name?.caseInsensitiveCompare(seriesName) == .orderedSame ? true : false
|
||||
let name = el1.translations?[language] ?? el1.name
|
||||
let order = name?.caseInsensitiveCompare(seriesName)
|
||||
return order == .orderedSame ? true : false
|
||||
}
|
||||
let filteredSeries = sorted.filter { $0.status?.isEmpty == false && match(series: $0, name: seriesName) }.map { $0.tvdb_id }
|
||||
let filteredSeries = sorted.filter {
|
||||
$0.status?.isEmpty == false && match(series: $0, name: seriesName, language: language)
|
||||
}.map { $0.tvdb_id }
|
||||
|
||||
if filteredSeries.isEmpty == false {
|
||||
return filteredSeries
|
||||
@@ -148,8 +153,8 @@ public struct TheTVDB : MetadataService {
|
||||
size = .square
|
||||
case (let width, let height) where width >= height:
|
||||
size = .rectangle
|
||||
case (let width, let height) where height < width:
|
||||
size = .default
|
||||
case (let width, let height) where height > width:
|
||||
size = .standard
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -196,8 +201,8 @@ public struct TheTVDB : MetadataService {
|
||||
size = .square
|
||||
case (let width, let height) where width >= height:
|
||||
size = .rectangle
|
||||
case (let width, let height) where height < width:
|
||||
size = .default
|
||||
case (let width, let height) where height > width:
|
||||
size = .standard
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -339,7 +344,7 @@ public struct TheTVDB : MetadataService {
|
||||
// MARK: - TV Search
|
||||
|
||||
public func search(tvShow: String, language: String, season: Int?, episode: Int?) -> [MetadataResult] {
|
||||
let seriesIDs: [String] = self.searchIDs(seriesName: tvShow)
|
||||
let seriesIDs: [String] = self.searchIDs(seriesName: tvShow, language: language)
|
||||
|
||||
for id in seriesIDs {
|
||||
if let info = session.fetch(seriesInfo: id) {
|
||||
@@ -367,16 +372,6 @@ public struct TheTVDB : MetadataService {
|
||||
|
||||
// MARK: - Additional metadata
|
||||
|
||||
private func loadiTunesArtwork(_ metadata: MetadataResult) -> [Artwork] {
|
||||
guard let name = metadata[.seriesName] as? String,
|
||||
let seasonNum = metadata[.season] as? Int,
|
||||
let episodeNum = metadata[.episodeNumber] as? Int,
|
||||
let result = iTunesStore.quickiTunesSearch(tvSeriesName: name, seasonNum: seasonNum, episodeNum: episodeNum)
|
||||
else { return [] }
|
||||
|
||||
return result.remoteArtworks
|
||||
}
|
||||
|
||||
private func loadSquareTVArtwork(_ metadata: MetadataResult) -> [Artwork] {
|
||||
guard let tvShow = metadata[.seriesName] as? String,
|
||||
let seasonNum = metadata[.season] as? Int,
|
||||
@@ -419,11 +414,8 @@ public struct TheTVDB : MetadataService {
|
||||
|
||||
// Get additionals images
|
||||
if ((metadata[.season] as? Int) != nil) {
|
||||
var iTunesImage = [Artwork](), appleTV = [Artwork](), squareTVArt = [Artwork]()
|
||||
var appleTV = [Artwork](), squareTVArt = [Artwork]()
|
||||
let group = DispatchGroup()
|
||||
DispatchQueue.global().async(group: group) {
|
||||
iTunesImage = self.loadiTunesArtwork(metadata)
|
||||
}
|
||||
DispatchQueue.global().async(group: group) {
|
||||
squareTVArt = self.loadSquareTVArtwork(metadata)
|
||||
}
|
||||
@@ -432,12 +424,12 @@ public struct TheTVDB : MetadataService {
|
||||
}
|
||||
group.wait()
|
||||
|
||||
artworks.insert(contentsOf: iTunesImage, at: 0)
|
||||
artworks.insert(contentsOf: squareTVArt, at: 0)
|
||||
artworks.insert(contentsOf: appleTV, at: 0)
|
||||
}
|
||||
|
||||
metadata.remoteArtworks.insert(contentsOf: artworks, at: 0)
|
||||
metadata.remoteArtworks.sortTopPicks(service: self.name)
|
||||
|
||||
return metadata
|
||||
}
|
||||
@@ -465,6 +457,7 @@ public struct TheTVDB : MetadataService {
|
||||
|
||||
public func loadMovieMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult {
|
||||
guard let movieID = metadata[.serviceContentID] as? String,
|
||||
let name = metadata[.name] as? String,
|
||||
let info = session.fetch(movieInfo: movieID)
|
||||
else { return metadata }
|
||||
|
||||
@@ -484,28 +477,20 @@ public struct TheTVDB : MetadataService {
|
||||
var artworks: [Artwork] = []
|
||||
artworks += cleanArtworks(info.artworks)
|
||||
|
||||
var iTunesImage = [Artwork](), appleTV = [Artwork]()
|
||||
var appleTV = [Artwork]()
|
||||
let group = DispatchGroup()
|
||||
let queue = DispatchQueue.global()
|
||||
|
||||
queue.async(group: group) {
|
||||
// add iTunes artwork
|
||||
if let iTunesMetadata = iTunesStore.quickiTunesSearch(movieName: info.name) {
|
||||
iTunesImage = iTunesMetadata.remoteArtworks
|
||||
}
|
||||
}
|
||||
|
||||
queue.async(group: group) {
|
||||
if let store = iTunesStore.Store(language: "USA (English)") {
|
||||
appleTV = AppleTV().searchArtwork(term: info.name, store: store, type: .movie)
|
||||
appleTV = AppleTV().searchArtwork(term: name, store: store, type: .movie)
|
||||
}
|
||||
}
|
||||
group.wait()
|
||||
|
||||
artworks.insert(contentsOf: iTunesImage, at: 0)
|
||||
artworks.insert(contentsOf: appleTV, at: 0)
|
||||
|
||||
metadata.remoteArtworks = artworks
|
||||
metadata.remoteArtworks = artworks.sortedTopPicks(service: self.name)
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
||||
@@ -57,6 +57,9 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
||||
|
||||
private var state: MetadataSearchState = .none
|
||||
|
||||
/// Service ID parsed from the file name: consumed by the first automatic movie search.
|
||||
private var pendingMovieID: MetadataFileID?
|
||||
|
||||
private var movieService: MetadataService = MetadataSearch.defaultMovieService
|
||||
private var tvShowService: MetadataService = MetadataSearch.defaultTVService
|
||||
|
||||
@@ -122,10 +125,11 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
||||
case .none:
|
||||
updateUI()
|
||||
|
||||
case .movie(let title):
|
||||
case .movie(let title, let id):
|
||||
searchMode.selectTabViewItem(at: 0)
|
||||
movieName.stringValue = title
|
||||
tvSeriesName.stringValue = title
|
||||
pendingMovieID = id
|
||||
searchForResults(searchMovieButton)
|
||||
|
||||
case .tvShow(let tvShow, let season, let episode):
|
||||
@@ -242,8 +246,27 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
||||
}
|
||||
|
||||
private func searchMovie() {
|
||||
let title = movieName.stringValue
|
||||
let language = movieService.languageType.tag(displayName: movieLanguage.titleOfSelectedItem ?? "en")
|
||||
|
||||
if let id = pendingMovieID {
|
||||
// The file name carried a service ID: try a direct lookup first and
|
||||
// consume it either way, so later searches follow the text field.
|
||||
pendingMovieID = nil
|
||||
let searcher = MetadataSearch.movieIDSearch(service: movieService, id: id, language: language)
|
||||
let task = searcher.search(completionHandler: { results in
|
||||
if results.isEmpty {
|
||||
// Not supported by this provider, or unknown ID: fall back to the title search.
|
||||
DispatchQueue.main.async { self.searchForResults(self.searchMovieButton) }
|
||||
}
|
||||
else {
|
||||
self.searchDone(search: searcher, results: results)
|
||||
}
|
||||
}).runAsync()
|
||||
state = .searching(search: searcher, task: task)
|
||||
return
|
||||
}
|
||||
|
||||
let title = movieName.stringValue
|
||||
let searcher = MetadataSearch.movieSeach(service: movieService, movie: title, language: language)
|
||||
let task = searcher.search(completionHandler: { self.searchDone(search: searcher, results: $0) }).runAsync()
|
||||
state = .searching(search: searcher, task: task)
|
||||
@@ -331,14 +354,14 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
||||
switch state {
|
||||
case .searching(let search, _):
|
||||
switch search {
|
||||
case .movieSeach(let service, _, _):
|
||||
case .movieSeach(let service, _, _), .movieIDSearch(let service, _, _):
|
||||
progressText.stringValue = String.localizedStringWithFormat(NSLocalizedString("Searching %@ for movie information…", comment: ""), service.name)
|
||||
case .tvSearch(let service, _, _ , _, _):
|
||||
progressText.stringValue = String.localizedStringWithFormat(NSLocalizedString("Searching %@ for episode information…", comment: ""), service.name)
|
||||
}
|
||||
case .additionalSearch(let search, _, _):
|
||||
switch search {
|
||||
case .movieSeach:
|
||||
case .movieSeach, .movieIDSearch:
|
||||
progressText.stringValue = NSLocalizedString("Downloading additional movie metadata…", comment: "")
|
||||
case .tvSearch:
|
||||
progressText.stringValue = NSLocalizedString("Downloading additional TV metadata…", comment: "")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -14,9 +14,9 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<view wantsLayer="YES" id="HYk-Hf-rvN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="540" height="520"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="590" height="520"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<point key="canvasLocation" x="220" y="74"/>
|
||||
<point key="canvasLocation" x="327" y="14"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -230,7 +230,7 @@ final class OCRManager {
|
||||
}
|
||||
|
||||
private lazy var destinationURL = {
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler", isDirectory: true).appendingPathComponent("tessdata", isDirectory: true).appendingPathComponent("v4", isDirectory: true)
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV", isDirectory: true).appendingPathComponent("tessdata", isDirectory: true).appendingPathComponent("v4", isDirectory: true)
|
||||
}()
|
||||
|
||||
private lazy var baseURL = {
|
||||
|
||||
@@ -37,7 +37,6 @@ final class OffsetViewController: NSViewController {
|
||||
@IBAction func setOffset(_ sender: Any) {
|
||||
if track.startOffset != offsetField.doubleValue {
|
||||
track.startOffset = offsetField.doubleValue
|
||||
doc.updateChangeCount(.changeDone)
|
||||
}
|
||||
presentingViewController?.dismiss(self)
|
||||
}
|
||||
|
||||
@@ -124,7 +124,11 @@ final class OptionsViewController: NSViewController, NSUserInterfaceValidations
|
||||
private func menuItem(url: URL) -> NSMenuItem {
|
||||
let icon = NSWorkspace.shared.icon(forFile: url.path)
|
||||
icon.size = NSSize(width: 16, height: 16)
|
||||
let item = NSMenuItem(title: url.lastPathComponent, action: #selector(destination(_:)), keyEquivalent: "")
|
||||
|
||||
let values = try? url.resourceValues(forKeys: [.localizedNameKey])
|
||||
let title = values?.localizedName ?? url.lastPathComponent
|
||||
|
||||
let item = NSMenuItem(title: title, action: #selector(destination(_:)), keyEquivalent: "")
|
||||
item.image = icon
|
||||
item.target = self
|
||||
item.representedObject = url
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// PasteboardItem.swift
|
||||
// Subler
|
||||
//
|
||||
// Created by Damiano Galassi on 22/09/2026.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
extension NSPasteboard.PasteboardType {
|
||||
static let tableViewIndex = NSPasteboard.PasteboardType("org.subler.tableViewIndex")
|
||||
}
|
||||
|
||||
class PasteboardItem: NSObject, NSPasteboardWriting {
|
||||
let index: Int
|
||||
let type: NSPasteboard.PasteboardType
|
||||
|
||||
init(index: Int, type: NSPasteboard.PasteboardType) {
|
||||
self.index = index
|
||||
self.type = type
|
||||
}
|
||||
|
||||
func writableTypes(for pasteboard: NSPasteboard) -> [NSPasteboard.PasteboardType] {
|
||||
return [type]
|
||||
}
|
||||
|
||||
func pasteboardPropertyList(forType type: NSPasteboard.PasteboardType) -> Any? {
|
||||
switch type {
|
||||
case self.type:
|
||||
return index
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension NSPasteboardItem {
|
||||
func integer(forType type: NSPasteboard.PasteboardType) -> Int? {
|
||||
guard let data = data(forType: type) else { return nil }
|
||||
let plist = try? PropertyListSerialization.propertyList(
|
||||
from: data,
|
||||
options: .mutableContainers,
|
||||
format: nil)
|
||||
return plist as? Int
|
||||
}
|
||||
}
|
||||
|
||||
extension Array {
|
||||
mutating func move(from start: Index, to end: Index) {
|
||||
guard (0..<count) ~= start, (0...count) ~= end else { return }
|
||||
if start == end { return }
|
||||
let targetIndex = start < end ? end - 1 : end
|
||||
insert(remove(at: start), at: targetIndex)
|
||||
}
|
||||
|
||||
mutating func move(with indexes: IndexSet, to toIndex: Index) {
|
||||
let movingData = indexes.map{ self[$0] }
|
||||
let targetIndex = toIndex - indexes.filter{ $0 < toIndex }.count
|
||||
for (i, e) in indexes.enumerated() {
|
||||
remove(at: e - i)
|
||||
}
|
||||
insert(contentsOf: movingData, at: targetIndex)
|
||||
}
|
||||
}
|
||||
+52
-12
@@ -26,11 +26,6 @@ struct Stored<T> : Registable {
|
||||
let key: String
|
||||
let defaultValue: T
|
||||
|
||||
init(key: String, defaultValue: T) {
|
||||
self.key = key
|
||||
self.defaultValue = defaultValue
|
||||
}
|
||||
|
||||
var wrappedValue: T {
|
||||
get { ud.object(forKey: key) as? T ?? defaultValue }
|
||||
set { ud.set(newValue, forKey: key) }
|
||||
@@ -41,16 +36,41 @@ struct Stored<T> : Registable {
|
||||
}
|
||||
}
|
||||
|
||||
@propertyWrapper
|
||||
struct StoredEnum<T: RawRepresentable> : Registable {
|
||||
let key: String
|
||||
let defaultValue: T
|
||||
|
||||
var wrappedValue: T {
|
||||
get { T(rawValue: (ud.object(forKey: key) as? T.RawValue) ?? defaultValue.rawValue) ?? defaultValue }
|
||||
set { ud.set(newValue.rawValue, forKey: key) }
|
||||
}
|
||||
|
||||
func register(in dictionary: inout [String :Any]) {
|
||||
dictionary[key] = defaultValue.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
@propertyWrapper
|
||||
struct StoredURL : Registable {
|
||||
let key: String
|
||||
let defaultValue: URL?
|
||||
|
||||
var wrappedValue: URL? {
|
||||
get { ud.url(forKey: key) ?? defaultValue }
|
||||
set { ud.set(newValue, forKey: key) }
|
||||
}
|
||||
|
||||
func register(in dictionary: inout [String :Any]) {
|
||||
dictionary[key] = defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
@propertyWrapper
|
||||
struct StoredCodable<T: Codable> : Registable {
|
||||
let key: String
|
||||
let defaultValue: T
|
||||
|
||||
init(key: String, defaultValue: T) {
|
||||
self.key = key
|
||||
self.defaultValue = defaultValue
|
||||
}
|
||||
|
||||
var wrappedValue: T {
|
||||
get {
|
||||
guard let data = ud.data(forKey: key) else { return defaultValue }
|
||||
@@ -70,6 +90,12 @@ struct StoredCodable<T: Codable> : Registable {
|
||||
}
|
||||
}
|
||||
|
||||
enum SaveAsLocation: Int {
|
||||
case automatic = 0
|
||||
case sameAsFile = 1
|
||||
case custom = 2
|
||||
}
|
||||
|
||||
enum Prefs {
|
||||
|
||||
static func register() {
|
||||
@@ -78,7 +104,7 @@ enum Prefs {
|
||||
_audioBitrate, _audioDRC, _audioConvertAC3, _audioKeepAC3, _audioConvertDts,
|
||||
_audioDtsOptions, _subtitleConvertBitmap, _ratingsCountry, _chaptersPreviewPosition,
|
||||
_chaptersPreviewTrack, _mp464bitOffset, _mp464bitTimes, _mp4SaveAsOptimize, _forceHvc1,
|
||||
_logFormat])
|
||||
_logFormat, _saveAsLocation, _set4KHDVideoMetadata])
|
||||
}
|
||||
|
||||
@Stored(key: "NSApplicationCrashOnException", defaultValue: true)
|
||||
@@ -150,6 +176,9 @@ enum Prefs {
|
||||
@Stored(key: "SBForceHvc1", defaultValue: true)
|
||||
static var forceHvc1: Bool
|
||||
|
||||
@Stored(key: "SBSet4KHDVideoMetadata", defaultValue: false)
|
||||
static var set4KHDVideoMetadata: Bool
|
||||
|
||||
@Stored(key: "SBArtworkSelectorZoomLevel", defaultValue: 50)
|
||||
static var artworkSelectorZoomLevel: Float
|
||||
|
||||
@@ -161,6 +190,13 @@ enum Prefs {
|
||||
|
||||
@Stored(key: "SBLogFormat", defaultValue: 0)
|
||||
static var logFormat: Int // 0 = Time Only, 1 = Date and Time
|
||||
|
||||
@StoredEnum(key: "SBSaveAsLocationMode", defaultValue: .automatic)
|
||||
static var saveAsLocation: SaveAsLocation
|
||||
|
||||
/// The folder used when saveAsLocation is set to custom.
|
||||
@StoredURL(key: "SBSaveAsCustomLocation", defaultValue: nil)
|
||||
static var saveAsCustomLocation: URL?
|
||||
}
|
||||
|
||||
enum MetadataPrefs {
|
||||
@@ -170,7 +206,8 @@ enum MetadataPrefs {
|
||||
_movieImporter, _movieiTunesStoreLanguage,
|
||||
_tvShowImporter, _tvShowiTunesStoreLanguage,
|
||||
_tvShowTheTVDBLanguage, _tvShowTheMovieDBLanguage,
|
||||
_keepEmptyAnnotations, _keepImportedFilesMetadata])
|
||||
_keepEmptyAnnotations, _overwriteExistingAnnotations,
|
||||
_keepImportedFilesMetadata])
|
||||
}
|
||||
|
||||
@StoredCodable(key: "SBMovieFormatTokens", defaultValue: [Token(text: "{Name}")])
|
||||
@@ -219,6 +256,9 @@ enum MetadataPrefs {
|
||||
@Stored(key: "SBMetadataKeepEmptyAnnotations", defaultValue: false)
|
||||
static var keepEmptyAnnotations: Bool
|
||||
|
||||
@Stored(key: "SBMetadataOverwriteExistingAnnotations", defaultValue: true)
|
||||
static var overwriteExistingAnnotations: Bool
|
||||
|
||||
@Stored(key: "SBFileImporterImportMetadata", defaultValue: false)
|
||||
static var keepImportedFilesMetadata: Bool
|
||||
}
|
||||
@@ -67,14 +67,14 @@ class PrefsWindowController: NSWindowController, NSWindowDelegate {
|
||||
|
||||
// MARK: Panel switching
|
||||
|
||||
private func view(for identifier: NSToolbarItem.Identifier) -> NSView? {
|
||||
private func view(for identifier: NSToolbarItem.Identifier) -> NSView {
|
||||
if identifier == general { return generalController.view }
|
||||
if identifier == metadata { return metadataController.view }
|
||||
if identifier == presets { return presetController.view }
|
||||
if identifier == output { return outputController.view }
|
||||
if identifier == ocr { return ocrController.view }
|
||||
if identifier == advanced { return advancedController.view }
|
||||
return nil
|
||||
return generalController.view
|
||||
}
|
||||
|
||||
private func animationDuration(view: NSView, previousView: NSView?) -> TimeInterval {
|
||||
@@ -82,34 +82,61 @@ class PrefsWindowController: NSWindowController, NSWindowDelegate {
|
||||
return TimeInterval(abs(previousView.frame.size.height - view.frame.height)) * 0.0011
|
||||
}
|
||||
|
||||
func resizeWindow(toFitView view: NSView) {
|
||||
guard let window, let contentView = window.contentView else {
|
||||
return
|
||||
}
|
||||
|
||||
view.setFrameSize(view.fittingSize)
|
||||
|
||||
let viewFrame = view.frame
|
||||
let windowFrame = window.frame
|
||||
let contentViewFrame = contentView.frame
|
||||
|
||||
let windowWidth = max(windowFrame.width, viewFrame.width)
|
||||
let deltaHeight = contentViewFrame.height - viewFrame.height
|
||||
let heightForWindow = windowFrame.height - deltaHeight
|
||||
let windowOriginY = windowFrame.minY + deltaHeight
|
||||
|
||||
var updatedWindowFrame = windowFrame
|
||||
updatedWindowFrame.size.height = heightForWindow
|
||||
updatedWindowFrame.origin.y = windowOriginY
|
||||
updatedWindowFrame.size.width = windowWidth
|
||||
|
||||
var updatedViewFrame = viewFrame
|
||||
updatedViewFrame.origin = NSPoint.zero
|
||||
updatedViewFrame.size.width = windowWidth
|
||||
if viewFrame != updatedViewFrame {
|
||||
view.frame = updatedViewFrame
|
||||
}
|
||||
|
||||
if windowFrame != updatedWindowFrame {
|
||||
contentView.isHidden = true
|
||||
window.setFrame(updatedWindowFrame, display: true, animate: true)
|
||||
contentView.isHidden = false
|
||||
}
|
||||
}
|
||||
|
||||
var currentView: NSView? {
|
||||
window?.contentView?.subviews.first
|
||||
}
|
||||
|
||||
private func selectItem(_ item: NSToolbarItem, animate: Bool) {
|
||||
guard let window = self.window,
|
||||
let view = self.view(for: item.itemIdentifier),
|
||||
window.contentView != view
|
||||
else { return }
|
||||
guard let window, let contentView = window.contentView else { return }
|
||||
|
||||
let duration = animationDuration(view: view, previousView: window.contentView)
|
||||
window.contentView = view
|
||||
|
||||
if window.isVisible && animate {
|
||||
NSAnimationContext.runAnimationGroup({ context in
|
||||
context.allowsImplicitAnimation = true
|
||||
context.duration = duration
|
||||
window.layoutIfNeeded()
|
||||
|
||||
NSAnimationContext.beginGrouping()
|
||||
NSAnimationContext.current.duration = 0
|
||||
view.isHidden = true
|
||||
NSAnimationContext.endGrouping()
|
||||
}, completionHandler: {
|
||||
view.isHidden = false
|
||||
window.title = item.label
|
||||
self.window?.makeFirstResponder(view.nextKeyView)
|
||||
})
|
||||
}
|
||||
else {
|
||||
window.title = item.label
|
||||
let newView = view(for: item.itemIdentifier)
|
||||
if newView == currentView {
|
||||
return
|
||||
}
|
||||
|
||||
currentView?.removeFromSuperview()
|
||||
|
||||
resizeWindow(toFitView: newView)
|
||||
|
||||
contentView.addSubview(newView)
|
||||
|
||||
window.title = item.label
|
||||
window.makeFirstResponder(newView)
|
||||
}
|
||||
|
||||
@IBAction func setPrefView(_ sender: NSToolbarItem) {
|
||||
|
||||
@@ -18,7 +18,7 @@ protocol Preset: NSSecureCoding, NSCopying {
|
||||
extension Preset {
|
||||
|
||||
private func appSupportURL() -> URL? {
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler")
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV")
|
||||
}
|
||||
|
||||
var fileURL: URL {
|
||||
|
||||
@@ -99,7 +99,7 @@ final class PresetManager {
|
||||
}
|
||||
|
||||
private func appSupportURL() -> URL? {
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler")
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV")
|
||||
}
|
||||
|
||||
private func version(of fileURL: URL) -> Int? {
|
||||
@@ -117,12 +117,12 @@ final class PresetManager {
|
||||
let resourceValues = try fileURL.resourceValues(forKeys: [.isDirectoryKey])
|
||||
if resourceValues.isDirectory == false, let version = version(of: fileURL) {
|
||||
let data = try Data(contentsOf: fileURL)
|
||||
let unarchiver = NSKeyedUnarchiver(forReadingWith: data)
|
||||
unarchiver.requiresSecureCoding = true
|
||||
defer { unarchiver.finishDecoding() }
|
||||
if let unarchiver = try? NSKeyedUnarchiver(forReadingFrom: data) {
|
||||
defer { unarchiver.finishDecoding() }
|
||||
|
||||
if version == 2, let preset = try? unarchiver.decodeTopLevelObject(of: [MetadataPreset.self], forKey: NSKeyedArchiveRootObjectKey) as? MetadataPreset {
|
||||
return preset
|
||||
if version == 2, let preset = try? unarchiver.decodeTopLevelObject(of: [MetadataPreset.self], forKey: NSKeyedArchiveRootObjectKey) as? MetadataPreset {
|
||||
return preset
|
||||
}
|
||||
}
|
||||
}
|
||||
throw LoadError.unsupportedFile
|
||||
@@ -148,13 +148,11 @@ final class PresetManager {
|
||||
}
|
||||
|
||||
private func save(preset: Preset) throws {
|
||||
let data = NSMutableData()
|
||||
let archiver = NSKeyedArchiver(forWritingWith: data)
|
||||
archiver.requiresSecureCoding = true
|
||||
let archiver = NSKeyedArchiver(requiringSecureCoding: true)
|
||||
archiver.encode(preset, forKey: NSKeyedArchiveRootObjectKey)
|
||||
archiver.finishEncoding()
|
||||
|
||||
try data.write(to: preset.fileURL, options: [.atomic])
|
||||
try archiver.encodedData.write(to: preset.fileURL, options: [.atomic])
|
||||
preset.changed = false
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,10 @@ class PresetPrefsViewController: NSViewController, SectionsTableViewDataSource,
|
||||
}
|
||||
}
|
||||
|
||||
tableView.selectRowIndexes(rowIndexes, byExtendingSelection: false)
|
||||
let count = presetManager.metadataPresets.count + presetManager.queuePresets.count
|
||||
if let index = rowIndexes.last, index < count {
|
||||
tableView.selectRowIndexes(rowIndexes, byExtendingSelection: false)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func editPreset(_ sender: NSView) {
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="25098" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="25098"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="ChapterViewController" customModule="Subler" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="actions" destination="IvH-Ff-dyN" id="EiR-xB-dq9"/>
|
||||
<outlet property="removeChapter" destination="31" id="faJ-CI-g36"/>
|
||||
<outlet property="tabView" destination="10" id="CC8-n9-JPu"/>
|
||||
<outlet property="tableView" destination="22" id="7Za-v5-yKx"/>
|
||||
@@ -30,13 +31,13 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="19">
|
||||
<rect key="frame" x="17" y="40" width="719" height="191"/>
|
||||
<rect key="frame" x="17" y="44" width="719" height="187"/>
|
||||
<clipView key="contentView" id="gfP-N5-8Ji">
|
||||
<rect key="frame" x="1" y="1" width="717" height="189"/>
|
||||
<rect key="frame" x="1" y="1" width="717" height="185"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="14" headerView="23" viewBased="YES" id="22" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="717" height="172"/>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnSelection="YES" autosaveColumns="NO" rowHeight="14" headerView="23" viewBased="YES" id="22" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="717" height="168"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -383,7 +384,7 @@
|
||||
</tableHeaderView>
|
||||
</scrollView>
|
||||
<button toolTip="Add chapter" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="42">
|
||||
<rect key="frame" x="11" y="9" width="36" height="27"/>
|
||||
<rect key="frame" x="17" y="16" width="32" height="20"/>
|
||||
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSAddTemplate" imagePosition="only" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="43">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@@ -393,7 +394,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IvH-Ff-dyN">
|
||||
<rect key="frame" x="70" y="12" width="45" height="22"/>
|
||||
<rect key="frame" x="90" y="16" width="53" height="20"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="center" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" pullsDown="YES" id="frw-Vk-Gwo">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="controlContent" size="11"/>
|
||||
@@ -413,7 +414,7 @@
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<button toolTip="Delete selected chapter" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="31">
|
||||
<rect key="frame" x="36" y="9" width="36" height="27"/>
|
||||
<rect key="frame" x="50" y="16" width="32" height="20"/>
|
||||
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSRemoveTemplate" imagePosition="only" alignment="center" controlSize="small" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="32">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
|
||||
@@ -8,16 +8,21 @@
|
||||
import Cocoa
|
||||
import MP42Foundation
|
||||
|
||||
final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTableViewDelegate {
|
||||
final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTableViewDelegate, ExpandedTableViewDelegate {
|
||||
|
||||
var track: MP42ChapterTrack {
|
||||
didSet {
|
||||
let indexes = tableView.selectedRowIndexes
|
||||
tableView.reloadData()
|
||||
if let last = indexes.last, last < track.chapters.count {
|
||||
tableView.selectRowIndexes(indexes, byExtendingSelection: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet var tableView: ExpandedTableView!
|
||||
@IBOutlet var removeChapter: NSButton!
|
||||
@IBOutlet var actions: NSPopUpButton!
|
||||
|
||||
override var nibName: NSNib.Name? {
|
||||
return "ChapterView"
|
||||
@@ -36,6 +41,10 @@ final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTable
|
||||
super.viewDidLoad()
|
||||
tableView.defaultEditingColumn = 1
|
||||
tableView.doubleAction = #selector(doubleClickAction(_:))
|
||||
|
||||
if #available(macOS 26, *) {
|
||||
actions.menu?.items.first?.image = NSImage.init(systemSymbolName: "ellipsis", accessibilityDescription: nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Table View
|
||||
@@ -67,7 +76,11 @@ final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTable
|
||||
}
|
||||
|
||||
func tableViewSelectionDidChange(_ notification: Notification) {
|
||||
removeChapter.isEnabled = tableView.selectedRow != -1 ? true : false
|
||||
removeChapter.isEnabled = tableView.selectedRow != -1 && isReadOnly == false
|
||||
}
|
||||
|
||||
func tableView(_ tableView: NSTableView, shouldEdit tableColumn: NSTableColumn?, row: Int) -> Bool {
|
||||
return isReadOnly == false
|
||||
}
|
||||
|
||||
@IBAction func setChapterTitle(_ sender: NSTextField) {
|
||||
@@ -77,7 +90,6 @@ final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTable
|
||||
track.setTitle(sender.stringValue, forChapter: chapter)
|
||||
|
||||
tableView.reloadData(forRowIndexes: IndexSet(integer: row), columnIndexes: IndexSet(integer: 1))
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,40 +101,52 @@ final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTable
|
||||
track.setTimestamp(timestamp, forChapter: chapter)
|
||||
|
||||
tableView.reloadData()
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func doubleClickAction(_ sender: NSTableView) {
|
||||
guard isReadOnly == false else { return }
|
||||
if sender.clickedRow > -1 && sender.clickedColumn > -1 {
|
||||
sender.editColumn(sender.clickedColumn, row: sender.clickedRow, with: nil, select: true)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
private func updateChangeCount() {
|
||||
view.window?.windowController?.document?.updateChangeCount(NSDocument.ChangeType.changeDone)
|
||||
}
|
||||
|
||||
@IBAction func removeChapter(_ sender: Any) {
|
||||
let currentIndex = tableView.selectedRow
|
||||
if currentIndex < track.chapterCount() {
|
||||
track.removeChapter(at: UInt(currentIndex))
|
||||
|
||||
let indexes = IndexSet(integer: currentIndex)
|
||||
func deleteSelection(in tableview: NSTableView) {
|
||||
guard isReadOnly == false else { return }
|
||||
let indexes = tableView.selectedRowIndexes
|
||||
if indexes.isEmpty == false {
|
||||
track.removeChapters(at: indexes)
|
||||
tableView.removeRows(at: indexes, withAnimation: NSTableView.AnimationOptions.slideUp)
|
||||
tableView.selectRowIndexes(indexes, byExtendingSelection: false)
|
||||
|
||||
updateChangeCount()
|
||||
if let index = indexes.first, index < track.chapters.count {
|
||||
tableView.selectRowIndexes(IndexSet(integer: index), byExtendingSelection: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func addChapter(_ sender: Any) {
|
||||
track.addChapter("Chapter", timestamp: 0)
|
||||
// MARK: Actions
|
||||
|
||||
@IBAction func removeChapter(_ sender: Any) {
|
||||
deleteSelection(in: tableView)
|
||||
}
|
||||
|
||||
// Selects and scrolls to a row (used after the window controller appends
|
||||
// a chapter from the Actions menu, when the tab may not have shown this
|
||||
// track's table yet).
|
||||
func selectChapter(at index: Int) {
|
||||
guard isViewLoaded, index >= 0, index < track.chapters.count else { return }
|
||||
tableView.reloadData()
|
||||
updateChangeCount()
|
||||
tableView.scrollRowToVisible(index)
|
||||
let indexSet = IndexSet(integer: index)
|
||||
tableView.selectRowIndexes(indexSet, byExtendingSelection: false)
|
||||
view.window?.makeFirstResponder(tableView)
|
||||
}
|
||||
|
||||
@IBAction func addChapter(_ sender: Any) {
|
||||
let index = track.addChapter("Chapter", timestamp: 0)
|
||||
let indexSet = IndexSet(integer: Int(index))
|
||||
tableView.insertRows(at: indexSet, withAnimation: .slideDown)
|
||||
tableView.selectRowIndexes(indexSet, byExtendingSelection: false)
|
||||
view.window?.makeFirstResponder(tableView)
|
||||
}
|
||||
|
||||
@IBAction func renameChapters(_ sender: Any) {
|
||||
@@ -131,7 +155,6 @@ final class ChapterViewController : PropertyView, NSTableViewDataSource, NSTable
|
||||
track.setTitle(title, forChapter: chapter)
|
||||
}
|
||||
tableView.reloadData()
|
||||
updateChangeCount()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,6 +101,15 @@ final class MediaTagsController: NSViewController, NSTableViewDataSource, NSTabl
|
||||
}
|
||||
private var tags: [MediaTag]
|
||||
|
||||
/// Propagated from the hosting PropertyView (Matroska tags-only mode).
|
||||
var isReadOnly = false {
|
||||
didSet {
|
||||
if isViewLoaded, isReadOnly != oldValue {
|
||||
tableView.reloadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override var nibName: NSNib.Name? {
|
||||
return "MediaTagsController"
|
||||
}
|
||||
@@ -162,6 +171,7 @@ final class MediaTagsController: NSViewController, NSTableViewDataSource, NSTabl
|
||||
func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
|
||||
let view = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "SBCheckBoxTableCellView"), owner: self) as? CheckBoxTableCellView
|
||||
view?.representedTag = tags[row]
|
||||
view?.checkBox.isEnabled = !isReadOnly
|
||||
return view
|
||||
}
|
||||
|
||||
@@ -176,7 +186,5 @@ final class MediaTagsController: NSViewController, NSTableViewDataSource, NSTabl
|
||||
private func updateTrack() {
|
||||
let updatedTags = tags.filter { $0.state }.map { $0.value }
|
||||
track.mediaCharacteristicTags = Set(updatedTags)
|
||||
|
||||
view.window?.windowController?.document?.updateChangeCount(.changeDone)
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,13 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
|
||||
var metadata: MP42Metadata {
|
||||
didSet {
|
||||
let metadataIndexes = self.metadataTableView.selectedRowIndexes
|
||||
// let artworkIndexes = self.artworksView.selectionIndexPaths;
|
||||
reloadData()
|
||||
if let last = metadataIndexes.last, last < tags.count {
|
||||
self.metadataTableView.selectRowIndexes(metadataIndexes, byExtendingSelection: false)
|
||||
}
|
||||
// self.artworksView.selectItems(at: artworkIndexes, scrollPosition: .top)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +122,16 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
}
|
||||
}
|
||||
|
||||
// The document may already be known to be Matroska (the flag is set
|
||||
// after this view loads in DocumentWindowController, but subclasses
|
||||
// of the preset editor never set it — the viewDidLoad pass keeps
|
||||
// this view correct either way).
|
||||
updateMatroskaFieldHints()
|
||||
|
||||
if #available(macOS 26, *) {
|
||||
setsPopUp.menu?.items.first?.image = NSImage.init(systemSymbolName: "ellipsis", accessibilityDescription: nil)
|
||||
}
|
||||
|
||||
columnWidth = column.width
|
||||
|
||||
metadataTableView.defaultEditingColumn = 1
|
||||
@@ -148,7 +164,64 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
metadataTableView.reloadData()
|
||||
updateArtworksArray()
|
||||
artworksView.reloadData()
|
||||
view.undoManager?.removeAllActions(withTarget: self)
|
||||
updateUI()
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
removeTagButton.isEnabled = self.metadataTableView.selectedRow != -1
|
||||
}
|
||||
|
||||
// MARK: Matroska field hints
|
||||
|
||||
/// Fonts used to flag metadata fields that `MP42MkvTagWriter` cannot save
|
||||
/// (MP4-only keys). They stay selectable on purpose: an MKV document can
|
||||
/// still be converted to MP4 via the queue, where these values do apply.
|
||||
private static let italicMenuFont: NSFont = {
|
||||
return NSFontManager.shared.convert(NSFont.menuFont(ofSize: 0), toHaveTrait: .italicFontMask)
|
||||
}()
|
||||
|
||||
private func isPersistedInMatroska(identifier: String) -> Bool {
|
||||
return MP42MkvMetadataKeyIsPersisted(identifier)
|
||||
}
|
||||
|
||||
override func updateMatroskaFieldHints() {
|
||||
guard isViewLoaded else { return }
|
||||
|
||||
if let menu = tagsPopUp.menu {
|
||||
let identifiers = MP42Metadata.writableMetadata
|
||||
for item in menu.items where item.isHidden == false && item.tag >= 0 && item.tag < identifiers.count {
|
||||
if isMatroskaDocument && !isPersistedInMatroska(identifier: identifiers[item.tag]) {
|
||||
item.attributedTitle = NSAttributedString(string: item.title, attributes: [
|
||||
.font: MovieViewController.italicMenuFont,
|
||||
.foregroundColor: NSColor.secondaryLabelColor,
|
||||
])
|
||||
item.toolTip = NSLocalizedString("This field cannot be saved to a Matroska file.",
|
||||
comment: "Metadata tag menu hint for MP4-only fields")
|
||||
// Italics/color are invisible to assistive tech; carry the
|
||||
// hint in the accessibility label too.
|
||||
item.setAccessibilityLabel(item.title + ", " + NSLocalizedString("cannot be saved to a Matroska file",
|
||||
comment: "Metadata tag menu hint for MP4-only fields"))
|
||||
} else {
|
||||
// Empty attributed title: AppKit falls back to `title`.
|
||||
item.attributedTitle = NSAttributedString(string: "")
|
||||
item.toolTip = nil
|
||||
item.setAccessibilityLabel(nil)
|
||||
}
|
||||
}
|
||||
// Track # and TV Episode # share the single PART_NUMBER tag on
|
||||
// Matroska files (see syncMatroskaEpisodeFields) — say so.
|
||||
if isMatroskaDocument {
|
||||
for key in [MP42MetadataKeyTrackNumber, MP42MetadataKeyTVEpisodeNumber] {
|
||||
// items are addressed by tag, not position: the pulls-down
|
||||
// title item occupies position 0
|
||||
if let index = identifiers.firstIndex(of: key),
|
||||
let item = menu.items.first(where: { $0.isHidden == false && $0.tag == index }) {
|
||||
item.toolTip = NSLocalizedString("In Matroska files these two fields share one tag: editing either updates both.",
|
||||
comment: "Metadata tag menu note for Track #/TV Episode #")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Metadata
|
||||
@@ -176,17 +249,6 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
metadata.addItem(item)
|
||||
rowHeights[item.identifier] = nil
|
||||
}
|
||||
|
||||
if let undo = view.undoManager {
|
||||
undo.registerUndo(withTarget: self) { (target) in
|
||||
target.remove(metadataItems: items)
|
||||
}
|
||||
|
||||
if undo.isUndoing == false {
|
||||
undo.setActionName(NSLocalizedString("Insert", comment: "Undo tag insert."))
|
||||
}
|
||||
}
|
||||
|
||||
updateMetadataArray()
|
||||
metadataTableView.reloadData()
|
||||
}
|
||||
@@ -195,38 +257,19 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
for item in items {
|
||||
metadata.removeItem(item)
|
||||
}
|
||||
|
||||
if let undo = view.undoManager {
|
||||
undo.registerUndo(withTarget: self) { (target) in
|
||||
target.add(metadataItems: items)
|
||||
}
|
||||
|
||||
if undo.isUndoing == false {
|
||||
undo.setActionName(NSLocalizedString("Delete", comment: "Undo tag delete."))
|
||||
}
|
||||
}
|
||||
|
||||
updateMetadataArray()
|
||||
let index = metadataTableView.selectedRowIndexes.first ?? 0
|
||||
metadataTableView.reloadData()
|
||||
if index < tags.count {
|
||||
metadataTableView.selectRowIndexes(IndexSet(integer: index), byExtendingSelection: false)
|
||||
}
|
||||
updateUI()
|
||||
}
|
||||
|
||||
private func replace(metadataItem item: MP42MetadataItem, withItem newItem: MP42MetadataItem) {
|
||||
metadata.removeItem(item)
|
||||
metadata.addItem(newItem)
|
||||
|
||||
if let undo = view.undoManager {
|
||||
undo.registerUndo(withTarget: self) { (target) in
|
||||
target.replace(metadataItem: newItem, withItem: item)
|
||||
}
|
||||
|
||||
if undo.isUndoing == false {
|
||||
undo.setActionName(NSLocalizedString("Editing", comment: "Undo tag editing."))
|
||||
view.window?.windowController?.document?.updateChangeCount(.changeDone)
|
||||
} else {
|
||||
view.window?.windowController?.document?.updateChangeCount(.changeUndone)
|
||||
}
|
||||
}
|
||||
|
||||
updateMetadataArray()
|
||||
|
||||
NSAnimationContext.beginGrouping()
|
||||
@@ -555,6 +598,19 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
else {
|
||||
cell?.textField?.textColor = .disabledControlTextColor
|
||||
}
|
||||
if let textField = cell?.textField {
|
||||
// Cells are reused: strip any italic from a previous row first,
|
||||
// then italicize MP4-only fields on Matroska documents.
|
||||
let baseFont = NSFontManager.shared.convert(textField.font ?? NSFont.systemFont(ofSize: 0),
|
||||
toNotHaveTrait: .italicFontMask)
|
||||
let flagField = isMatroskaDocument && !isPersistedInMatroska(identifier: item.identifier)
|
||||
textField.font = flagField ? NSFontManager.shared.convert(baseFont, toHaveTrait: .italicFontMask) : baseFont
|
||||
let label = localizedMetadataKeyName(item.identifier) ?? item.identifier
|
||||
textField.setAccessibilityLabel(flagField ?
|
||||
label + ", " + NSLocalizedString("cannot be saved to a Matroska file",
|
||||
comment: "Metadata field hint for MP4-only fields") :
|
||||
nil)
|
||||
}
|
||||
return cell
|
||||
|
||||
} else if tableColumn?.identifier == valueColumn {
|
||||
@@ -681,6 +737,48 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
let editedItem = MP42MetadataItem(identifier: item.identifier, value: value as! NSCopying & NSObjectProtocol, dataType: type, extendedLanguageTag: item.extendedLanguageTag)
|
||||
|
||||
replace(metadataItem: item, withItem: editedItem)
|
||||
syncMatroskaEpisodeFields(from: editedItem)
|
||||
}
|
||||
|
||||
/// Matroska stores a single movie-level `PART_NUMBER` tag, and the importer
|
||||
/// fills both Track # and TV Episode # from it. On Matroska documents the
|
||||
/// two rows must therefore move together: whichever one the user edits
|
||||
/// updates the other, so the edit is what `MP42MkvTagWriter` regenerates
|
||||
/// `PART_NUMBER` from. No-op on MP4 documents, where the two are separate
|
||||
/// atoms.
|
||||
private func syncMatroskaEpisodeFields(from editedItem: MP42MetadataItem) {
|
||||
guard isMatroskaDocument else { return }
|
||||
|
||||
let numbers = (editedItem.arrayValue as? [Any])?.compactMap { ($0 as? NSNumber)?.intValue } ?? []
|
||||
|
||||
switch editedItem.identifier {
|
||||
case MP42MetadataKeyTrackNumber:
|
||||
let newIndex = numbers.first ?? 0
|
||||
guard let episode = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyTVEpisodeNumber).first,
|
||||
episode.numberValue?.intValue != newIndex else { return }
|
||||
let replacement = MP42MetadataItem(identifier: MP42MetadataKeyTVEpisodeNumber,
|
||||
value: NSNumber(value: newIndex) as NSCopying & NSObjectProtocol,
|
||||
dataType: episode.dataType,
|
||||
extendedLanguageTag: episode.extendedLanguageTag)
|
||||
replace(metadataItem: episode, withItem: replacement)
|
||||
|
||||
case MP42MetadataKeyTVEpisodeNumber:
|
||||
let newNumber = editedItem.numberValue?.intValue ?? 0
|
||||
guard let track = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyTrackNumber).first else {
|
||||
return // no Track # row: the writer falls back to TV Episode # itself
|
||||
}
|
||||
let parts = (track.arrayValue as? [Any])?.compactMap { ($0 as? NSNumber)?.intValue } ?? []
|
||||
let total = parts.count > 1 ? parts[1] : 0
|
||||
guard (parts.first ?? 0) != newNumber else { return }
|
||||
let replacement = MP42MetadataItem(identifier: MP42MetadataKeyTrackNumber,
|
||||
value: [NSNumber(value: newNumber), NSNumber(value: total)] as NSCopying & NSObjectProtocol,
|
||||
dataType: .integerArray,
|
||||
extendedLanguageTag: track.extendedLanguageTag)
|
||||
replace(metadataItem: track, withItem: replacement)
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func setMetadataBoolValue(_ sender: NSButton) {
|
||||
@@ -830,8 +928,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
}
|
||||
|
||||
func tableViewSelectionDidChange(_ notification: Notification) {
|
||||
let enabled = metadataTableView.selectedRow != -1 ? true : false
|
||||
removeTagButton.isEnabled = enabled
|
||||
updateUI()
|
||||
}
|
||||
|
||||
// MARK: Artworks
|
||||
@@ -842,34 +939,12 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
|
||||
private func add(metadataArtworks items: [MP42MetadataItem]) {
|
||||
metadata.addItems(items)
|
||||
|
||||
if let undo = view.undoManager {
|
||||
undo.registerUndo(withTarget: self) { (target) in
|
||||
target.remove(metadataArtworks: items)
|
||||
}
|
||||
|
||||
if undo.isUndoing == false {
|
||||
undo.setActionName(NSLocalizedString("Insert", comment: "Undo cover art insert."))
|
||||
}
|
||||
}
|
||||
|
||||
updateArtworksArray()
|
||||
artworksView.reloadData()
|
||||
}
|
||||
|
||||
private func remove(metadataArtworks items: [MP42MetadataItem]) {
|
||||
metadata.removeItems(items)
|
||||
|
||||
if let undo = view.undoManager {
|
||||
undo.registerUndo(withTarget: self) { (target) in
|
||||
target.add(metadataArtworks: items)
|
||||
}
|
||||
|
||||
if undo.isUndoing == false {
|
||||
undo.setActionName(NSLocalizedString("Delete", comment: "Undo cover art delete"))
|
||||
}
|
||||
}
|
||||
|
||||
updateArtworksArray()
|
||||
artworksView.reloadData()
|
||||
updateSelection()
|
||||
@@ -878,17 +953,6 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
private func replace(metadataArtworks items: [MP42MetadataItem], withItems newItems: [MP42MetadataItem]) {
|
||||
metadata.removeItems(items)
|
||||
metadata.addItems(newItems)
|
||||
|
||||
if let undo = view.undoManager {
|
||||
undo.registerUndo(withTarget: self) { (target) in
|
||||
target.replace(metadataArtworks: newItems, withItems: items)
|
||||
}
|
||||
|
||||
if undo.isUndoing == false {
|
||||
undo.setActionName(NSLocalizedString("Move", comment: "Undo cover art delete"))
|
||||
}
|
||||
}
|
||||
|
||||
updateArtworksArray()
|
||||
artworksView.reloadData()
|
||||
updateSelection()
|
||||
@@ -901,9 +965,18 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
private func add(artworks: [Any], toIndexPath: IndexPath) -> Bool {
|
||||
let items = artworks.compactMap { (artwork: Any) -> MP42Image? in
|
||||
if let url = artwork as? URL {
|
||||
let value = try? url.resourceValues(forKeys: [URLResourceKey.typeIdentifierKey])
|
||||
var isJpeg = false
|
||||
if #available(macOS 11, *) {
|
||||
let value = try? url.resourceValues(forKeys: [URLResourceKey.contentTypeKey])
|
||||
isJpeg = value?.contentType?.conforms(to: .jpeg) ?? false
|
||||
} else {
|
||||
let value = try? url.resourceValues(forKeys: [URLResourceKey.typeIdentifierKey])
|
||||
if let type = value?.typeIdentifier, UTTypeConformsTo(type as CFString, "public.jpeg" as CFString) {
|
||||
isJpeg = true
|
||||
}
|
||||
}
|
||||
|
||||
if let type = value?.typeIdentifier, UTTypeConformsTo(type as CFString, "public.jpeg" as CFString), let data = try? Data(contentsOf: url) {
|
||||
if isJpeg, let data = try? Data(contentsOf: url) {
|
||||
return MP42Image(data: data, type: MP42_ART_JPEG)
|
||||
} else if let image = NSImage(contentsOf: url) {
|
||||
return MP42Image(image: image)
|
||||
@@ -932,7 +1005,11 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
panel.allowsMultipleSelection = true
|
||||
panel.canChooseFiles = true
|
||||
panel.canChooseDirectories = false
|
||||
panel.allowedFileTypes = ["public.image"]
|
||||
if #available(macOS 11, *) {
|
||||
panel.allowedContentTypes = [.image]
|
||||
} else {
|
||||
panel.allowedFileTypes = ["public.image"]
|
||||
}
|
||||
|
||||
guard let window = view.window else { return }
|
||||
|
||||
@@ -994,14 +1071,11 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
func filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, writePromiseTo url: URL, completionHandler: @escaping (Error?) -> Void) {
|
||||
if let userInfo = filePromiseProvider.userInfo as? [String: AnyObject] {
|
||||
do {
|
||||
if let indexPathData = userInfo[FilePromiseProvider.UserInfoKeys.indexPathKey] as? Data {
|
||||
if let indexPath = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(indexPathData) as? IndexPath {
|
||||
let item = artworks[indexPath.last!]
|
||||
if let image = item.imageValue {
|
||||
try image.data?.write(to: url)
|
||||
completionHandler(nil)
|
||||
}
|
||||
}
|
||||
if let indexPathData = userInfo[FilePromiseProvider.UserInfoKeys.indexPathKey] as? Data,
|
||||
let indexPath = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [NSIndexPath.classForCoder()], from: indexPathData) as? IndexPath,
|
||||
let image = artworks[indexPath.last!].imageValue {
|
||||
try image.data?.write(to: url)
|
||||
completionHandler(nil)
|
||||
}
|
||||
} catch {
|
||||
fatalError("failed to unarchive indexPath from promise provider.")
|
||||
@@ -1114,7 +1188,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
if let pasteboardItem = draggingItem.item as? NSPasteboardItem {
|
||||
do {
|
||||
if let indexPathData = pasteboardItem.data(forType: .artworkDragType),
|
||||
let itemIndexPath = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(indexPathData) as? IndexPath {
|
||||
let itemIndexPath = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [NSIndexPath.classForCoder()], from:indexPathData) as? IndexPath {
|
||||
indexes.insert(itemIndexPath)
|
||||
}
|
||||
} catch {
|
||||
@@ -1246,7 +1320,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
||||
for pasteboardItem in items {
|
||||
do {
|
||||
if let indexPathData = pasteboardItem.data(forType: .artworkDragType),
|
||||
let itemIndexPath = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(indexPathData) as? IndexPath {
|
||||
let itemIndexPath = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [NSIndexPath.classForCoder()], from:indexPathData) as? IndexPath {
|
||||
indexes.insert(itemIndexPath)
|
||||
}
|
||||
} catch {
|
||||
|
||||
@@ -10,6 +10,40 @@ import Cocoa
|
||||
class PropertyView : NSViewController {
|
||||
@IBOutlet var tabView: NSTabView?
|
||||
|
||||
/// True when the view must be displayed but not edited (Matroska
|
||||
/// tags-only documents). Set by DocumentWindowController; subclasses that
|
||||
/// host tables or re-enable controls dynamically must honor it.
|
||||
var isReadOnly = false {
|
||||
didSet {
|
||||
if isViewLoaded, isReadOnly {
|
||||
view.setAllControlsEnabled(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Companion to `isReadOnly` for Matroska documents: the blanket disable
|
||||
/// still applies, but subclasses may re-enable the handful of controls
|
||||
/// whose values `MP42MkvTagWriter` can write back (currently the subtitle
|
||||
/// forced flag). Never consulted when `isReadOnly` is false.
|
||||
var allowsTrackEditing = false
|
||||
|
||||
/// True when the document is a Matroska tags-only document. Unlike
|
||||
/// `isReadOnly` this is set on *every* property view — including the
|
||||
/// metadata tab, which stays editable — so views can visually flag the
|
||||
/// fields `MP42MkvTagWriter` cannot save. Subclasses override
|
||||
/// `updateMatroskaFieldHints()` to apply the styling.
|
||||
var isMatroskaDocument = false {
|
||||
didSet {
|
||||
if isViewLoaded, isMatroskaDocument != oldValue {
|
||||
updateMatroskaFieldHints()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Hook for `isMatroskaDocument` changes; called by subclasses after
|
||||
/// their views are loaded too. Default: nothing to flag.
|
||||
func updateMatroskaFieldHints() {}
|
||||
|
||||
func navigate(direction: Int) {
|
||||
if direction == NSRightArrowFunctionKey {
|
||||
tabView?.selectNextTabViewItem(self)
|
||||
|
||||
@@ -20,6 +20,10 @@ final class SoundViewController : PropertyView {
|
||||
|
||||
let mediaTagsController: MediaTagsController
|
||||
|
||||
override var isReadOnly: Bool {
|
||||
didSet { mediaTagsController.isReadOnly = isReadOnly }
|
||||
}
|
||||
|
||||
@IBOutlet var mediaTagsView: NSView!
|
||||
@IBOutlet var volume: NSSlider!
|
||||
@IBOutlet var alternateGroup: NSPopUpButton!
|
||||
@@ -118,15 +122,10 @@ final class SoundViewController : PropertyView {
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
private func updateChangeCount() {
|
||||
view.window?.windowController?.document?.updateChangeCount(NSDocument.ChangeType.changeDone)
|
||||
}
|
||||
|
||||
@IBAction func setTrackVolume(_ sender: NSSlider) {
|
||||
let value = sender.floatValue / 100
|
||||
if value != track.volume {
|
||||
track.volume = value
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,12 +133,10 @@ final class SoundViewController : PropertyView {
|
||||
if let newFallbackTrack = sender.representedObject as? MP42AudioTrack {
|
||||
if newFallbackTrack != track.fallbackTrack {
|
||||
track.fallbackTrack = newFallbackTrack
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
else {
|
||||
track.fallbackTrack = nil
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,12 +144,10 @@ final class SoundViewController : PropertyView {
|
||||
if let newFollowsTrack = sender.representedObject as? MP42SubtitleTrack {
|
||||
if newFollowsTrack != track.followsTrack {
|
||||
track.followsTrack = newFollowsTrack
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
else {
|
||||
track.followsTrack = nil
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +155,6 @@ final class SoundViewController : PropertyView {
|
||||
if let group = sender.selectedItem?.tag {
|
||||
if track.alternateGroup != group {
|
||||
track.alternateGroup = UInt64(group)
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,24 @@ final class VideoViewController: PropertyView {
|
||||
|
||||
private let mediaTagsController: MediaTagsController
|
||||
|
||||
override var isReadOnly: Bool {
|
||||
didSet {
|
||||
mediaTagsController.isReadOnly = isReadOnly
|
||||
// Matroska tags-only: FlagForced is writable (Never/All — the
|
||||
// per-sample "Any samples" option has no Matroska equivalent).
|
||||
if isReadOnly, allowsTrackEditing, isViewLoaded, track is MP42SubtitleTrack {
|
||||
let anySamplesIndex = forcedSubs.indexOfItem(withTag: 1)
|
||||
if anySamplesIndex >= 0 {
|
||||
forcedSubs.removeItem(at: anySamplesIndex)
|
||||
}
|
||||
if forcedSubs.indexOfSelectedItem == -1 {
|
||||
forcedSubs.selectItem(withTag: 0)
|
||||
}
|
||||
forcedSubs.isEnabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override var nibName: NSNib.Name? {
|
||||
return "VideoView"
|
||||
}
|
||||
@@ -254,10 +272,6 @@ final class VideoViewController: PropertyView {
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
private func updateChangeCount() {
|
||||
view.window?.windowController?.document?.updateChangeCount(NSDocument.ChangeType.changeDone)
|
||||
}
|
||||
|
||||
@IBAction func setSize(_ sender: NSTextField) {
|
||||
if sender == trackWidth {
|
||||
let value = trackWidth.floatValue
|
||||
@@ -267,13 +281,11 @@ final class VideoViewController: PropertyView {
|
||||
trackHeight.floatValue = track.trackHeight
|
||||
}
|
||||
track.trackWidth = value
|
||||
updateChangeCount()
|
||||
}
|
||||
} else if sender == trackHeight {
|
||||
let value = trackHeight.floatValue
|
||||
if track.trackHeight != value {
|
||||
track.trackHeight = value
|
||||
updateChangeCount()
|
||||
}
|
||||
} else if sender == offsetX {
|
||||
let value = CGFloat(offsetX.integerValue)
|
||||
@@ -281,7 +293,6 @@ final class VideoViewController: PropertyView {
|
||||
var transform = track.transform
|
||||
transform.tx = value
|
||||
track.transform = transform
|
||||
updateChangeCount()
|
||||
}
|
||||
} else if sender == offsetY {
|
||||
let value = CGFloat(offsetY.integerValue)
|
||||
@@ -289,7 +300,6 @@ final class VideoViewController: PropertyView {
|
||||
var transform = track.transform
|
||||
transform.ty = value
|
||||
track.transform = transform
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,14 +309,12 @@ final class VideoViewController: PropertyView {
|
||||
let value = UInt64(hSpacing.integerValue)
|
||||
if track.hSpacing != value {
|
||||
track.hSpacing = value
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
else if sender == vSpacing {
|
||||
let value = UInt64(vSpacing.intValue)
|
||||
if track.vSpacing != value {
|
||||
track.vSpacing = value
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,7 +354,6 @@ final class VideoViewController: PropertyView {
|
||||
track.colorPrimaries = colorTag.0
|
||||
track.transferCharacteristics = colorTag.1
|
||||
track.matrixCoefficients = colorTag.2
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,7 +377,6 @@ final class VideoViewController: PropertyView {
|
||||
default:
|
||||
return
|
||||
}
|
||||
updateChangeCount()
|
||||
}
|
||||
|
||||
@IBAction func setForcedSubtitles(_ sender: NSPopUpButton) {
|
||||
@@ -391,7 +397,6 @@ final class VideoViewController: PropertyView {
|
||||
if track.someSamplesAreForced != value.0 || track.allSamplesAreForced != value.1 {
|
||||
track.someSamplesAreForced = value.0
|
||||
track.allSamplesAreForced = value.1
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,12 +406,10 @@ final class VideoViewController: PropertyView {
|
||||
if let newForcedTrack = sender.representedObject as? MP42SubtitleTrack {
|
||||
if newForcedTrack != track.forcedTrack {
|
||||
track.forcedTrack = newForcedTrack
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
else {
|
||||
track.forcedTrack = nil
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,7 +418,6 @@ final class VideoViewController: PropertyView {
|
||||
if let group = sender.selectedItem?.tag {
|
||||
if track.alternateGroup != group {
|
||||
track.alternateGroup = UInt64(group)
|
||||
updateChangeCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,40 +2,40 @@
|
||||
"4p7-7v-cUB.title" = "Guardar";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Metadata"; ObjectID = "11"; */
|
||||
"11.label" = "Metadatos";
|
||||
"11.label" = "Etiquetas";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Artwork"; ObjectID = "15"; */
|
||||
"15.label" = "Ilustración";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Add metadata item"; ObjectID = "30"; */
|
||||
"30.ibExternalAccessibilityDescription" = "Agregar propiedad";
|
||||
"30.ibExternalAccessibilityDescription" = "Agregar etiqueta";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add a new metadata item"; ObjectID = "30"; */
|
||||
"30.ibShadowedToolTip" = "Agregar propiedad";
|
||||
"30.ibShadowedToolTip" = "Agregar etiqueta";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibExternalAccessibilityDescription" = "Eliminar propiedad";
|
||||
"53.ibExternalAccessibilityDescription" = "Eliminar etiqueta";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibShadowedToolTip" = "Eliminar propiedad";
|
||||
"53.ibShadowedToolTip" = "Eliminar etiqueta";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "179"; */
|
||||
"179.ibExternalAccessibilityDescription" = "Preset";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "aiW-0y-PWH"; */
|
||||
"aiW-0y-PWH.title" = "Mantener propiedades existentes";
|
||||
"aiW-0y-PWH.title" = "Mantener etiquetas existentes";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "doa-uZ-CNr"; */
|
||||
"doa-uZ-CNr.title" = "Mantener ilustraciones existentes";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotation"; ObjectID = "j7q-XE-YXB"; */
|
||||
"j7q-XE-YXB.headerCell.title" = "Propiedad";
|
||||
"j7q-XE-YXB.headerCell.title" = "Etiqueta";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "os0-Yb-exW"; */
|
||||
"os0-Yb-exW.headerCell.title" = "Valor";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata"; ObjectID = "qg5-r0-E4V"; */
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "Metadatos";
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "Etiquetas";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "sNX-Z3-AtD"; */
|
||||
"sNX-Z3-AtD.title" = "Cancelar";
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"Fye-Hi-zqu.title" = "Grupo alternativo:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "You should only change the video profile if you want to load the file onto one of the devices listed and have been unable to do so. However, if the video file uses advanced features of the codec, then the file may still be unplayable on the device."; ObjectID = "gcL-yf-yxF"; */
|
||||
"gcL-yf-yxF.title" = "Debes cambiar el perfil de vídeo solo si quieres reproducir el archivo en uno de los dispositivos de la lista y no lo has logrado. Sin embargo, si el archivo de vídeo utiliza características avanzadas del códec, es posible que aún no puedas reproducirlo en el dispositivo.";
|
||||
"gcL-yf-yxF.title" = "Debes cambiar el perfil de video solo si quieres reproducir el archivo en uno de los dispositivos de la lista y no lo has logrado. Sin embargo, si el archivo de video utiliza características avanzadas del códec, es posible que aún no puedas reproducirlo en el dispositivo.";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "GfY-OY-SWL"; */
|
||||
"GfY-OY-SWL.title" = "x";
|
||||
@@ -76,6 +76,9 @@
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "ILN-KP-l0z"; */
|
||||
"ILN-KP-l0z.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "IPT-C2 (9-16-15)"; ObjectID = "J66-Ah-thQ"; */
|
||||
"J66-Ah-thQ.title" = "IPT-C2 (9-16-15)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "No"; ObjectID = "KOg-FR-dr6"; */
|
||||
"KOg-FR-dr6.title" = "No";
|
||||
|
||||
@@ -107,7 +110,10 @@
|
||||
"nr0-Jc-cUj.title" = "Mantener relación de aspecto";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "H.264 Video Profile/Level:"; ObjectID = "nrd-22-FZl"; */
|
||||
"nrd-22-FZl.title" = "Perfil/Nivel del vídeo H.264:";
|
||||
"nrd-22-FZl.title" = "Perfil/Nivel del video H.264:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Undefined (2-2-2)"; ObjectID = "Pxl-vS-IAs"; */
|
||||
"Pxl-vS-IAs.title" = "No definido (2-2-2)";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Aspect Ratio Numerator"; ObjectID = "Q0D-6k-Hgx"; */
|
||||
"Q0D-6k-Hgx.ibExternalAccessibilityDescription" = "Numerador de relación de aspecto";
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "ILN-KP-l0z"; */
|
||||
"ILN-KP-l0z.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "IPT-C2 (9-16-15)"; ObjectID = "J66-Ah-thQ"; */
|
||||
"J66-Ah-thQ.title" = "IPT-C2 (9-16-15)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "No"; ObjectID = "KOg-FR-dr6"; */
|
||||
"KOg-FR-dr6.title" = "No";
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Class = "NSTabViewItem"; label = "Chapters"; ObjectID = "11"; */
|
||||
"11.label" = "Capítulos";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Chapters"; ObjectID = "22"; */
|
||||
"22.ibExternalAccessibilityDescription" = "Capítulos";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Time"; ObjectID = "24"; */
|
||||
"24.headerCell.title" = "Tempo";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Title"; ObjectID = "25"; */
|
||||
"25.headerCell.title" = "Título";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Delete selected chapter"; ObjectID = "31"; */
|
||||
"31.ibShadowedToolTip" = "Remover Capítulo Selecionado";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Add chapter"; ObjectID = "42"; */
|
||||
"42.ibShadowedToolTip" = "Adicionar Capítulo";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rename every chapter"; ObjectID = "SOg-Lz-v5L"; */
|
||||
"SOg-Lz-v5L.title" = "Renomear Capítulos";
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Class = "NSButtonCell"; title = "Save"; ObjectID = "4p7-7v-cUB"; */
|
||||
"4p7-7v-cUB.title" = "Salvar";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Metadata"; ObjectID = "11"; */
|
||||
"11.label" = "Tags";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Artwork"; ObjectID = "15"; */
|
||||
"15.label" = "Capa";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Add metadata item"; ObjectID = "30"; */
|
||||
"30.ibExternalAccessibilityDescription" = "Adicionar Tag";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add a new metadata item"; ObjectID = "30"; */
|
||||
"30.ibShadowedToolTip" = "Adicionar Tag";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibExternalAccessibilityDescription" = "Remover Tag";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibShadowedToolTip" = "Remover Tag";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "179"; */
|
||||
"179.ibExternalAccessibilityDescription" = "Preset";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "aiW-0y-PWH"; */
|
||||
"aiW-0y-PWH.title" = "Manter Tags Existentes";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "doa-uZ-CNr"; */
|
||||
"doa-uZ-CNr.title" = "Manter Capas Existentes";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotation"; ObjectID = "j7q-XE-YXB"; */
|
||||
"j7q-XE-YXB.headerCell.title" = "Tag";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "os0-Yb-exW"; */
|
||||
"os0-Yb-exW.headerCell.title" = "Valor";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata"; ObjectID = "qg5-r0-E4V"; */
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "Tags";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "sNX-Z3-AtD"; */
|
||||
"sNX-Z3-AtD.title" = "Cancelar";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Name:"; ObjectID = "ZqF-j8-NeN"; */
|
||||
"ZqF-j8-NeN.title" = "Nome:";
|
||||
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "ZRj-hi-qeJ"; */
|
||||
"ZRj-hi-qeJ.title" = "Janela";
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* Class = "NSTextFieldCell"; title = "%lu tracks selected"; ObjectID = "Mo5-ii-LsO"; */
|
||||
"Mo5-ii-LsO.title" = "%lu faixas selecionadas";
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/* Class = "NSMenuItem"; title = "3"; ObjectID = "1xu-y0-sPc"; */
|
||||
"1xu-y0-sPc.title" = "3";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "+ 0 db"; ObjectID = "5af-rM-3Vd"; */
|
||||
"5af-rM-3Vd.title" = "+ 0 db";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "+6 db"; ObjectID = "5ZH-ms-h3O"; */
|
||||
"5ZH-ms-h3O.title" = "+6 db";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Sound Settings"; ObjectID = "6"; */
|
||||
"6.label" = "Configurações de som";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Fallback:"; ObjectID = "8KY-0L-cm1"; */
|
||||
"8KY-0L-cm1.title" = "Alternativa:";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Media Characteristics"; ObjectID = "22R-da-Q3B"; */
|
||||
"22R-da-Q3B.label" = "Características da mídia";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Alternate Group:"; ObjectID = "CTV-P7-IaD"; */
|
||||
"CTV-P7-IaD.title" = "Grupo Alternativo:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Subtitles:"; ObjectID = "dbp-55-tUy"; */
|
||||
"dbp-55-tUy.title" = "Legendas:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "-∞ db"; ObjectID = "dCR-ej-bsH"; */
|
||||
"dCR-ej-bsH.title" = "-∞ db";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "4"; ObjectID = "e5A-Zf-BwW"; */
|
||||
"e5A-Zf-BwW.title" = "4";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "5"; ObjectID = "F8Z-GJ-QaV"; */
|
||||
"F8Z-GJ-QaV.title" = "5";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "1"; ObjectID = "mXc-eW-usD"; */
|
||||
"mXc-eW-usD.title" = "1";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "QBa-Jt-TO2"; */
|
||||
"QBa-Jt-TO2.title" = "Nenhum";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "Qdb-gu-B3h"; */
|
||||
"Qdb-gu-B3h.title" = "Nenhum";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "6"; ObjectID = "RPZ-ZF-Pvg"; */
|
||||
"RPZ-ZF-Pvg.title" = "6";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "2"; ObjectID = "xjR-b6-VG2"; */
|
||||
"xjR-b6-VG2.title" = "2";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Volume:"; ObjectID = "Z5x-Oq-P8Z"; */
|
||||
"Z5x-Oq-P8Z.title" = "Volume:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "Zgh-b7-8aY"; */
|
||||
"Zgh-b7-8aY.title" = "Nenhum";
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Scaled Size:"; ObjectID = "1O9-J3-Plk"; */
|
||||
"1O9-J3-Plk.title" = "Tamanho Escalado:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "3"; ObjectID = "3D2-8h-I0N"; */
|
||||
"3D2-8h-I0N.title" = "3";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Visual Settings"; ObjectID = "6"; */
|
||||
"6.label" = "Configurações Visuais";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "pixels"; ObjectID = "6I1-7O-uon"; */
|
||||
"6I1-7O-uon.title" = "pixels";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Implicit"; ObjectID = "6PY-Np-Y3s"; */
|
||||
"6PY-Np-Y3s.title" = "Implícito";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "pixels"; ObjectID = "7as-HC-onR"; */
|
||||
"7as-HC-onR.title" = "pixels";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "7Ug-k7-d7I"; */
|
||||
"7Ug-k7-d7I.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 2020 (9-1-9)"; ObjectID = "8V9-Sh-Mnu"; */
|
||||
"8V9-Sh-Mnu.title" = "Rec. 2020 (9-1-9)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Baseline @ 2.1 (iPod classic, iPod nano)"; ObjectID = "8y5-eT-wSx"; */
|
||||
"8y5-eT-wSx.title" = "Baseline @ 2.1 (iPod classic, iPod nano)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "2"; ObjectID = "a5f-nN-J1C"; */
|
||||
"a5f-nN-J1C.title" = "2";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "4"; ObjectID = "B3w-wZ-pOJ"; */
|
||||
"B3w-wZ-pOJ.title" = "4";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 709 (1-1-1)"; ObjectID = "bc1-gr-6m9"; */
|
||||
"bc1-gr-6m9.title" = "Rec. 709 (1-1-1)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Main @ 3.1 (iPhone, iPod touch, iPad, tv)"; ObjectID = "bMn-03-nc8"; */
|
||||
"bMn-03-nc8.title" = "Main @ 3.1 (iPhone, iPod touch, iPad, tv)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Color Space:"; ObjectID = "BZv-h3-OMk"; */
|
||||
"BZv-h3-OMk.title" = "Espaço de Cores:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 2100 PQ (9-16-9)"; ObjectID = "d2S-Qf-ltk"; */
|
||||
"d2S-Qf-ltk.title" = "Rec. 2100 PQ (9-16-9)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "5"; ObjectID = "Ejg-9c-E4w"; */
|
||||
"Ejg-9c-E4w.title" = "5";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "pixels"; ObjectID = "EQ0-oQ-E9J"; */
|
||||
"EQ0-oQ-E9J.title" = "pixels";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "P3-D65 (12-17-6)"; ObjectID = "fNy-M4-iaz"; */
|
||||
"fNy-M4-iaz.title" = "P3-D65 (12-17-6)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Alternate Group:"; ObjectID = "Fye-Hi-zqu"; */
|
||||
"Fye-Hi-zqu.title" = "Grupo Alternativo:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "You should only change the video profile if you want to load the file onto one of the devices listed and have been unable to do so. However, if the video file uses advanced features of the codec, then the file may still be unplayable on the device."; ObjectID = "gcL-yf-yxF"; */
|
||||
"gcL-yf-yxF.title" = "Você só deve alterar o perfil de vídeo se quiser carregar o arquivo em um dos dispositivos listados e não puder fazê-lo. No entanto, se o arquivo de vídeo usar recursos avançados do codec, o arquivo ainda pode não ser reproduzido no dispositivo.";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "GfY-OY-SWL"; */
|
||||
"GfY-OY-SWL.title" = "x";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Forced:"; ObjectID = "gMo-yz-dz5"; */
|
||||
"gMo-yz-dz5.title" = "Forçado:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "H3I-ix-0Ay"; */
|
||||
"H3I-ix-0Ay.title" = "Nenhuma";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Some Samples Are Forced"; ObjectID = "i0h-ag-Pc5"; */
|
||||
"i0h-ag-Pc5.title" = "Algumas amostras são forçadas";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Aspect Ratio Denominator"; ObjectID = "ifV-jn-Kjv"; */
|
||||
"ifV-jn-Kjv.ibExternalAccessibilityDescription" = "Denominador de proporção";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "ILN-KP-l0z"; */
|
||||
"ILN-KP-l0z.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "IPT-C2 (9-16-15)"; ObjectID = "J66-Ah-thQ"; */
|
||||
"J66-Ah-thQ.title" = "IPT-C2 (9-16-15)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "No"; ObjectID = "KOg-FR-dr6"; */
|
||||
"KOg-FR-dr6.title" = "Não";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "sRGB (1-13-1)"; ObjectID = "l0E-aL-LGd"; */
|
||||
"l0E-aL-LGd.title" = "sRGB (1-13-1)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 2100 HLG (9-18-9)"; ObjectID = "lAn-vv-Amd"; */
|
||||
"lAn-vv-Amd.title" = "Rec. 2100 HLG (9-18-9)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "lgq-Fj-LB5"; */
|
||||
"lgq-Fj-LB5.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "All Samples Are Forced"; ObjectID = "MLa-b8-424"; */
|
||||
"MLa-b8-424.title" = "Todas as amostras são forçadas";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "High @ 3.1"; ObjectID = "Mre-1h-VoX"; */
|
||||
"Mre-1h-VoX.title" = "High @ 3.1";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Scaled Size Height"; ObjectID = "n9M-HO-S4Z"; */
|
||||
"n9M-HO-S4Z.ibExternalAccessibilityDescription" = "Altura do Tamanho Escalado";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Current profile: unknown"; ObjectID = "NIA-f8-VWx"; */
|
||||
"NIA-f8-VWx.title" = "Perfil atual: desconhecido";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Forced track:"; ObjectID = "NPR-jz-Ile"; */
|
||||
"NPR-jz-Ile.title" = "Faixa Forçada:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Preserve Aspect Ratio"; ObjectID = "nr0-Jc-cUj"; */
|
||||
"nr0-Jc-cUj.title" = "Preservar a proporção";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "H.264 Video Profile/Level:"; ObjectID = "nrd-22-FZl"; */
|
||||
"nrd-22-FZl.title" = "Perfil/Nível de Vídeo H.264:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Undefined (2-2-2)"; ObjectID = "Pxl-vS-IAs"; */
|
||||
"Pxl-vS-IAs.title" = "Indefinido (2-2-2)";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Aspect Ratio Numerator"; ObjectID = "Q0D-6k-Hgx"; */
|
||||
"Q0D-6k-Hgx.ibExternalAccessibilityDescription" = "Numerador de proporção";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Aspect Ratio:"; ObjectID = "Q8w-0e-NRr"; */
|
||||
"Q8w-0e-NRr.title" = "Proporção:";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Offset X"; ObjectID = "qFL-0W-Ye6"; */
|
||||
"qFL-0W-Ye6.ibExternalAccessibilityDescription" = "Deslocamento X";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Scaled Size Width"; ObjectID = "r90-c5-7PH"; */
|
||||
"r90-c5-7PH.ibExternalAccessibilityDescription" = "Largura do tamanho escalado";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "1"; ObjectID = "S4p-0Y-kRW"; */
|
||||
"S4p-0Y-kRW.title" = "1";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Normal Size:"; ObjectID = "soD-gL-b4G"; */
|
||||
"soD-gL-b4G.title" = "Dimensões:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "6"; ObjectID = "sqU-tK-Ekm"; */
|
||||
"sqU-tK-Ekm.title" = "6";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Offset:"; ObjectID = "ubI-H1-utj"; */
|
||||
"ubI-H1-utj.title" = "Deslocamento:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "vVg-S9-JUk"; */
|
||||
"vVg-S9-JUk.title" = "Nenhum";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Offset Y"; ObjectID = "wlV-Oh-ui5"; */
|
||||
"wlV-Oh-ui5.ibExternalAccessibilityDescription" = "Deslocamento Y";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 601 (5-1-6)"; ObjectID = "X7B-de-Yur"; */
|
||||
"X7B-de-Yur.title" = "Rec. 601 (5-1-6)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "High @ 4.1"; ObjectID = "Xeg-lb-cfA"; */
|
||||
"Xeg-lb-cfA.title" = "High @ 4.1";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 601 (6-1-6)"; ObjectID = "XQd-tC-sVM"; */
|
||||
"XQd-tC-sVM.title" = "Rec. 601 (6-1-6)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "P3-DCI (11-17-6)"; ObjectID = "z4V-UV-xor"; */
|
||||
"z4V-UV-xor.title" = "P3-DCI (11-17-6)";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Media Characteristics"; ObjectID = "ZZa-lk-8Uv"; */
|
||||
"ZZa-lk-8Uv.label" = "Características da mídia";
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Class = "NSTabViewItem"; label = "Chapters"; ObjectID = "11"; */
|
||||
"11.label" = "章节";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Chapters"; ObjectID = "22"; */
|
||||
"22.ibExternalAccessibilityDescription" = "章节";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Time"; ObjectID = "24"; */
|
||||
"24.headerCell.title" = "时间";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Title"; ObjectID = "25"; */
|
||||
"25.headerCell.title" = "标题";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Delete selected chapter"; ObjectID = "31"; */
|
||||
"31.ibShadowedToolTip" = "删除所选章节";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Add chapter"; ObjectID = "42"; */
|
||||
"42.ibShadowedToolTip" = "添加章节";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rename every chapter"; ObjectID = "SOg-Lz-v5L"; */
|
||||
"SOg-Lz-v5L.title" = "重命名所有章节";
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Class = "NSButtonCell"; title = "Save"; ObjectID = "4p7-7v-cUB"; */
|
||||
"4p7-7v-cUB.title" = "存储";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Metadata"; ObjectID = "11"; */
|
||||
"11.label" = "元数据";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Artwork"; ObjectID = "15"; */
|
||||
"15.label" = "插图";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Add metadata item"; ObjectID = "30"; */
|
||||
"30.ibExternalAccessibilityDescription" = "添加元数据条目";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add a new metadata item"; ObjectID = "30"; */
|
||||
"30.ibShadowedToolTip" = "添加一个新的元数据条目";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibExternalAccessibilityDescription" = "移除所选项";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibShadowedToolTip" = "移除所选项";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "179"; */
|
||||
"179.ibExternalAccessibilityDescription" = "预设";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "aiW-0y-PWH"; */
|
||||
"aiW-0y-PWH.title" = "保留现有注释";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "doa-uZ-CNr"; */
|
||||
"doa-uZ-CNr.title" = "保留现有插图";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotation"; ObjectID = "j7q-XE-YXB"; */
|
||||
"j7q-XE-YXB.headerCell.title" = "注释";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "os0-Yb-exW"; */
|
||||
"os0-Yb-exW.headerCell.title" = "值";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata"; ObjectID = "qg5-r0-E4V"; */
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "元数据";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "sNX-Z3-AtD"; */
|
||||
"sNX-Z3-AtD.title" = "取消";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Name:"; ObjectID = "ZqF-j8-NeN"; */
|
||||
"ZqF-j8-NeN.title" = "名称:";
|
||||
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "ZRj-hi-qeJ"; */
|
||||
"ZRj-hi-qeJ.title" = "窗口";
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* Class = "NSTextFieldCell"; title = "%lu tracks selected"; ObjectID = "Mo5-ii-LsO"; */
|
||||
"Mo5-ii-LsO.title" = "已选中 %lu 个轨道";
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/* Class = "NSMenuItem"; title = "3"; ObjectID = "1xu-y0-sPc"; */
|
||||
"1xu-y0-sPc.title" = "3";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "+ 0 db"; ObjectID = "5af-rM-3Vd"; */
|
||||
"5af-rM-3Vd.title" = "+0 db";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "+6 db"; ObjectID = "5ZH-ms-h3O"; */
|
||||
"5ZH-ms-h3O.title" = "+6 db";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Sound Settings"; ObjectID = "6"; */
|
||||
"6.label" = "声音设置";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Fallback:"; ObjectID = "8KY-0L-cm1"; */
|
||||
"8KY-0L-cm1.title" = "回退:";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Media Characteristics"; ObjectID = "22R-da-Q3B"; */
|
||||
"22R-da-Q3B.label" = "媒体特征";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Alternate Group:"; ObjectID = "CTV-P7-IaD"; */
|
||||
"CTV-P7-IaD.title" = "轨道分组:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Subtitles:"; ObjectID = "dbp-55-tUy"; */
|
||||
"dbp-55-tUy.title" = "字幕:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "-∞ db"; ObjectID = "dCR-ej-bsH"; */
|
||||
"dCR-ej-bsH.title" = "-∞ db";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "4"; ObjectID = "e5A-Zf-BwW"; */
|
||||
"e5A-Zf-BwW.title" = "4";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "5"; ObjectID = "F8Z-GJ-QaV"; */
|
||||
"F8Z-GJ-QaV.title" = "5";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "1"; ObjectID = "mXc-eW-usD"; */
|
||||
"mXc-eW-usD.title" = "1";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "QBa-Jt-TO2"; */
|
||||
"QBa-Jt-TO2.title" = "无";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "Qdb-gu-B3h"; */
|
||||
"Qdb-gu-B3h.title" = "无";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "6"; ObjectID = "RPZ-ZF-Pvg"; */
|
||||
"RPZ-ZF-Pvg.title" = "6";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "2"; ObjectID = "xjR-b6-VG2"; */
|
||||
"xjR-b6-VG2.title" = "2";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Volume:"; ObjectID = "Z5x-Oq-P8Z"; */
|
||||
"Z5x-Oq-P8Z.title" = "音量:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "Zgh-b7-8aY"; */
|
||||
"Zgh-b7-8aY.title" = "无";
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Scaled Size:"; ObjectID = "1O9-J3-Plk"; */
|
||||
"1O9-J3-Plk.title" = "缩放尺寸:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "3"; ObjectID = "3D2-8h-I0N"; */
|
||||
"3D2-8h-I0N.title" = "3";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Visual Settings"; ObjectID = "6"; */
|
||||
"6.label" = "视觉设置";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "pixels"; ObjectID = "6I1-7O-uon"; */
|
||||
"6I1-7O-uon.title" = "像素";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Implicit"; ObjectID = "6PY-Np-Y3s"; */
|
||||
"6PY-Np-Y3s.title" = "缺省";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "pixels"; ObjectID = "7as-HC-onR"; */
|
||||
"7as-HC-onR.title" = "像素";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "7Ug-k7-d7I"; */
|
||||
"7Ug-k7-d7I.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 2020 (9-1-9)"; ObjectID = "8V9-Sh-Mnu"; */
|
||||
"8V9-Sh-Mnu.title" = "Rec. 2020 (9-1-9)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Baseline @ 2.1 (iPod classic, iPod nano)"; ObjectID = "8y5-eT-wSx"; */
|
||||
"8y5-eT-wSx.title" = "Baseline @ 2.1 (iPod classic, iPod nano)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "2"; ObjectID = "a5f-nN-J1C"; */
|
||||
"a5f-nN-J1C.title" = "2";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "4"; ObjectID = "B3w-wZ-pOJ"; */
|
||||
"B3w-wZ-pOJ.title" = "4";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 709 (1-1-1)"; ObjectID = "bc1-gr-6m9"; */
|
||||
"bc1-gr-6m9.title" = "Rec. 709 (1-1-1)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Main @ 3.1 (iPhone, iPod touch, iPad, tv)"; ObjectID = "bMn-03-nc8"; */
|
||||
"bMn-03-nc8.title" = "Main @ 3.1 (iPhone, iPod touch, iPad, tv)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Color Space:"; ObjectID = "BZv-h3-OMk"; */
|
||||
"BZv-h3-OMk.title" = "色域:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 2100 PQ (9-16-9)"; ObjectID = "d2S-Qf-ltk"; */
|
||||
"d2S-Qf-ltk.title" = "Rec. 2100 PQ (9-16-9)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "5"; ObjectID = "Ejg-9c-E4w"; */
|
||||
"Ejg-9c-E4w.title" = "5";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "pixels"; ObjectID = "EQ0-oQ-E9J"; */
|
||||
"EQ0-oQ-E9J.title" = "像素";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "P3-D65 (12-17-6)"; ObjectID = "fNy-M4-iaz"; */
|
||||
"fNy-M4-iaz.title" = "P3-D65 (12-17-6)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Alternate Group:"; ObjectID = "Fye-Hi-zqu"; */
|
||||
"Fye-Hi-zqu.title" = "轨道分组:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "You should only change the video profile if you want to load the file onto one of the devices listed and have been unable to do so. However, if the video file uses advanced features of the codec, then the file may still be unplayable on the device."; ObjectID = "gcL-yf-yxF"; */
|
||||
"gcL-yf-yxF.title" = "仅当您要将文件加载到列出的设备之一且无法加载时,才应更改视频配置文件。但是,如果视频文件使用编解码器的高级功能,则该文件可能仍无法在设备上播放。";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "GfY-OY-SWL"; */
|
||||
"GfY-OY-SWL.title" = "x";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Forced:"; ObjectID = "gMo-yz-dz5"; */
|
||||
"gMo-yz-dz5.title" = "强制:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "H3I-ix-0Ay"; */
|
||||
"H3I-ix-0Ay.title" = "无";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Some Samples Are Forced"; ObjectID = "i0h-ag-Pc5"; */
|
||||
"i0h-ag-Pc5.title" = "强制部分样本";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Aspect Ratio Denominator"; ObjectID = "ifV-jn-Kjv"; */
|
||||
"ifV-jn-Kjv.ibExternalAccessibilityDescription" = "横纵比分母";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "ILN-KP-l0z"; */
|
||||
"ILN-KP-l0z.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "No"; ObjectID = "KOg-FR-dr6"; */
|
||||
"KOg-FR-dr6.title" = "否";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "sRGB (1-13-1)"; ObjectID = "l0E-aL-LGd"; */
|
||||
"l0E-aL-LGd.title" = "sRGB (1-13-1)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 2100 HLG (9-18-9)"; ObjectID = "lAn-vv-Amd"; */
|
||||
"lAn-vv-Amd.title" = "Rec. 2100 HLG (9-18-9)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "x"; ObjectID = "lgq-Fj-LB5"; */
|
||||
"lgq-Fj-LB5.title" = "x";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "All Samples Are Forced"; ObjectID = "MLa-b8-424"; */
|
||||
"MLa-b8-424.title" = "强制全部样本";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "High @ 3.1"; ObjectID = "Mre-1h-VoX"; */
|
||||
"Mre-1h-VoX.title" = "High @ 3.1";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Scaled Size Height"; ObjectID = "n9M-HO-S4Z"; */
|
||||
"n9M-HO-S4Z.ibExternalAccessibilityDescription" = "缩放尺寸高";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Current profile: unknown"; ObjectID = "NIA-f8-VWx"; */
|
||||
"NIA-f8-VWx.title" = "当前配置文件:未知";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Forced track:"; ObjectID = "NPR-jz-Ile"; */
|
||||
"NPR-jz-Ile.title" = "强制轨道:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Preserve Aspect Ratio"; ObjectID = "nr0-Jc-cUj"; */
|
||||
"nr0-Jc-cUj.title" = "保留横纵比";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "H.264 Video Profile/Level:"; ObjectID = "nrd-22-FZl"; */
|
||||
"nrd-22-FZl.title" = "H.264 视频 Profile/Level:";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Aspect Ratio Numerator"; ObjectID = "Q0D-6k-Hgx"; */
|
||||
"Q0D-6k-Hgx.ibExternalAccessibilityDescription" = "横纵比分子";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Aspect Ratio:"; ObjectID = "Q8w-0e-NRr"; */
|
||||
"Q8w-0e-NRr.title" = "横纵比:";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Offset X"; ObjectID = "qFL-0W-Ye6"; */
|
||||
"qFL-0W-Ye6.ibExternalAccessibilityDescription" = "偏移 X";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Scaled Size Width"; ObjectID = "r90-c5-7PH"; */
|
||||
"r90-c5-7PH.ibExternalAccessibilityDescription" = "缩放尺寸宽";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "1"; ObjectID = "S4p-0Y-kRW"; */
|
||||
"S4p-0Y-kRW.title" = "1";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Normal Size:"; ObjectID = "soD-gL-b4G"; */
|
||||
"soD-gL-b4G.title" = "正常尺寸:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "6"; ObjectID = "sqU-tK-Ekm"; */
|
||||
"sqU-tK-Ekm.title" = "6";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Offset:"; ObjectID = "ubI-H1-utj"; */
|
||||
"ubI-H1-utj.title" = "偏移:";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "None"; ObjectID = "vVg-S9-JUk"; */
|
||||
"vVg-S9-JUk.title" = "无";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Offset Y"; ObjectID = "wlV-Oh-ui5"; */
|
||||
"wlV-Oh-ui5.ibExternalAccessibilityDescription" = "偏移 Y";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 601 (5-1-6)"; ObjectID = "X7B-de-Yur"; */
|
||||
"X7B-de-Yur.title" = "Rec. 601 (5-1-6)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "High @ 4.1"; ObjectID = "Xeg-lb-cfA"; */
|
||||
"Xeg-lb-cfA.title" = "High @ 4.1";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Rec. 601 (6-1-6)"; ObjectID = "XQd-tC-sVM"; */
|
||||
"XQd-tC-sVM.title" = "Rec. 601 (6-1-6)";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "P3-DCI (11-17-6)"; ObjectID = "z4V-UV-xor"; */
|
||||
"z4V-UV-xor.title" = "P3-DCI (11-17-6)";
|
||||
|
||||
/* Class = "NSTabViewItem"; label = "Media Characteristics"; ObjectID = "ZZa-lk-8Uv"; */
|
||||
"ZZa-lk-8Uv.label" = "媒体特征";
|
||||
|
||||
+13
-6
@@ -46,8 +46,7 @@ final class Queue {
|
||||
|
||||
do {
|
||||
let data = try Data(contentsOf: url)
|
||||
let unarchiver = NSKeyedUnarchiver(forReadingWith: data)
|
||||
unarchiver.requiresSecureCoding = true
|
||||
let unarchiver = try NSKeyedUnarchiver(forReadingFrom: data)
|
||||
if let decodedItems = try unarchiver.decodeTopLevelObject(of: [NSArray.classForCoder(), NSMutableArray.classForCoder(), QueueItem.classForCoder()], forKey: NSKeyedArchiveRootObjectKey) as? [QueueItem] {
|
||||
items = decodedItems
|
||||
} else {
|
||||
@@ -55,6 +54,7 @@ final class Queue {
|
||||
}
|
||||
unarchiver.finishDecoding()
|
||||
} catch {
|
||||
self.logger.writeError(toLog: error)
|
||||
items = []
|
||||
}
|
||||
|
||||
@@ -63,13 +63,20 @@ final class Queue {
|
||||
|
||||
func saveToDisk() throws {
|
||||
arrayQueue.sync {
|
||||
let data = NSMutableData()
|
||||
let archiver = NSKeyedArchiver(forWritingWith: data)
|
||||
archiver.requiresSecureCoding = true
|
||||
let archiver = NSKeyedArchiver(requiringSecureCoding: true)
|
||||
archiver.encode(items, forKey: NSKeyedArchiveRootObjectKey)
|
||||
archiver.finishEncoding()
|
||||
|
||||
data.write(to: url, atomically: true)
|
||||
// The Application Support/SublerMKV folder must exist before an
|
||||
// atomic write (a fresh install has none, and the write error is
|
||||
// swallowed below, which would silently disable persistence)
|
||||
let fileManager = FileManager.default
|
||||
let directory = url.deletingLastPathComponent()
|
||||
if fileManager.fileExists(atPath: directory.path) == false {
|
||||
try? fileManager.createDirectory(at: directory, withIntermediateDirectories: true, attributes: [:])
|
||||
}
|
||||
|
||||
try? archiver.encodedData.write(to: url, options: [.atomic])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+46
-28
@@ -106,6 +106,14 @@ class QueueSubtitlesAction : NSObject, QueueActionProtocol {
|
||||
|
||||
for importer in subtitlesImporters {
|
||||
for track in importer.tracks {
|
||||
// Honor addTrack:'s conversion-settings invariant (see
|
||||
// Document.readMatroska / importSubtitleTracksForMatroska):
|
||||
// the MP4 path converts text subs to tx3g at mux time; a
|
||||
// Matroska remux ignores the settings and re-parses the text
|
||||
// from track.URL as S_TEXT/UTF8 instead.
|
||||
if trackNeedConversion(track.format), let subtitleTrack = track as? MP42SubtitleTrack {
|
||||
subtitleTrack.conversionSettings = MP42ConversionSettings.subtitlesConversion()
|
||||
}
|
||||
item.mp4File?.addTrack(track)
|
||||
}
|
||||
}
|
||||
@@ -176,23 +184,6 @@ class QueueSetAction : NSObject, QueueActionProtocol {
|
||||
|
||||
}
|
||||
|
||||
extension Array where Element == Artwork {
|
||||
|
||||
func filter(by type: ArtworkType, size: ArtworkSize, service: String) -> Artwork? {
|
||||
if type == .backdrop || type == .episode {
|
||||
let serviceArtwork = self.filter { $0.type == type && $0.service == service }.first
|
||||
let artwork = self.filter { $0.type == type }.first
|
||||
return serviceArtwork != nil ? serviceArtwork : artwork
|
||||
}
|
||||
else {
|
||||
let serviceArtwork = self.filter { $0.type == type && $0.size == size && $0.service == service }.first
|
||||
let artwork = self.filter { $0.type == type && $0.size == size}.first
|
||||
return serviceArtwork != nil ? serviceArtwork : artwork
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// An action that fetches metadata online.
|
||||
class QueueMetadataAction : NSObject, QueueActionProtocol {
|
||||
|
||||
@@ -230,14 +221,22 @@ class QueueMetadataAction : NSObject, QueueActionProtocol {
|
||||
var metadata: MetadataResult? = nil
|
||||
|
||||
switch info {
|
||||
case let .movie(title):
|
||||
case let .movie(title, id):
|
||||
let service = MetadataSearch.service(name: self.movieProvider)
|
||||
let movieSearch = MetadataSearch.movieSeach(service: service, movie: title, language: self.movieLanguage)
|
||||
_ = movieSearch.search(completionHandler: {
|
||||
if let result = $0.first {
|
||||
_ = movieSearch.loadAdditionalMetadata(result, completionHandler: { metadata = $0 }).run()
|
||||
}
|
||||
}).run()
|
||||
if let id = id {
|
||||
// The file name carries a service ID: try the direct lookup (which
|
||||
// already returns full details) before searching by title.
|
||||
let idSearch = MetadataSearch.movieIDSearch(service: service, id: id, language: self.movieLanguage)
|
||||
_ = idSearch.search(completionHandler: { metadata = $0.first }).run()
|
||||
}
|
||||
if metadata == nil {
|
||||
let movieSearch = MetadataSearch.movieSeach(service: service, movie: title, language: self.movieLanguage)
|
||||
_ = movieSearch.search(completionHandler: {
|
||||
if let result = $0.first {
|
||||
_ = movieSearch.loadAdditionalMetadata(result, completionHandler: { metadata = $0 }).run()
|
||||
}
|
||||
}).run()
|
||||
}
|
||||
case let .tvShow(seriesName, season, episode):
|
||||
let service = MetadataSearch.service(name: self.tvShowProvider)
|
||||
let tvSearch = MetadataSearch.tvSearch(service: service, tvShow: seriesName, season: season, episode: episode, language: tvShowLanguage)
|
||||
@@ -263,13 +262,13 @@ class QueueMetadataAction : NSObject, QueueActionProtocol {
|
||||
let artwork: Artwork? = {
|
||||
let provider = terms.isMovie ? self.movieProvider : self.tvShowProvider
|
||||
let type = terms.isMovie && preferredArtwork.isMovieType == false ? .poster : preferredArtwork
|
||||
if let artwork = artworks.filter(by: type, size: preferredArtworkSize, service: provider) {
|
||||
if let artwork = artworks.first(by: type, size: preferredArtworkSize, service: provider) {
|
||||
return artwork
|
||||
}
|
||||
else if let artwork = artworks.filter(by: .season, size: preferredArtworkSize, service: provider) {
|
||||
else if let artwork = artworks.first(by: .season, size: preferredArtworkSize, service: provider) {
|
||||
return artwork
|
||||
}
|
||||
else if let artwork = artworks.filter(by: .poster, size: .standard, service: provider) {
|
||||
else if let artwork = artworks.first(by: .poster, size: .standard, service: provider) {
|
||||
return artwork
|
||||
}
|
||||
else {
|
||||
@@ -301,7 +300,7 @@ class QueueMetadataAction : NSObject, QueueActionProtocol {
|
||||
extendedLanguageTag: nil))
|
||||
}
|
||||
|
||||
file.metadata.merge(metadata)
|
||||
file.metadata.merge(metadata, overwrite: true)
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -348,6 +347,12 @@ class QueueOrganizeGroupsAction : NSObject, QueueActionProtocol {
|
||||
override init() {}
|
||||
|
||||
func runAction(_ item: QueueItem) -> Bool {
|
||||
// Organize/infer must never touch a Matroska item: same rule as the
|
||||
// window's didSelect/import paths — the tags-only model is the tag
|
||||
// writer's positional diff baseline against the file's TrackEntry
|
||||
// list — and language/characteristic inference has no Matroska
|
||||
// equivalent to write into anyway.
|
||||
guard item.isMatroska == false else { return true }
|
||||
item.mp4File?.organizeAlternateGroups()
|
||||
item.mp4File?.inferTracksLanguages()
|
||||
item.mp4File?.inferMediaCharacteristics()
|
||||
@@ -370,6 +375,9 @@ class QueueFixFallbacksAction : NSObject, QueueActionProtocol {
|
||||
override init() {}
|
||||
|
||||
func runAction(_ item: QueueItem) -> Bool {
|
||||
// Fallback tracks are an MP4 track-reference concept; a Matroska
|
||||
// retag has nothing to link.
|
||||
guard item.isMatroska == false else { return true }
|
||||
item.mp4File?.setAutoFallback()
|
||||
return true
|
||||
}
|
||||
@@ -549,6 +557,10 @@ class QueueColorSpaceAction : NSObject, QueueActionProtocol {
|
||||
}
|
||||
|
||||
func runAction(_ item: QueueItem) -> Bool {
|
||||
// Color atoms are not among the four track fields a Matroska retag
|
||||
// writes (name/language/enabled/forced) — the window keeps the video
|
||||
// tab read-only on MKV docs for the same reason.
|
||||
guard item.isMatroska == false else { return true }
|
||||
if let tracks = item.mp4File?.tracks(withMediaType: kMP42MediaType_Video) as? [MP42VideoTrack] {
|
||||
for track in tracks {
|
||||
if track.format == kMP42VideoCodecType_H264 ||
|
||||
@@ -590,6 +602,12 @@ class QueueOptimizeAction: NSObject, QueueActionProtocol {
|
||||
override init() {}
|
||||
|
||||
func runAction(_ item: QueueItem) -> Bool {
|
||||
// On a Matroska item "optimize" is the forced full rebuild that the
|
||||
// write pass already performed (QueueItem.process sees this action
|
||||
// and forces the MatroskaSaver remux branch — the container-
|
||||
// equivalent of atom reordering); MP4Optimize would have nothing to
|
||||
// reorderBy on a tags-only model.
|
||||
if item.isMatroska { return true }
|
||||
return item.mp4File?.optimize() ?? false
|
||||
}
|
||||
|
||||
|
||||
+121
-48
@@ -6,9 +6,10 @@
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
import UserNotifications
|
||||
import MP42Foundation
|
||||
|
||||
final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate, ItemViewDelegate, NSTableViewDataSource, NSTableViewDelegate, ExpandedTableViewDelegate, NSUserInterfaceValidations {
|
||||
final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate, ItemViewDelegate, NSTableViewDataSource, NSTableViewDelegate, ExpandedTableViewDelegate, UNUserNotificationCenterDelegate, NSUserInterfaceValidations {
|
||||
|
||||
static let shared = QueueController()
|
||||
|
||||
@@ -16,13 +17,17 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
private let prefs = QueuePreferences()
|
||||
private var popover: NSPopover?
|
||||
private var itemPopover: NSPopover?
|
||||
private var windowController: OptionsViewController?
|
||||
private let toolbarDelegate = QueueToolbarDelegate()
|
||||
|
||||
private let tablePasteboardType = NSPasteboard.PasteboardType("SublerQueueTableViewDataType")
|
||||
private lazy var docImg: NSImage = {
|
||||
// Load a generic movie icon to display in the table view
|
||||
let img = NSWorkspace.shared.icon(forFileType: "mov")
|
||||
let img = {
|
||||
if #available(macOS 12, *) {
|
||||
return NSWorkspace.shared.icon(for: .quickTimeMovie)
|
||||
} else {
|
||||
return NSWorkspace.shared.icon(forFileType: "mov")
|
||||
}
|
||||
}()
|
||||
img.size = NSSize(width: 16, height: 16)
|
||||
return img
|
||||
}()
|
||||
@@ -38,7 +43,6 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
private init() {
|
||||
popover = nil
|
||||
itemPopover = nil
|
||||
windowController = nil
|
||||
if let url = prefs.queueURL {
|
||||
queue = Queue(url: url)
|
||||
} else {
|
||||
@@ -68,15 +72,21 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
toolbar.allowsUserCustomization = true
|
||||
toolbar.autosavesConfiguration = true
|
||||
if #available(macOS 26, *) {
|
||||
toolbar.displayMode = .iconAndLabel
|
||||
} else {
|
||||
toolbar.displayMode = .iconOnly
|
||||
} else {
|
||||
toolbar.displayMode = .iconAndLabel
|
||||
}
|
||||
self.window?.toolbar = toolbar
|
||||
|
||||
table.registerForDraggedTypes([NSPasteboard.PasteboardType.fileURL, tablePasteboardType])
|
||||
table.registerForDraggedTypes([NSPasteboard.PasteboardType.fileURL, .tableViewIndex])
|
||||
progressBar.isHidden = true
|
||||
|
||||
if #available(macOS 11, *) {
|
||||
let center = UNUserNotificationCenter.current()
|
||||
center.delegate = self
|
||||
center.requestAuthorization(options: [.sound, .alert], completionHandler: {_,_ in })
|
||||
}
|
||||
|
||||
let main = OperationQueue.main
|
||||
let nc = NotificationCenter.default
|
||||
|
||||
@@ -110,18 +120,36 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
self.updateUI()
|
||||
|
||||
if self.prefs.showDoneNotification, let info = note.userInfo {
|
||||
let notification = NSUserNotification()
|
||||
notification.title = NSLocalizedString("Queue Done", comment: "")
|
||||
let title = NSLocalizedString("Queue Done", comment: "")
|
||||
let informativeText = {
|
||||
if let failedCount = info["FailedCount"] as? UInt, failedCount > 0,
|
||||
let completedCount = info["CompletedCount"] as? UInt {
|
||||
return "Completed: \(completedCount); Failed: \(failedCount)"
|
||||
}
|
||||
else if let completedCount = info["CompletedCount"] as? UInt {
|
||||
return "Completed: \(completedCount)"
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}()
|
||||
|
||||
if let failedCount = info["FailedCount"] as? UInt, failedCount > 0,
|
||||
let completedCount = info["CompletedCount"] as? UInt {
|
||||
notification.informativeText = "Completed: \(completedCount); Failed: \(failedCount)"
|
||||
if #available(macOS 11, *) {
|
||||
let notification = UNMutableNotificationContent()
|
||||
notification.title = title
|
||||
notification.body = informativeText
|
||||
notification.sound = UNNotificationSound.default
|
||||
|
||||
let request = UNNotificationRequest(identifier: UUID().uuidString,
|
||||
content: notification,
|
||||
trigger: nil)
|
||||
UNUserNotificationCenter.current().add(request) { _ in }
|
||||
} else {
|
||||
let notification = NSUserNotification()
|
||||
notification.title = title
|
||||
notification.informativeText = informativeText
|
||||
notification.soundName = NSUserNotificationDefaultSoundName
|
||||
NSUserNotificationCenter.default.deliver(notification)
|
||||
}
|
||||
else if let completedCount = info["CompletedCount"] as? UInt {
|
||||
notification.informativeText = "Completed: \(completedCount)"
|
||||
}
|
||||
notification.soundName = NSUserNotificationDefaultSoundName
|
||||
NSUserNotificationCenter.default.deliver(notification)
|
||||
}
|
||||
|
||||
for script in self.scripts {
|
||||
@@ -187,6 +215,13 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: Notification delegate
|
||||
|
||||
@available(macOS 10.14, *)
|
||||
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
|
||||
completionHandler([.sound])
|
||||
}
|
||||
|
||||
//MARK: Queue
|
||||
|
||||
func saveToDisk() throws {
|
||||
@@ -201,7 +236,7 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
updateUI(indexes: IndexSet(integer: queue.index(of: item)))
|
||||
|
||||
DispatchQueue.global().async {
|
||||
if originalStatus != .completed {
|
||||
if originalStatus != .completed, item.isMatroska == false {
|
||||
do {
|
||||
try item.prepare()
|
||||
} catch {
|
||||
@@ -216,6 +251,13 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
var doc: Document?
|
||||
if originalStatus == .completed {
|
||||
try doc = Document(contentsOf: item.destURL, ofType: "")
|
||||
} else if item.isMatroska {
|
||||
// Open the source file instead of the item's model:
|
||||
// only the document's own MKV read sets up a complete
|
||||
// tags-only Matroska document (Document.readMatroska
|
||||
// builds the pairing/staleness baseline the save
|
||||
// writes back through).
|
||||
try doc = Document(contentsOf: item.fileURL, ofType: "")
|
||||
} else if let mp4 = item.mp4File {
|
||||
doc = Document(mp4: mp4)
|
||||
}
|
||||
@@ -242,11 +284,32 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
//MARK: Items creation
|
||||
|
||||
private func destination(for url: URL) -> URL {
|
||||
// Matroska files are retagged in their own container by the queue
|
||||
// (matching the window's save), so the extension must survive: the
|
||||
// file itself when no destination folder is set (in-place retag), or
|
||||
// the same name in the folder (a stream-copy remux writes it there,
|
||||
// the queue equivalent of Save-As).
|
||||
if MP42FileImporter.isMatroskaFileType(url.pathExtension) {
|
||||
if let destination = prefs.destination {
|
||||
return destination.appendingPathComponent(url.lastPathComponent)
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
let value = try? url.resourceValues(forKeys: [URLResourceKey.typeIdentifierKey])
|
||||
|
||||
var isMpeg4 = false
|
||||
if #available(macOS 11, *) {
|
||||
isMpeg4 = value?.contentType?.conforms(to: .mpeg4Movie) ?? false
|
||||
} else {
|
||||
if let type = value?.typeIdentifier, UTTypeConformsTo(type as CFString, "public.mpeg-4" as CFString) {
|
||||
isMpeg4 = true
|
||||
}
|
||||
}
|
||||
|
||||
if let destination = prefs.destination {
|
||||
return destination.appendingPathComponent(url.lastPathComponent).deletingPathExtension().appendingPathExtension(prefs.fileType)
|
||||
} else if let type = value?.typeIdentifier, UTTypeConformsTo(type as CFString, "public.mpeg-4" as CFString) {
|
||||
} else if isMpeg4 {
|
||||
return url
|
||||
} else {
|
||||
return url.deletingPathExtension().appendingPathExtension(prefs.fileType)
|
||||
@@ -411,7 +474,9 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
}
|
||||
|
||||
table.removeRows(at: indexes, withAnimation: .slideUp)
|
||||
table.selectRowIndexes(IndexSet(integer: indexes.first!), byExtendingSelection: false)
|
||||
if let index = indexes.first, index < queue.count {
|
||||
table.selectRowIndexes(IndexSet(integer: index), byExtendingSelection: false)
|
||||
}
|
||||
|
||||
table.endUpdates()
|
||||
updateState()
|
||||
@@ -570,10 +635,6 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
}
|
||||
}
|
||||
|
||||
func windowWillClose(_ notification: Notification) {
|
||||
windowController = nil
|
||||
}
|
||||
|
||||
//MARK: UI
|
||||
|
||||
/// Updates the count on the app dock icon.
|
||||
@@ -683,7 +744,12 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
panel.allowsMultipleSelection = true
|
||||
panel.canChooseFiles = true
|
||||
panel.canChooseDirectories = true
|
||||
panel.allowedFileTypes = MP42FileImporter.supportedFileFormats()
|
||||
|
||||
if #available(macOS 11, *) {
|
||||
panel.allowedContentTypes = MP42FileImporter.supportedContentTypes()
|
||||
} else {
|
||||
panel.allowedFileTypes = MP42FileImporter.supportedFileFormats()
|
||||
}
|
||||
|
||||
panel.beginSheetModal(for: windowForSheet) { (response) in
|
||||
if response == NSApplication.ModalResponse.OK {
|
||||
@@ -771,41 +837,48 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
|
||||
//MARK: Drag & Drop
|
||||
|
||||
func tableView(_ tableView: NSTableView, writeRowsWith rowIndexes: IndexSet, to pboard: NSPasteboard) -> Bool {
|
||||
let data = try? NSKeyedArchiver.archivedData(withRootObject: rowIndexes, requiringSecureCoding: true)
|
||||
pboard.declareTypes([tablePasteboardType], owner: self)
|
||||
pboard.setData(data, forType: tablePasteboardType)
|
||||
return true
|
||||
func tableView(_ tableView: NSTableView,
|
||||
pasteboardWriterForRow row: Int) -> (any NSPasteboardWriting)? {
|
||||
let item = PasteboardItem(index: row, type: .tableViewIndex)
|
||||
return item
|
||||
}
|
||||
|
||||
func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
|
||||
if info.draggingSource == nil {
|
||||
tableView.setDropRow(row, dropOperation: .above)
|
||||
func tableView(_ tableView: NSTableView,
|
||||
validateDrop info: NSDraggingInfo,
|
||||
proposedRow row: Int,
|
||||
proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
|
||||
guard dropOperation == .above else { return [] }
|
||||
|
||||
if let source = info.draggingSource as? NSTableView,
|
||||
tableView == source
|
||||
{
|
||||
return .move
|
||||
} else if info.draggingSource == nil {
|
||||
return .copy
|
||||
} else if let source = info.draggingSource as? NSTableView, tableView == source && dropOperation == .above {
|
||||
return .every
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool {
|
||||
let pboard = info.draggingPasteboard
|
||||
|
||||
if let source = info.draggingSource as? NSTableView, source == tableView, let rowData = pboard.data(forType: tablePasteboardType), let rowIndexes = NSKeyedUnarchiver.unarchiveObject(with: rowData) as? IndexSet {
|
||||
func tableView(_ tableView: NSTableView,
|
||||
acceptDrop info: NSDraggingInfo,
|
||||
row: Int,
|
||||
dropOperation: NSTableView.DropOperation) -> Bool {
|
||||
guard let pasteboardItems = info.draggingPasteboard.pasteboardItems
|
||||
else { return false }
|
||||
|
||||
if let source = info.draggingSource as? NSTableView,
|
||||
source == tableView
|
||||
{
|
||||
let rowIndexes = IndexSet(pasteboardItems.compactMap { $0.integer(forType: .tableViewIndex) })
|
||||
let items = queue.items(at: rowIndexes)
|
||||
move(items: items, at: row)
|
||||
return true
|
||||
|
||||
} else {
|
||||
|
||||
if pboard.types?.contains(NSPasteboard.PasteboardType.fileURL) ?? false {
|
||||
if let items = pboard.readObjects(forClasses: [NSURL.classForCoder()], options: [:]) as? [URL] {
|
||||
insert(contentOf: items, at: row)
|
||||
}
|
||||
return true
|
||||
} else if info.draggingPasteboard.types?.contains(NSPasteboard.PasteboardType.fileURL) ?? false {
|
||||
if let items = info.draggingPasteboard.readObjects(forClasses: [NSURL.classForCoder()], options: [:]) as? [URL] {
|
||||
insert(contentOf: items, at: row)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
+128
-28
@@ -41,6 +41,26 @@ import MP42Foundation
|
||||
var mp4File: MP42File?
|
||||
var localizedWorkingDescription: String?
|
||||
|
||||
// Matroska items mirror the window's save: a tags-only model whose
|
||||
// metadata is written back into the original file (never muxed to MP4).
|
||||
// The pairing baseline (which importer tracks back which TrackEntry
|
||||
// elements, chapter rows, file size/mtime) lives in the saver; it's
|
||||
// transient — a resumed queue re-imports the file instead.
|
||||
private var matroskaSaver: MatroskaSaver?
|
||||
/// An item is Matroska iff its source file is one: always true for both
|
||||
/// entry paths (a queue file chosen by extension, a document's source),
|
||||
/// and derived (never archived) so prepare() and process() can't disagree.
|
||||
var isMatroska: Bool {
|
||||
return MP42FileImporter.isMatroskaFileType(fileURL.pathExtension)
|
||||
}
|
||||
|
||||
/// A document being sent to the queue hands its Matroska baseline to the
|
||||
/// item: the pairing is by object identity, so it travels with the exact
|
||||
/// model the document was editing.
|
||||
func attachMatroskaSaver(_ saver: MatroskaSaver) {
|
||||
matroskaSaver = saver
|
||||
}
|
||||
|
||||
weak var delegate: Queue?
|
||||
|
||||
private var statusInternal: Status
|
||||
@@ -107,6 +127,21 @@ import MP42Foundation
|
||||
}
|
||||
}
|
||||
|
||||
/// Document handoff (send to queue / AppleScript) that must keep the
|
||||
/// original file as the source: unlike init(mp4:destURL:...) the
|
||||
/// destination may differ from the source — a Matroska item writes back
|
||||
/// into the source in place, or stream-copy remuxes to a different
|
||||
/// destination (plus the baseline from attachMatroskaSaver).
|
||||
convenience init(mp4: MP42File, fileURL: URL, destURL: URL, attributes: [String : Any] = [:], optimize: Bool = false) {
|
||||
self.init(fileURL: fileURL, destURL: destURL)
|
||||
self.mp4File = mp4
|
||||
self.attributes = attributes
|
||||
|
||||
if optimize {
|
||||
addAction(QueueOptimizeAction())
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Public properties
|
||||
|
||||
@objc dynamic var status: Status {
|
||||
@@ -253,28 +288,19 @@ import MP42Foundation
|
||||
#endif
|
||||
|
||||
if mp4File == nil {
|
||||
let value = try? fileURL.resourceValues(forKeys: [URLResourceKey.typeIdentifierKey])
|
||||
|
||||
if let type = value?.typeIdentifier, type == "com.apple.m4a-audio" || type == "com.apple.m4v-video" || type == "public.mpeg-4" {
|
||||
mp4File = try MP42File(url: fileURL)
|
||||
} else {
|
||||
let mp4 = MP42File()
|
||||
let importer = try MP42FileImporter(url: fileURL)
|
||||
let activeTracks = importer.tracks.filter { isTrackMuxable($0.format) || trackNeedConversion($0.format) }
|
||||
|
||||
mp4.metadata.merge(importer.metadata)
|
||||
|
||||
for track in activeTracks {
|
||||
|
||||
if let track = track as? MP42AudioTrack {
|
||||
configureAudio(track: track, mp4: mp4)
|
||||
} else if let track = track as? MP42SubtitleTrack {
|
||||
configureSubtitles(track: track, mp4: mp4)
|
||||
}
|
||||
|
||||
mp4.addTrack(track)
|
||||
}
|
||||
if isMatroska {
|
||||
// Match the window's MKV open (Document.readMatroska): the
|
||||
// tags-only model gets retagged into the original file at
|
||||
// write time instead of being converted to MP4. The saver
|
||||
// snapshots the pairing/staleness baseline from this import;
|
||||
// a handoff item carries its model (and attached saver) and
|
||||
// never gets here.
|
||||
let importer = try MP42FileImporter(url: fileURL, tagsOnly: true)
|
||||
let mp4 = MatroskaSaver.buildModel(from: importer)
|
||||
matroskaSaver = MatroskaSaver(sourceURL: fileURL, importer: importer, model: mp4)
|
||||
mp4File = mp4
|
||||
} else {
|
||||
try importForConversion()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,6 +311,32 @@ import MP42Foundation
|
||||
}
|
||||
}
|
||||
|
||||
private func importForConversion() throws {
|
||||
let value = try? fileURL.resourceValues(forKeys: [URLResourceKey.typeIdentifierKey])
|
||||
|
||||
if let type = value?.typeIdentifier, type == "com.apple.m4a-audio" || type == "com.apple.m4v-video" || type == "public.mpeg-4" {
|
||||
mp4File = try MP42File(url: fileURL)
|
||||
} else {
|
||||
let mp4 = MP42File()
|
||||
let importer = try MP42FileImporter(url: fileURL)
|
||||
let activeTracks = importer.tracks.filter { isTrackMuxable($0.format) || trackNeedConversion($0.format) }
|
||||
|
||||
mp4.metadata.merge(importer.metadata, overwrite: true)
|
||||
|
||||
for track in activeTracks {
|
||||
|
||||
if let track = track as? MP42AudioTrack {
|
||||
configureAudio(track: track, mp4: mp4)
|
||||
} else if let track = track as? MP42SubtitleTrack {
|
||||
configureSubtitles(track: track, mp4: mp4)
|
||||
}
|
||||
|
||||
mp4.addTrack(track)
|
||||
}
|
||||
mp4File = mp4
|
||||
}
|
||||
}
|
||||
|
||||
func process() throws {
|
||||
|
||||
guard let filePathURL = (fileURL as NSURL?)?.filePathURL else { return }
|
||||
@@ -296,6 +348,7 @@ import MP42Foundation
|
||||
defer {
|
||||
mp4File?.progressHandler = nil
|
||||
mp4File = nil
|
||||
matroskaSaver = nil
|
||||
}
|
||||
|
||||
// The file has been added directly to the queue
|
||||
@@ -310,6 +363,9 @@ import MP42Foundation
|
||||
#endif
|
||||
|
||||
mp4.progressHandler = { [weak self] in self?.delegate?.updateProgress($0) }
|
||||
matroskaSaver?.progressHandler = { [weak self] progress in
|
||||
self?.delegate?.updateProgress(progress)
|
||||
}
|
||||
|
||||
// Check if there is enough space on the destination disk
|
||||
if filePathURL != destURL {
|
||||
@@ -320,7 +376,24 @@ import MP42Foundation
|
||||
}
|
||||
|
||||
if cancelled == false {
|
||||
if filePathURL == destURL && mp4.hasFileRepresentation {
|
||||
if isMatroska {
|
||||
// Match the window's Matroska save: write metadata and the
|
||||
// four per-track fields back into the container instead of
|
||||
// muxing an MP4. Added subtitle tracks (QueueSubtitlesAction)
|
||||
// and edited chapters ride the stream-copy remuxer, as do a
|
||||
// renamed/moved destination (set-output-filename action,
|
||||
// queue destination folder) and optimize — the queue's
|
||||
// equivalent of the window's save-and-optimize full rebuild.
|
||||
// The branching is exactly Document.writeMatroska's, down to
|
||||
// in-place temp file + atomic rename.
|
||||
guard let saver = matroskaSaver else {
|
||||
throw NSError(domain: NSCocoaErrorDomain, code: NSFileWriteUnknownError,
|
||||
userInfo: [NSLocalizedDescriptionKey: NSLocalizedString("The Matroska source file is unknown.", comment: "Document MKV remux missing source error.")])
|
||||
}
|
||||
let optimizeRequested = actions.contains { $0 is QueueOptimizeAction }
|
||||
try saver.save(model: mp4, to: destURL,
|
||||
forceStructural: optimizeRequested || destURL != fileURL)
|
||||
} else if filePathURL == destURL && mp4.hasFileRepresentation {
|
||||
// We have an existing mp4 file, update it
|
||||
try mp4.update(options: attributes)
|
||||
} else {
|
||||
@@ -345,6 +418,7 @@ import MP42Foundation
|
||||
func cancel() {
|
||||
queue.sync {
|
||||
self.cancelled = true
|
||||
matroskaSaver?.cancel()
|
||||
mp4File?.cancel()
|
||||
}
|
||||
}
|
||||
@@ -378,7 +452,12 @@ import MP42Foundation
|
||||
aCoder.encode(5, forKey: "SBQueueItemTagEncodeVersion")
|
||||
|
||||
aCoder.encode(uniqueID, forKey: "SBQueueItemID")
|
||||
aCoder.encode(mp4File, forKey: "SBQueueItemMp4File")
|
||||
// A tags-only Matroska model comes back by re-importing the file —
|
||||
// its TrackEntry pairing is object identity and cannot be archived,
|
||||
// and a restored MP4 write branch could never save it anyway.
|
||||
if isMatroska == false {
|
||||
aCoder.encode(mp4File, forKey: "SBQueueItemMp4File")
|
||||
}
|
||||
|
||||
#if SB_SANDBOX
|
||||
|
||||
@@ -415,8 +494,8 @@ import MP42Foundation
|
||||
|
||||
statusInternal = QueueItem.Status(rawValue: Int(aDecoder.decodeInt32(forKey: "SBQueueItemStatus"))) ?? .failed
|
||||
mp4File = aDecoder.decodeObject(of: [MP42File.classForCoder()], forKey: "SBQueueItemMp4File") as? MP42File
|
||||
uniqueID = aDecoder.decodeObject(of: [NSString.classForCoder()], forKey: "SBQueueItemID") as! String
|
||||
attributes = aDecoder.decodeObject(of: [NSDictionary.classForCoder(), NSString.classForCoder(), NSNumber.classForCoder()], forKey: "SBQueueItemAttributes") as! [String : Any]
|
||||
uniqueID = aDecoder.decodeObject(of: [NSString.classForCoder()], forKey: "SBQueueItemID") as? String ?? UUID().uuidString
|
||||
attributes = aDecoder.decodeObject(of: [NSDictionary.classForCoder(), NSString.classForCoder(), NSNumber.classForCoder()], forKey: "SBQueueItemAttributes") as? [String : Any] ?? [:]
|
||||
|
||||
#if SB_SANDBOX
|
||||
if var bookmark = aDecoder.decodeObject(of: [NSData.classForCoder()], forKey: "SBQueueItemFileURLBookmark") as? Data {
|
||||
@@ -449,8 +528,14 @@ import MP42Foundation
|
||||
return nil
|
||||
}
|
||||
#else
|
||||
fileURL = aDecoder.decodeObject(of: [NSURL.classForCoder()], forKey: "SBQueueItemFileURL") as! URL
|
||||
destURLInternal = aDecoder.decodeObject(of: [NSURL.classForCoder()], forKey: "SBQueueItemDestURL") as! URL
|
||||
if let fileURL = aDecoder.decodeObject(of: [NSURL.classForCoder()], forKey: "SBQueueItemFileURL") as? URL,
|
||||
let destURLInternal = aDecoder.decodeObject(of: [NSURL.classForCoder()], forKey: "SBQueueItemDestURL") as? URL {
|
||||
self.fileURL = fileURL
|
||||
self.destURLInternal = destURLInternal
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
actionsInternal = aDecoder.decodeObject(of: [NSArray.classForCoder(), QueueSetAction.classForCoder(),
|
||||
@@ -460,7 +545,22 @@ import MP42Foundation
|
||||
QueueRenameChaptersAction.classForCoder(),
|
||||
QueueOrganizeGroupsAction.classForCoder(), QueueColorSpaceAction.classForCoder(),
|
||||
QueueSetOutputFilenameAction.classForCoder(), QueueClearExistingMetadataAction.classForCoder(),
|
||||
QueueOptimizeAction.classForCoder(), QueueSendToiTunesAction.classForCoder()], forKey: "SBQueueItemActions") as! [QueueActionProtocol]
|
||||
QueueOptimizeAction.classForCoder(), QueueSendToiTunesAction.classForCoder(),
|
||||
QueueChangeAudioLanguageAction.classForCoder(), QueueChangeSubtitleLanguageAction.classForCoder()], forKey: "SBQueueItemActions") as? [QueueActionProtocol] ?? []
|
||||
|
||||
// Matroska items always rebuild their tags-only model on resume
|
||||
// (prepare() re-imports — pre-actions re-run against it, so the
|
||||
// filename action re-derives the name too): the identity pairing
|
||||
// cannot survive archiving. Older archives may also carry the
|
||||
// retired convert-to-mp4 destination — point it back at the source
|
||||
// for the in-place retag.
|
||||
// (stored-property access only: super.init hasn't run yet)
|
||||
if MP42FileImporter.isMatroskaFileType(fileURL.pathExtension) {
|
||||
mp4File = nil
|
||||
if MP42FileImporter.isMatroskaFileType(destURLInternal.pathExtension) == false {
|
||||
destURLInternal = fileURL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -214,6 +214,6 @@ final class QueuePreferences: NSObject {
|
||||
}
|
||||
|
||||
var queueURL: URL? {
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler").appendingPathComponent("queue.sbqueue", isDirectory: false)
|
||||
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV").appendingPathComponent("queue.sbmkvqueue", isDirectory: false)
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,28 @@ final class SaveOptions: NSViewController {
|
||||
let types = doc.writableTypes(for: .saveAsOperation)
|
||||
|
||||
fileFormat.removeAllItems()
|
||||
|
||||
|
||||
for type in types {
|
||||
let name = UTTypeCopyDescription(type as CFString)?.takeRetainedValue() as String? ?? type
|
||||
fileFormat.addItem(withTitle: name)
|
||||
if #available(macOS 11, *) {
|
||||
let name = UTType(type)?.localizedDescription ?? type
|
||||
fileFormat.addItem(withTitle: name)
|
||||
} else {
|
||||
let name = UTTypeCopyDescription(type as CFString)?.takeRetainedValue() as String? ?? type
|
||||
fileFormat.addItem(withTitle: name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The folder the save panel should open at, or nil to leave it
|
||||
/// at the last folder used.
|
||||
private func preferredDirectory(for doc: Document) -> URL? {
|
||||
switch Prefs.saveAsLocation {
|
||||
case .automatic:
|
||||
return nil
|
||||
case .sameAsFile:
|
||||
return doc.fileURL?.deletingLastPathComponent() ?? doc.mp4.firstSourceDirectoryURL()
|
||||
case .custom:
|
||||
return Prefs.saveAsCustomLocation
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +83,10 @@ final class SaveOptions: NSViewController {
|
||||
savePanel?.nameFieldStringValue = filename
|
||||
}
|
||||
|
||||
if let url = preferredDirectory(for: doc) {
|
||||
savePanel?.directoryURL = url
|
||||
}
|
||||
|
||||
setFileType(filenameExtension: fileType)
|
||||
|
||||
_64bit_data.state = Prefs.mp464bitOffset ? .on : .off
|
||||
|
||||
+110
-65
@@ -118,9 +118,8 @@ class SBFetchMetadataScriptCommand: NSScriptCommand, ScriptCommandDocumentTarget
|
||||
DispatchQueue.main.async {
|
||||
if let metadata = metadata {
|
||||
// Apply the metadata to the file
|
||||
mp4File.metadata.merge(metadata)
|
||||
sublerDoc.updateChangeCount(.changeDone)
|
||||
|
||||
mp4File.metadata.merge(metadata, overwrite: true)
|
||||
|
||||
// Trigger UI refresh by calling reloadData on the window controller
|
||||
if let windowController = sublerDoc.windowControllers.first as? DocumentWindowController {
|
||||
windowController.reloadData()
|
||||
@@ -151,48 +150,66 @@ class SBFetchMetadataScriptCommand: NSScriptCommand, ScriptCommandDocumentTarget
|
||||
let preferredArtworkSize = ArtworkSize(rawValue: queuePrefs.providerArtworkSize) ?? .standard
|
||||
|
||||
switch terms {
|
||||
case let .movie(title):
|
||||
let movieSearch = MetadataSearch.movieSeach(service: movieService, movie: title, language: MetadataSearch.defaultLanguage(service: movieService, type: .movie))
|
||||
_ = movieSearch.search(completionHandler: { results in
|
||||
if let result = results.first {
|
||||
_ = movieSearch.loadAdditionalMetadata(result, completionHandler: { additionalMetadata in
|
||||
metadata = additionalMetadata
|
||||
|
||||
// Handle artwork similar to QueueMetadataAction
|
||||
if let metadataResult = metadata {
|
||||
let artworks = metadataResult.remoteArtworks
|
||||
|
||||
if preferredArtwork != .none && artworks.isEmpty == false {
|
||||
let artwork: Artwork? = {
|
||||
let type = preferredArtwork.isMovieType ? preferredArtwork : .poster
|
||||
if let artwork = artworks.filter(by: type, size: preferredArtworkSize, service: movieService.name) {
|
||||
return artwork
|
||||
} else if let artwork = artworks.filter(by: .poster, size: .standard, service: movieService.name) {
|
||||
return artwork
|
||||
} else {
|
||||
return artworks.first
|
||||
}
|
||||
}()
|
||||
|
||||
// Load and add artwork to metadata result BEFORE mapping
|
||||
if let url = artwork?.url, let artworkData = URLSession.data(from: url) {
|
||||
let mp42Image = MP42Image(data: artworkData, type: MP42_ART_JPEG)
|
||||
metadataResult.artworks.append(mp42Image)
|
||||
}
|
||||
case let .movie(title, id):
|
||||
let language = MetadataSearch.defaultLanguage(service: movieService, type: .movie)
|
||||
|
||||
// Shared continuation for both the ID lookup and the title search
|
||||
let completeWith: (MetadataResult, MetadataSearch) -> Void = { result, search in
|
||||
_ = search.loadAdditionalMetadata(result, completionHandler: { metadataResult in
|
||||
// Handle artwork similar to QueueMetadataAction
|
||||
let artworks = metadataResult.remoteArtworks
|
||||
|
||||
if preferredArtwork != .none && artworks.isEmpty == false {
|
||||
let artwork: Artwork? = {
|
||||
let type = preferredArtwork.isMovieType ? preferredArtwork : .poster
|
||||
if let artwork = artworks.first(by: type, size: preferredArtworkSize, service: movieService.name) {
|
||||
return artwork
|
||||
} else if let artwork = artworks.first(by: .poster, size: .standard, service: movieService.name) {
|
||||
return artwork
|
||||
} else {
|
||||
return artworks.first
|
||||
}
|
||||
|
||||
// Map the metadata using the same logic as QueueAction (now includes artwork)
|
||||
let map = metadataResult.mediaKind == .movie ? MetadataPrefs.movieResultMap : MetadataPrefs.tvShowResultMap
|
||||
let mappedMetadata = metadataResult.mappedMetadata(to: map, keepEmptyKeys: false)
|
||||
completion(mappedMetadata)
|
||||
} else {
|
||||
completion(nil)
|
||||
}()
|
||||
|
||||
// Load and add artwork to metadata result BEFORE mapping
|
||||
if let url = artwork?.url, let artworkData = URLSession.data(from: url) {
|
||||
let mp42Image = MP42Image(data: artworkData, type: MP42_ART_JPEG)
|
||||
metadataResult.artworks.append(mp42Image)
|
||||
}
|
||||
}).run()
|
||||
} else {
|
||||
completion(nil)
|
||||
}
|
||||
}).run()
|
||||
}
|
||||
|
||||
// Map the metadata using the same logic as QueueAction (now includes artwork)
|
||||
let map = metadataResult.mediaKind == .movie ? MetadataPrefs.movieResultMap : MetadataPrefs.tvShowResultMap
|
||||
let mappedMetadata = metadataResult.mappedMetadata(to: map, keepEmptyKeys: false)
|
||||
completion(mappedMetadata)
|
||||
}).run()
|
||||
}
|
||||
|
||||
let searchByName: () -> Void = {
|
||||
let movieSearch = MetadataSearch.movieSeach(service: movieService, movie: title, language: language)
|
||||
_ = movieSearch.search(completionHandler: { results in
|
||||
if let result = results.first {
|
||||
completeWith(result, movieSearch)
|
||||
} else {
|
||||
completion(nil)
|
||||
}
|
||||
}).run()
|
||||
}
|
||||
|
||||
if let id = id {
|
||||
// The file name carries a service ID: try the direct lookup first,
|
||||
// falling back to the title search when it doesn't resolve.
|
||||
let idSearch = MetadataSearch.movieIDSearch(service: movieService, id: id, language: language)
|
||||
_ = idSearch.search(completionHandler: { results in
|
||||
if let result = results.first {
|
||||
completeWith(result, idSearch)
|
||||
} else {
|
||||
searchByName()
|
||||
}
|
||||
}).run()
|
||||
} else {
|
||||
searchByName()
|
||||
}
|
||||
|
||||
case let .tvShow(seriesName, season, episode):
|
||||
let tvSearch = MetadataSearch.tvSearch(service: tvShowService, tvShow: seriesName, season: season, episode: episode, language: MetadataSearch.defaultLanguage(service: tvShowService, type: .tvShow))
|
||||
@@ -207,11 +224,11 @@ class SBFetchMetadataScriptCommand: NSScriptCommand, ScriptCommandDocumentTarget
|
||||
|
||||
if preferredArtwork != .none && artworks.isEmpty == false {
|
||||
let artwork: Artwork? = {
|
||||
if let artwork = artworks.filter(by: preferredArtwork, size: preferredArtworkSize, service: tvShowService.name) {
|
||||
if let artwork = artworks.first(by: preferredArtwork, size: preferredArtworkSize, service: tvShowService.name) {
|
||||
return artwork
|
||||
} else if let artwork = artworks.filter(by: .season, size: preferredArtworkSize, service: tvShowService.name) {
|
||||
} else if let artwork = artworks.first(by: .season, size: preferredArtworkSize, service: tvShowService.name) {
|
||||
return artwork
|
||||
} else if let artwork = artworks.filter(by: .poster, size: .standard, service: tvShowService.name) {
|
||||
} else if let artwork = artworks.first(by: .poster, size: .standard, service: tvShowService.name) {
|
||||
return artwork
|
||||
} else {
|
||||
return artworks.first
|
||||
@@ -343,15 +360,34 @@ class SBSaveAsScriptCommand: NSScriptCommand, ScriptCommandDocumentTargeting {
|
||||
logger.write(toLog: "No document available for save as operation")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
// Use the helper method to extract the destination path
|
||||
guard let path = extractFilePath() else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
let destinationURL = URL(fileURLWithPath: path)
|
||||
let fileName = destinationURL.lastPathComponent
|
||||
|
||||
|
||||
// mp4.write(to:) below muxes QuickTime atoms and would happily write
|
||||
// an MP4 over a Matroska document, so route those through NSDocument
|
||||
// instead: that picks the tag-writer/remux path in writeMatroska,
|
||||
// enforces the mkv/mka/mks destination, does the fileURL/change-count
|
||||
// bookkeeping, and reports progress itself via Document.save.
|
||||
if sublerDoc.isMatroska {
|
||||
// "Matroska video" is the CFBundleTypeName covering mkv/mka/mks
|
||||
// (NSDocument.documentType is unavailable from Swift; writeSafely
|
||||
// only re-checks the destination extension itself).
|
||||
sublerDoc.save(to: destinationURL, ofType: "Matroska video", for: .saveAsOperation) { error in
|
||||
if let error = error {
|
||||
logger.write(toLog: "Failed to save document: \(error.localizedDescription)")
|
||||
} else {
|
||||
logger.write(toLog: "Script save of \(fileName) completed")
|
||||
}
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
// Build options dictionary with 64-bit settings from UI preferences
|
||||
var options: [String: Any] = [:]
|
||||
options[MP4264BitData] = Prefs.mp464bitOffset
|
||||
@@ -386,8 +422,7 @@ class SBSaveAsScriptCommand: NSScriptCommand, ScriptCommandDocumentTargeting {
|
||||
|
||||
// Update the document's file URL and mark as saved
|
||||
sublerDoc.fileURL = destinationURL
|
||||
sublerDoc.updateChangeCount(.changeCleared)
|
||||
|
||||
|
||||
// End progress reporting and refresh the UI
|
||||
windowController.endProgressReporting()
|
||||
windowController.reloadData()
|
||||
@@ -396,8 +431,7 @@ class SBSaveAsScriptCommand: NSScriptCommand, ScriptCommandDocumentTargeting {
|
||||
} else {
|
||||
// Update the document's file URL and mark as saved
|
||||
sublerDoc.fileURL = destinationURL
|
||||
sublerDoc.updateChangeCount(.changeCleared)
|
||||
|
||||
|
||||
// End progress reporting and refresh the UI
|
||||
windowController.endProgressReporting()
|
||||
windowController.reloadData()
|
||||
@@ -442,8 +476,19 @@ class SBSendToQueueScriptCommand: NSScriptCommand, ScriptCommandDocumentTargetin
|
||||
options[MP4264BitData] = Prefs.mp464bitOffset
|
||||
options[MP4264BitTime] = Prefs.mp464bitTimes
|
||||
|
||||
// Create queue item and add to queue
|
||||
let item = QueueItem(mp4: sublerDoc.mp4, destURL: destinationURL, attributes: options, optimize: Prefs.mp4SaveAsOptimize)
|
||||
// Create queue item and add to queue. A Matroska document keeps its
|
||||
// own file as the item's source and hands over the Matroska baseline
|
||||
// (pairing is by object identity): the item then writes back into
|
||||
// the container — the destination must stay mkv/mka/mks, checked at
|
||||
// save time — instead of muxing QuickTime atoms over a tags-only
|
||||
// model.
|
||||
let item: QueueItem
|
||||
if sublerDoc.isMatroska, let sourceURL = sublerDoc.fileURL, let saver = sublerDoc.mkvSaver {
|
||||
item = QueueItem(mp4: sublerDoc.mp4, fileURL: sourceURL, destURL: destinationURL, attributes: options, optimize: Prefs.mp4SaveAsOptimize)
|
||||
item.attachMatroskaSaver(saver)
|
||||
} else {
|
||||
item = QueueItem(mp4: sublerDoc.mp4, destURL: destinationURL, attributes: options, optimize: Prefs.mp4SaveAsOptimize)
|
||||
}
|
||||
|
||||
// Add the queue item
|
||||
QueueController.shared.add(item)
|
||||
@@ -618,7 +663,7 @@ class SBFetchMetadataResultsScriptCommand: NSScriptCommand, ScriptCommandDocumen
|
||||
|
||||
// Perform the search based on media type
|
||||
switch terms {
|
||||
case .movie(let title):
|
||||
case .movie(let title, _):
|
||||
let results = movieService.search(movie: title, language: searchLanguage)
|
||||
|
||||
// Convert MetadataResult to SBMetadataResult
|
||||
@@ -768,8 +813,10 @@ class SBFetchAndSetMetadataResultScriptCommand: NSScriptCommand, ScriptCommandDo
|
||||
let preferredArtworkSize = ArtworkSize(rawValue: queuePrefs.providerArtworkSize) ?? .standard
|
||||
|
||||
// Perform the search based on media type
|
||||
// (Title search by design: the caller indexes into the list returned by the
|
||||
// earlier fetch-metadata-results command, so no ID shortcut here.)
|
||||
switch terms {
|
||||
case let .movie(title):
|
||||
case let .movie(title, _):
|
||||
let movieSearch = MetadataSearch.movieSeach(service: movieService, movie: title, language: searchLanguage)
|
||||
_ = movieSearch.search(completionHandler: { results in
|
||||
if resultIndex >= 0 && resultIndex < results.count {
|
||||
@@ -783,9 +830,9 @@ class SBFetchAndSetMetadataResultScriptCommand: NSScriptCommand, ScriptCommandDo
|
||||
if preferredArtwork != .none && artworks.isEmpty == false {
|
||||
let artwork: Artwork? = {
|
||||
let type = preferredArtwork.isMovieType ? preferredArtwork : .poster
|
||||
if let artwork = artworks.filter(by: type, size: preferredArtworkSize, service: movieService.name) {
|
||||
if let artwork = artworks.first(by: type, size: preferredArtworkSize, service: movieService.name) {
|
||||
return artwork
|
||||
} else if let artwork = artworks.filter(by: .poster, size: .standard, service: movieService.name) {
|
||||
} else if let artwork = artworks.first(by: .poster, size: .standard, service: movieService.name) {
|
||||
return artwork
|
||||
} else {
|
||||
return artworks.first
|
||||
@@ -806,8 +853,7 @@ class SBFetchAndSetMetadataResultScriptCommand: NSScriptCommand, ScriptCommandDo
|
||||
// Apply the metadata
|
||||
DispatchQueue.main.async {
|
||||
if let sublerDoc = self.targetedDocument() {
|
||||
sublerDoc.mp4.metadata.merge(mappedMetadata)
|
||||
sublerDoc.updateChangeCount(.changeDone)
|
||||
sublerDoc.mp4.metadata.merge(mappedMetadata, overwrite: true)
|
||||
completion(true)
|
||||
} else {
|
||||
completion(false)
|
||||
@@ -833,9 +879,9 @@ class SBFetchAndSetMetadataResultScriptCommand: NSScriptCommand, ScriptCommandDo
|
||||
if preferredArtwork != .none && artworks.isEmpty == false {
|
||||
let artwork: Artwork? = {
|
||||
let type = preferredArtwork.isMovieType ? preferredArtwork : .poster
|
||||
if let artwork = artworks.filter(by: type, size: preferredArtworkSize, service: tvShowService.name) {
|
||||
if let artwork = artworks.first(by: type, size: preferredArtworkSize, service: tvShowService.name) {
|
||||
return artwork
|
||||
} else if let artwork = artworks.filter(by: .poster, size: .standard, service: tvShowService.name) {
|
||||
} else if let artwork = artworks.first(by: .poster, size: .standard, service: tvShowService.name) {
|
||||
return artwork
|
||||
} else {
|
||||
return artworks.first
|
||||
@@ -856,8 +902,7 @@ class SBFetchAndSetMetadataResultScriptCommand: NSScriptCommand, ScriptCommandDo
|
||||
// Apply the metadata
|
||||
DispatchQueue.main.async {
|
||||
if let sublerDoc = self.targetedDocument() {
|
||||
sublerDoc.mp4.metadata.merge(mappedMetadata)
|
||||
sublerDoc.updateChangeCount(.changeDone)
|
||||
sublerDoc.mp4.metadata.merge(mappedMetadata, overwrite: true)
|
||||
completion(true)
|
||||
} else {
|
||||
completion(false)
|
||||
|
||||
@@ -18,7 +18,7 @@ final class TokenFieldCell : NSTokenFieldCell {
|
||||
set (newBackgroundStyle) {
|
||||
super.backgroundStyle = newBackgroundStyle
|
||||
if newBackgroundStyle == NSView.BackgroundStyle.emphasized {
|
||||
textColor = NSColor.controlHighlightColor
|
||||
textColor = NSColor.highlightColor
|
||||
} else {
|
||||
textColor = NSColor.controlTextColor
|
||||
}
|
||||
|
||||
@@ -23,14 +23,36 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
didSet {
|
||||
let selectedIndexes = tracksTable.selectedRowIndexes
|
||||
reloadData()
|
||||
if let max = selectedIndexes.max(), mp4.tracks.count >= max {
|
||||
if let last = selectedIndexes.last, last <= mp4.tracks.count {
|
||||
tracksTable.selectRowIndexes(selectedIndexes, byExtendingSelection: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet var tracksTable: ExpandedTableView!
|
||||
private let pasteboardType = NSPasteboard.PasteboardType(rawValue: "SublerTableViewDataType")
|
||||
|
||||
// In Matroska tags-only mode the track list cannot be structurally
|
||||
// changed: no deletion, reordering or import.
|
||||
private var isReadOnly: Bool {
|
||||
return document.isMatroska
|
||||
}
|
||||
|
||||
// The per-track fields whose values MP42MkvTagWriter writes back into the
|
||||
// file's Tracks element (name, language, enabled, subtitle forced) stay
|
||||
// editable even in tags-only mode; the chapter pseudo-track has no
|
||||
// Matroska counterpart.
|
||||
private func isFieldEditable(_ track: MP42Track?) -> Bool {
|
||||
guard let track = track else { return false }
|
||||
return document.isMatroska == false || track.isMember(of: MP42ChapterTrack.self) == false
|
||||
}
|
||||
|
||||
// The chapter pseudo-track has no TrackEntry for the tag writer, but it
|
||||
// carries the language the remuxer stamps into every ChapterDisplay on
|
||||
// save, so its language popup is editable on Matroska documents too.
|
||||
private func isLanguageEditable(_ track: MP42Track?) -> Bool {
|
||||
guard let track = track else { return false }
|
||||
return isFieldEditable(track) || track.isMember(of: MP42ChapterTrack.self)
|
||||
}
|
||||
|
||||
private static let languagesMenu: NSMenu = {
|
||||
let menu = NSMenu()
|
||||
@@ -50,7 +72,7 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
tracksTable.registerForDraggedTypes([pasteboardType])
|
||||
tracksTable.registerForDraggedTypes([.tableViewIndex])
|
||||
tracksTable.doubleAction = #selector(doubleClickAction)
|
||||
tracksTable.scrollRowToVisible(0)
|
||||
}
|
||||
@@ -67,10 +89,28 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
}
|
||||
|
||||
func reloadData() {
|
||||
let indexes = tracksTable.selectedRowIndexes
|
||||
tracksTable.reloadData()
|
||||
if let last = indexes.last, last <= mp4.tracks.count {
|
||||
tracksTable.selectRowIndexes(indexes, byExtendingSelection: false)
|
||||
}
|
||||
delegate?.didSelect(tracks: selectedTracks)
|
||||
}
|
||||
|
||||
func selectTracks(_ tracks: [MP42Track]) {
|
||||
var indexes = IndexSet()
|
||||
for track in tracks {
|
||||
if let trackIndex = mp4.tracks.firstIndex(of: track) {
|
||||
indexes.insert(trackIndex + 1)
|
||||
}
|
||||
}
|
||||
|
||||
if indexes.isEmpty && tracksTable.selectedRow == 0 {
|
||||
indexes.insert(0)
|
||||
}
|
||||
tracksTable.selectRowIndexes(indexes, byExtendingSelection: false)
|
||||
}
|
||||
|
||||
var selectedTracks: [MP42Track] {
|
||||
return tracksTable != nil ? tracksTable.selectedRowIndexes.compactMap { track(at: $0) } : []
|
||||
}
|
||||
@@ -83,16 +123,32 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
|
||||
@IBAction func doubleClickAction(_ sender: NSTableView) {
|
||||
// make sure they clicked a real cell and not a header or empty row
|
||||
if sender.clickedRow >= 1 {
|
||||
if sender.clickedRow >= 1, let track = track(at: sender.clickedRow) {
|
||||
let column = sender.tableColumns[sender.clickedColumn]
|
||||
if column.identifier == trackNameColumn {
|
||||
if column.identifier == trackNameColumn, isFieldEditable(track) {
|
||||
sender.editColumn(sender.clickedColumn, row: sender.clickedRow, with: nil, select: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func deleteSelection(in tableview: NSTableView) {
|
||||
delegate?.delete(tracks: selectedTracks)
|
||||
// On MKV documents real tracks are deletable too (the remuxer drops
|
||||
// their blocks on save) and so is the chapter pseudo-track: with it
|
||||
// gone the model reports "no chapters", so the save remuxes and the
|
||||
// Chapters element is deleted (same as emptying the Chapters tab).
|
||||
let deletable = document.isMatroska
|
||||
? selectedTracks.filter { isFieldEditable($0) || $0.isMember(of: MP42ChapterTrack.self) }
|
||||
: selectedTracks
|
||||
guard deletable.isEmpty == false else { return }
|
||||
delegate?.delete(tracks: deletable)
|
||||
}
|
||||
|
||||
func tableView(_ tableView: NSTableView, shouldEdit tableColumn: NSTableColumn?, row: Int) -> Bool {
|
||||
if isReadOnly == false {
|
||||
return true
|
||||
}
|
||||
// tags-only mode still allows inline renaming of real tracks
|
||||
return tableColumn?.identifier == trackNameColumn && isFieldEditable(track(at: row))
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
@@ -101,7 +157,6 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
let row = tracksTable.row(for: sender)
|
||||
if let track = track(at: row) {
|
||||
track.isEnabled = sender.state == NSControl.StateValue.on ? true : false
|
||||
document.updateChangeCount(.changeDone)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +164,6 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
let row = tracksTable.row(for: sender)
|
||||
if let track = track(at: row), track.name != sender.stringValue {
|
||||
track.name = sender.stringValue
|
||||
document.updateChangeCount(.changeDone)
|
||||
let column = tracksTable.column(for: sender)
|
||||
tracksTable.reloadData(forRowIndexes: IndexSet(integer: row), columnIndexes: IndexSet(integer: column))
|
||||
}
|
||||
@@ -128,7 +182,6 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
|
||||
if let track = track(at: row), track.language != language {
|
||||
track.language = language ?? "und"
|
||||
document.updateChangeCount(.changeDone)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,12 +219,13 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
case trackEnabledColumn?:
|
||||
let cell = tableView.makeView(withIdentifier: trackEnabledColumn, owner:self) as? CheckBoxCellView
|
||||
cell?.checkboxButton?.state = track.isEnabled ? NSControl.StateValue.on : NSControl.StateValue.off
|
||||
cell?.checkboxButton?.isEnabled = isFieldEditable(track)
|
||||
return cell
|
||||
|
||||
case trackNameColumn?:
|
||||
let cell = tableView.makeView(withIdentifier: trackNameColumn, owner:self) as? NSTableCellView
|
||||
cell?.textField?.stringValue = track.name
|
||||
cell?.textField?.isEditable = true
|
||||
cell?.textField?.isEditable = isFieldEditable(track)
|
||||
return cell
|
||||
|
||||
case trackDurationColumn?:
|
||||
@@ -194,11 +248,25 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
}
|
||||
|
||||
cell?.textField?.stringValue = MP42Languages.defaultManager.localizedLang(forExtendedTag: track.language)
|
||||
cell?.popUpButton?.isEnabled = isLanguageEditable(track)
|
||||
return cell
|
||||
|
||||
case trackInfoColumn?:
|
||||
let cell = tableView.makeView(withIdentifier: trackInfoColumn, owner:self) as? NSTableCellView
|
||||
cell?.textField?.stringValue = track.formatSummary
|
||||
if isReadOnly {
|
||||
// Tags-only documents never mux, and the default conversion
|
||||
// settings attached at import (see Document.readMatroska)
|
||||
// would make formatSummary advertise a conversion target
|
||||
// instead of the actual source codec.
|
||||
var summary = localizedDisplayName(track.mediaType, track.format) ?? "Unknown"
|
||||
if let audioTrack = track as? MP42AudioTrack, audioTrack.channels > 0,
|
||||
track.format != kMP42AudioCodecType_DTS {
|
||||
summary = "\(summary), \(audioTrack.channels) ch"
|
||||
}
|
||||
cell?.textField?.stringValue = summary
|
||||
} else {
|
||||
cell?.textField?.stringValue = track.formatSummary
|
||||
}
|
||||
return cell
|
||||
|
||||
default:
|
||||
@@ -245,32 +313,34 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
// MARK: Drag & drop
|
||||
|
||||
func tableView(_ tableView: NSTableView,
|
||||
writeRowsWith rowIndexes: IndexSet,
|
||||
to pboard: NSPasteboard) -> Bool {
|
||||
guard let firstRow = rowIndexes.first,
|
||||
let track = track(at: firstRow), track.isMuxed == false
|
||||
else { return false }
|
||||
|
||||
let data = try? NSKeyedArchiver.archivedData(withRootObject: rowIndexes, requiringSecureCoding: true)
|
||||
pboard.declareTypes([pasteboardType], owner: self)
|
||||
pboard.setData(data, forType: pasteboardType)
|
||||
return true
|
||||
pasteboardWriterForRow row: Int) -> (any NSPasteboardWriting)? {
|
||||
if isReadOnly {
|
||||
return nil
|
||||
}
|
||||
if let track = track(at: row), track.isMuxed == false {
|
||||
return PasteboardItem(index: row, type: .tableViewIndex)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: NSTableView,
|
||||
validateDrop info: NSDraggingInfo,
|
||||
proposedRow row: Int,
|
||||
proposedDropOperation: NSTableView.DropOperation) -> NSDragOperation {
|
||||
let count = mp4.tracks.count + 1
|
||||
proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
|
||||
if isReadOnly { return [] }
|
||||
guard dropOperation == .above else { return [] }
|
||||
|
||||
if proposedDropOperation == .above {
|
||||
if row < count && row != 0, let track = track(at: row), track.isMuxed == false {
|
||||
return .every
|
||||
}
|
||||
else if row == count {
|
||||
return .every
|
||||
}
|
||||
guard let source = info.draggingSource as? NSTableView,
|
||||
tableView == source else { return [] }
|
||||
|
||||
let count = mp4.tracks.count + 1
|
||||
if row < count && row != 0, let track = track(at: row), track.isMuxed == false {
|
||||
return .move
|
||||
} else if row == count {
|
||||
return .move
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
@@ -278,12 +348,15 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
|
||||
acceptDrop info: NSDraggingInfo,
|
||||
row: Int,
|
||||
dropOperation: NSTableView.DropOperation) -> Bool {
|
||||
let data: Data = info.draggingPasteboard.data(forType: pasteboardType)!
|
||||
if let rowIndexes: IndexSet = NSKeyedUnarchiver.unarchiveObject(with: data) as? IndexSet, rowIndexes.isEmpty == false {
|
||||
guard let pasteboardItems = info.draggingPasteboard.pasteboardItems
|
||||
else { return false }
|
||||
|
||||
if let source = info.draggingSource as? NSTableView,
|
||||
source == tableView
|
||||
{
|
||||
let rowIndexes = IndexSet(pasteboardItems.compactMap { $0.integer(forType: .tableViewIndex) })
|
||||
let tracks = mp4.tracks.enumerated().filter { rowIndexes.contains($0.offset + 1)} .map { $0.element }
|
||||
mp4.moveTracks(tracks, to: UInt(row - 1))
|
||||
|
||||
tableView.reloadData()
|
||||
return true
|
||||
}
|
||||
|
||||
+27
-3
@@ -17,12 +17,22 @@ func automationConsent(bundleIdentifier: String, promptIfNeeded: Bool) -> Privac
|
||||
var result: PrivacyConsentState = .denied
|
||||
if #available(macOS 10.14, *) {
|
||||
bundleIdentifier.withCString { (identifier) in
|
||||
var addressDesc = AEAddressDesc()
|
||||
let workspace = NSWorkspace.shared
|
||||
|
||||
// if #available(macOS 12, *) {
|
||||
// // Make sure the target is running, if not the consent alert will not be shown.
|
||||
// if let url = workspace.urlsForApplications(withBundleIdentifier: bundleIdentifier).first {
|
||||
// let configuration = NSWorkspace.OpenConfiguration()
|
||||
// workspace.openApplication(at: url, configuration: configuration) {_,_ in
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Mare sure the target is running, if not the consent alert will not be shown.
|
||||
NSWorkspace.shared.launchApplication(withBundleIdentifier: bundleIdentifier, options: [],
|
||||
additionalEventParamDescriptor: nil, launchIdentifier: nil)
|
||||
workspace.launchApplication(withBundleIdentifier: bundleIdentifier, options: [],
|
||||
additionalEventParamDescriptor: nil, launchIdentifier: nil)
|
||||
|
||||
var addressDesc = AEAddressDesc()
|
||||
let createDescResult = AECreateDesc(typeApplicationBundleID, identifier, strlen(identifier), &addressDesc)
|
||||
if createDescResult == noErr {
|
||||
let appleScriptPermission = AEDeterminePermissionToAutomateTarget(&addressDesc, typeWildCard, typeWildCard, promptIfNeeded)
|
||||
@@ -118,3 +128,17 @@ extension String {
|
||||
return matrix[m][n]
|
||||
}
|
||||
}
|
||||
|
||||
extension NSView {
|
||||
/// Enables or disables every NSControl in this view hierarchy. Used to
|
||||
/// present the track property views read-only in Matroska (tags-only)
|
||||
/// documents, where the tracks cannot be modified.
|
||||
func setAllControlsEnabled(_ enabled: Bool) {
|
||||
if let control = self as? NSControl {
|
||||
control.isEnabled = enabled
|
||||
}
|
||||
for subview in subviews {
|
||||
subview.setAllControlsEnabled(enabled)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotations"; ObjectID = "6um-Rw-luk"; */
|
||||
"6um-Rw-luk.headerCell.title" = "Propiedad";
|
||||
"6um-Rw-luk.headerCell.title" = "Etiqueta";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep empty annotations"; ObjectID = "7Ek-lI-5Lo"; */
|
||||
"7Ek-lI-5Lo.title" = "Mantener propiedades vacías";
|
||||
"7Ek-lI-5Lo.title" = "Mantener etiquetas vacías";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "Aj4-bk-6RK"; */
|
||||
"Aj4-bk-6RK.headerCell.title" = "Valor";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Map the providers' metadata to the MP4 annotations"; ObjectID = "cUW-9F-EvO"; */
|
||||
"cUW-9F-EvO.title" = "Asigna metadatos de proveedores a las propiedades MP4.";
|
||||
"cUW-9F-EvO.title" = "Asigna metadatos de proveedores a las etiquetas MP4.";
|
||||
|
||||
/* Class = "CocoaBindingsConnection"; ibShadowedIsNilPlaceholder = "Null"; ObjectID = "dgq-hT-1Vg"; */
|
||||
"dgq-hT-1Vg.ibShadowedIsNilPlaceholder" = "Nulo";
|
||||
@@ -17,20 +17,20 @@
|
||||
"gwa-XG-q0L.headerCell.title" = "Tipo";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add annotation"; ObjectID = "Jdh-Cj-6ef"; */
|
||||
"Jdh-Cj-6ef.ibShadowedToolTip" = "Agregar propiedad";
|
||||
"Jdh-Cj-6ef.ibShadowedToolTip" = "Agregar etiqueta";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Restore Defaults"; ObjectID = "nBh-jv-KDG"; */
|
||||
"nBh-jv-KDG.title" = "Restablecer valores predeterminados";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata type"; ObjectID = "nXW-oy-rtu"; */
|
||||
"nXW-oy-rtu.ibExternalAccessibilityDescription" = "Tipo de metadatos";
|
||||
"nXW-oy-rtu.ibExternalAccessibilityDescription" = "Tipo de contenido";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Available values:"; ObjectID = "OYx-Dd-YIf"; */
|
||||
"OYx-Dd-YIf.title" = "Valores disponibles:";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "sd5-qb-K5v"; */
|
||||
"sd5-qb-K5v.ibShadowedToolTip" = "Eliminar propiedad";
|
||||
"sd5-qb-K5v.ibShadowedToolTip" = "Eliminar etiqueta";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata map"; ObjectID = "Tid-Rc-Ljr"; */
|
||||
"Tid-Rc-Ljr.ibExternalAccessibilityDescription" = "Asignación de metadatos";
|
||||
"Tid-Rc-Ljr.ibExternalAccessibilityDescription" = "Etiquetas";
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "0nh-AI-EEk"; */
|
||||
"0nh-AI-EEk.title" = "Mantener propiedades existentes";
|
||||
"0nh-AI-EEk.title" = "Mantener etiquetas existentes";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "2ur-nu-rZh"; */
|
||||
"2ur-nu-rZh.title" = "Mantener ilustraciones existentes";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Add metadata item"; ObjectID = "30"; */
|
||||
"30.ibExternalAccessibilityDescription" = "Agregar propiedad";
|
||||
"30.ibExternalAccessibilityDescription" = "Agregar etiqueta";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add a new metadata item"; ObjectID = "30"; */
|
||||
"30.ibShadowedToolTip" = "Agregar propiedad";
|
||||
"30.ibShadowedToolTip" = "Agregar etiqueta";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibExternalAccessibilityDescription" = "Eliminar propiedad";
|
||||
"53.ibExternalAccessibilityDescription" = "Eliminar etiqueta";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibShadowedToolTip" = "Eliminar propiedad";
|
||||
"53.ibShadowedToolTip" = "Eliminar etiqueta";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Dismiss"; ObjectID = "87e-za-hJV"; */
|
||||
"87e-za-hJV.ibShadowedToolTip" = "Cerrar";
|
||||
@@ -50,16 +50,16 @@
|
||||
"CHk-xu-U9f.title" = "Mantener ilustraciones existentes";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotation"; ObjectID = "j7q-XE-YXB"; */
|
||||
"j7q-XE-YXB.headerCell.title" = "Propiedad";
|
||||
"j7q-XE-YXB.headerCell.title" = "Etiqueta";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "KxJ-Zr-uiZ"; */
|
||||
"KxJ-Zr-uiZ.title" = "Mantener propiedades existentes";
|
||||
"KxJ-Zr-uiZ.title" = "Mantener etiquetas existentes";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "os0-Yb-exW"; */
|
||||
"os0-Yb-exW.headerCell.title" = "Valor";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata"; ObjectID = "qg5-r0-E4V"; */
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "Metadatos";
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "Etiquetas";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Preset Title"; ObjectID = "RvM-No-Mwg"; */
|
||||
"RvM-No-Mwg.ibExternalAccessibilityDescription" = "Título del preset";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Note: don't use this option if you are not sure of what it is doing, it's not needed in almost every case.\nEnable 64bit timescale and duration support. Normally, it's only needed if a track will be longer than 10 hours."; ObjectID = "3CX-Vp-T0h"; */
|
||||
"3CX-Vp-T0h.ibShadowedToolTip" = "Nota: no uses esta opción si no sabes bien lo que estás haciendo, no es necesaria en la mayoría de los casos.\nHabilita la escala de tiempo de 64 bits y el soporte de duración. Normalmente, solo es necesario si una pista dura más de 10 horas.";
|
||||
"3CX-Vp-T0h.ibShadowedToolTip" = "Nota: no uses esta opción si no sabes bien lo que estás haciendo, no es necesaria en la mayoría de los casos.\nHabilita el soporte de escala de tiempo y duración de 64 bits. Normalmente, solo es necesario si una pista dura más de 10 horas.";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "64 bits chunk offset"; ObjectID = "14x-xv-HKI"; */
|
||||
"14x-xv-HKI.title" = "Desplazamiento de bloque de 64 bits";
|
||||
"14x-xv-HKI.title" = "Desplazamiento de fragmentos de 64 bits";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Options:"; ObjectID = "BXP-AU-x3T"; */
|
||||
"BXP-AU-x3T.title" = "Opciones:";
|
||||
@@ -11,7 +11,7 @@
|
||||
"caN-zU-chS.title" = "Formato de archivo:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "64 bits times"; ObjectID = "DCI-a5-K73"; */
|
||||
"DCI-a5-K73.title" = "Duración de 64 bits";
|
||||
"DCI-a5-K73.title" = "Tiempos de 64 bits";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Needed for mp4 larger than 4GB."; ObjectID = "emp-1S-F7H"; */
|
||||
"emp-1S-F7H.ibShadowedToolTip" = "Necesario para mp4 de más de 4 GB";
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
"Bpi-e7-pHx.ibExternalAccessibilityDescription" = "Pistas";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Enabled"; ObjectID = "JD5-tO-uQc"; */
|
||||
"JD5-tO-uQc.ibExternalAccessibilityDescription" = "Activado";
|
||||
"JD5-tO-uQc.ibExternalAccessibilityDescription" = "Habilitado";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Enable or disable the track"; ObjectID = "JD5-tO-uQc"; */
|
||||
"JD5-tO-uQc.ibShadowedToolTip" = "Activar o desactivar pista";
|
||||
"JD5-tO-uQc.ibShadowedToolTip" = "Habilitar o deshabilitar pista";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "00:00:00"; ObjectID = "LAW-aU-7Ie"; */
|
||||
"LAW-aU-7Ie.title" = "00:00:00";
|
||||
@@ -23,11 +23,11 @@
|
||||
"qGd-Uo-RvP.headerCell.title" = "Idioma";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Id"; ObjectID = "sB1-FL-VRd"; */
|
||||
"sB1-FL-VRd.headerCell.title" = "Id";
|
||||
"sB1-FL-VRd.headerCell.title" = "ID";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Format"; ObjectID = "vmh-dT-zIv"; */
|
||||
"vmh-dT-zIv.headerCell.title" = "Formato";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Enabled"; ObjectID = "Znw-bQ-tsE"; */
|
||||
"Znw-bQ-tsE.headerCell.title" = "Activado";
|
||||
"Znw-bQ-tsE.headerCell.title" = "Habilitado";
|
||||
|
||||
@@ -4,9 +4,15 @@
|
||||
/* Class = "NSButtonCell"; title = "Keep empty annotations"; ObjectID = "7Ek-lI-5Lo"; */
|
||||
"7Ek-lI-5Lo.title" = "Mantieni le annotazioni vuote";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Overwrite existing annotations"; ObjectID = "7KC-Up-hGn"; */
|
||||
"7KC-Up-hGn.title" = "Sovrascrivi le annotazioni esistenti";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "Aj4-bk-6RK"; */
|
||||
"Aj4-bk-6RK.headerCell.title" = "Valore";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "4K metadata may cause streaming issues with some Apple TV and iTunes configurations"; ObjectID = "cEs-iS-fwI"; */
|
||||
"cEs-iS-fwI.ibShadowedToolTip" = "Il metadata 4K può causare problemi di trasmissione con certe configurazioni di Apple TV e iTunes";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Map the providers' metadata to the MP4 annotations"; ObjectID = "cUW-9F-EvO"; */
|
||||
"cUW-9F-EvO.title" = "Associa i metadati dei fornitori alle annotazioni MP4";
|
||||
|
||||
@@ -31,3 +37,6 @@
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata map"; ObjectID = "Tid-Rc-Ljr"; */
|
||||
"Tid-Rc-Ljr.ibExternalAccessibilityDescription" = "Mappa metadata";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Autodetect 4K HD Video Metadata"; ObjectID = "vyR-ib-B9Q"; */
|
||||
"vyR-ib-B9Q.title" = "Rileva metadata 4K Video HD";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Set the format to create a custom filename in the Save As… panel and in the queue."; ObjectID = "hE3-zH-XFE"; */
|
||||
"hE3-zH-XFE.title" = "Imposta il formato per creare un nome del file personalizzato nel pannello \"Salva col nome…\" and nella coda.";
|
||||
"hE3-zH-XFE.title" = "Imposta il formato per creare un nome del file personalizzato nel pannello \\\"Salva col nome…\\\" and nella coda.";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Set filename of TV Shows to:"; ObjectID = "kQC-bu-0by"; */
|
||||
"kQC-bu-0by.title" = "Imposta il nome del file delle Serie TV a:";
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "s5f-yH-26m"; */
|
||||
"s5f-yH-26m.title" = "Janela";
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotations"; ObjectID = "6um-Rw-luk"; */
|
||||
"6um-Rw-luk.headerCell.title" = "Tag";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep empty annotations"; ObjectID = "7Ek-lI-5Lo"; */
|
||||
"7Ek-lI-5Lo.title" = "Manter tags vazias";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "Aj4-bk-6RK"; */
|
||||
"Aj4-bk-6RK.headerCell.title" = "Valor";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Map the providers' metadata to the MP4 annotations"; ObjectID = "cUW-9F-EvO"; */
|
||||
"cUW-9F-EvO.title" = "Atribui metadados de fornecedores às tags MP4.";
|
||||
|
||||
/* Class = "CocoaBindingsConnection"; ibShadowedIsNilPlaceholder = "Null"; ObjectID = "dgq-hT-1Vg"; */
|
||||
"dgq-hT-1Vg.ibShadowedIsNilPlaceholder" = "Nulo";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Type"; ObjectID = "gwa-XG-q0L"; */
|
||||
"gwa-XG-q0L.headerCell.title" = "Tipo";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add annotation"; ObjectID = "Jdh-Cj-6ef"; */
|
||||
"Jdh-Cj-6ef.ibShadowedToolTip" = "Adicionar tag";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Restore Defaults"; ObjectID = "nBh-jv-KDG"; */
|
||||
"nBh-jv-KDG.title" = "Restabelecer padrões";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata type"; ObjectID = "nXW-oy-rtu"; */
|
||||
"nXW-oy-rtu.ibExternalAccessibilityDescription" = "Tipo de conteúdo";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Available values:"; ObjectID = "OYx-Dd-YIf"; */
|
||||
"OYx-Dd-YIf.title" = "Valores disponíveis:";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "sd5-qb-K5v"; */
|
||||
"sd5-qb-K5v.ibShadowedToolTip" = "Remover Tag";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata map"; ObjectID = "Tid-Rc-Ljr"; */
|
||||
"Tid-Rc-Ljr.ibExternalAccessibilityDescription" = "Tags";
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Language data files"; ObjectID = "7YG-8f-1AH"; */
|
||||
"7YG-8f-1AH.headerCell.title" = "Arquivos de dados de idioma";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Get"; ObjectID = "DIS-cU-NvL"; */
|
||||
"DIS-cU-NvL.title" = "Obter";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Language specific OCR data files can improve the optical character recognition results."; ObjectID = "LFI-zD-ohi"; */
|
||||
"LFI-zD-ohi.title" = "Os arquivos de dados OCR específicos do idioma podem melhorar os resultados do reconhecimento óptico de caracteres.";
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Offset:"; ObjectID = "1MN-KJ-v23"; */
|
||||
"1MN-KJ-v23.title" = "Deslocamento:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "ms"; ObjectID = "nxC-E2-XnZ"; */
|
||||
"nxC-E2-XnZ.title" = "ms";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "Ypd-2w-xig"; */
|
||||
"Ypd-2w-xig.title" = "Cancelar";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "OK"; ObjectID = "zRv-hv-PCL"; */
|
||||
"zRv-hv-PCL.title" = "OK";
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Set the format to create a custom filename in the Save As… panel and in the queue."; ObjectID = "hE3-zH-XFE"; */
|
||||
"hE3-zH-XFE.title" = "Defina um formato de nome para os arquivos a serem salvos a partir do painel 'Salvar como...' e na Fila.";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Set filename of TV Shows to:"; ObjectID = "kQC-bu-0by"; */
|
||||
"kQC-bu-0by.title" = "Formato de nome de arquivo para Programas de TV:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Set filename of Movies to:"; ObjectID = "wci-gO-GWT"; */
|
||||
"wci-gO-GWT.title" = "Formato de nome de arquivo para Filmes:";
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "0nh-AI-EEk"; */
|
||||
"0nh-AI-EEk.title" = "Manter tags existentes";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "2ur-nu-rZh"; */
|
||||
"2ur-nu-rZh.title" = "Manter Capas Existentes";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Add metadata item"; ObjectID = "30"; */
|
||||
"30.ibExternalAccessibilityDescription" = "Adicionar tag";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add a new metadata item"; ObjectID = "30"; */
|
||||
"30.ibShadowedToolTip" = "Adicionar tag";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibExternalAccessibilityDescription" = "Remover Tag";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibShadowedToolTip" = "Remover Tag";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Dismiss"; ObjectID = "87e-za-hJV"; */
|
||||
"87e-za-hJV.ibShadowedToolTip" = "Fechar";
|
||||
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "167"; */
|
||||
"167.title" = "Janela";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Name:"; ObjectID = "174"; */
|
||||
"174.title" = "Nome:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Save"; ObjectID = "177"; */
|
||||
"177.title" = "Salvar";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "178"; */
|
||||
"178.title" = "Cancelar";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "179"; */
|
||||
"179.ibExternalAccessibilityDescription" = "Preset";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Add an artwork"; ObjectID = "223"; */
|
||||
"223.ibShadowedToolTip" = "Adicionar Capa";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected artwork"; ObjectID = "226"; */
|
||||
"226.ibShadowedToolTip" = "Remover Capa Selecionada";
|
||||
|
||||
/* Class = "NSSlider"; ibShadowedToolTip = "Change artworks view zoom"; ObjectID = "235"; */
|
||||
"235.ibShadowedToolTip" = "Alterar o Tamanho de Visualização da Capa";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Title"; ObjectID = "CD8-S4-C35"; */
|
||||
"CD8-S4-C35.title" = "Título";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "CHk-xu-U9f"; */
|
||||
"CHk-xu-U9f.title" = "Manter Capas Existentes";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotation"; ObjectID = "j7q-XE-YXB"; */
|
||||
"j7q-XE-YXB.headerCell.title" = "Tag";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "KxJ-Zr-uiZ"; */
|
||||
"KxJ-Zr-uiZ.title" = "Manter tags existentes";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "os0-Yb-exW"; */
|
||||
"os0-Yb-exW.headerCell.title" = "Valor";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata"; ObjectID = "qg5-r0-E4V"; */
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "Tags";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Preset Title"; ObjectID = "RvM-No-Mwg"; */
|
||||
"RvM-No-Mwg.ibExternalAccessibilityDescription" = "Título do Preset";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "OK"; ObjectID = "xfY-4F-IAd"; */
|
||||
"xfY-4F-IAd.title" = "Fechar";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Edit selected set"; ObjectID = "C1d-lu-T7S"; */
|
||||
"C1d-lu-T7S.ibShadowedToolTip" = "Editar Preset";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected set"; ObjectID = "gBf-6T-hQv"; */
|
||||
"gBf-6T-hQv.ibShadowedToolTip" = "Remover Preset";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "iRF-P7-a3Q"; */
|
||||
"iRF-P7-a3Q.ibExternalAccessibilityDescription" = "Preset";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected set"; ObjectID = "SIg-lA-6FA"; */
|
||||
"SIg-lA-6FA.ibShadowedToolTip" = "Remover Preset";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Edit"; ObjectID = "W45-Bf-XCJ"; */
|
||||
"W45-Bf-XCJ.title" = "Editar";
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Saving…"; ObjectID = "1QY-aq-f1i"; */
|
||||
"1QY-aq-f1i.title" = "Salvando…";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "13i-3e-aOA"; */
|
||||
"13i-3e-aOA.title" = "Cancelar";
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Note: don't use this option if you are not sure of what it is doing, it's not needed in almost every case.\nEnable 64bit timescale and duration support. Normally, it's only needed if a track will be longer than 10 hours."; ObjectID = "3CX-Vp-T0h"; */
|
||||
"3CX-Vp-T0h.ibShadowedToolTip" = "Nota: não use esta opção se você não tiver certeza do que ela está fazendo, não é necessária em quase todos os casos.\nAtiva o suporte de escala de tempo e duração de 64 bits. Normalmente, só é necessário se uma faixa tiver mais de 10 horas.";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "64 bits chunk offset"; ObjectID = "14x-xv-HKI"; */
|
||||
"14x-xv-HKI.title" = "Deslocamento de fragmentos de 64 bits";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Options:"; ObjectID = "BXP-AU-x3T"; */
|
||||
"BXP-AU-x3T.title" = "Opções:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "File Format:"; ObjectID = "caN-zU-chS"; */
|
||||
"caN-zU-chS.title" = "Formato de arquivo:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "64 bits times"; ObjectID = "DCI-a5-K73"; */
|
||||
"DCI-a5-K73.title" = "Tempos de 64 bits";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Needed for mp4 larger than 4GB."; ObjectID = "emp-1S-F7H"; */
|
||||
"emp-1S-F7H.ibShadowedToolTip" = "Necessário para mp4 maior que 4GB";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Optimize"; ObjectID = "OZC-sc-82O"; */
|
||||
"OZC-sc-82O.title" = "Otimizar";
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Duration"; ObjectID = "0dC-Ux-mUt"; */
|
||||
"0dC-Ux-mUt.headerCell.title" = "Duração";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Name"; ObjectID = "3zj-cH-wWV"; */
|
||||
"3zj-cH-wWV.headerCell.title" = "Nome";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Tracks"; ObjectID = "Bpi-e7-pHx"; */
|
||||
"Bpi-e7-pHx.ibExternalAccessibilityDescription" = "Faixas";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Enabled"; ObjectID = "JD5-tO-uQc"; */
|
||||
"JD5-tO-uQc.ibExternalAccessibilityDescription" = "Ativado";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Enable or disable the track"; ObjectID = "JD5-tO-uQc"; */
|
||||
"JD5-tO-uQc.ibShadowedToolTip" = "Ativar ou Desativar a Faixa";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "00:00:00"; ObjectID = "LAW-aU-7Ie"; */
|
||||
"LAW-aU-7Ie.title" = "00:00:00";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Text"; ObjectID = "LgC-JT-Lsx"; */
|
||||
"LgC-JT-Lsx.title" = "Texto";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Language"; ObjectID = "qGd-Uo-RvP"; */
|
||||
"qGd-Uo-RvP.headerCell.title" = "Idioma";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Id"; ObjectID = "sB1-FL-VRd"; */
|
||||
"sB1-FL-VRd.headerCell.title" = "ID";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Format"; ObjectID = "vmh-dT-zIv"; */
|
||||
"vmh-dT-zIv.headerCell.title" = "Formato";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Enabled"; ObjectID = "Znw-bQ-tsE"; */
|
||||
"Znw-bQ-tsE.headerCell.title" = "Ativado";
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "s5f-yH-26m"; */
|
||||
"s5f-yH-26m.title" = "窗口";
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotations"; ObjectID = "6um-Rw-luk"; */
|
||||
"6um-Rw-luk.headerCell.title" = "注释";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep empty annotations"; ObjectID = "7Ek-lI-5Lo"; */
|
||||
"7Ek-lI-5Lo.title" = "保留空白注释";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "Aj4-bk-6RK"; */
|
||||
"Aj4-bk-6RK.headerCell.title" = "值";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Map the providers' metadata to the MP4 annotations"; ObjectID = "cUW-9F-EvO"; */
|
||||
"cUW-9F-EvO.title" = "将获取的元数据映射到 mp4 注释";
|
||||
|
||||
/* Class = "CocoaBindingsConnection"; ibShadowedIsNilPlaceholder = "Null"; ObjectID = "dgq-hT-1Vg"; */
|
||||
"dgq-hT-1Vg.ibShadowedIsNilPlaceholder" = "无";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Type"; ObjectID = "gwa-XG-q0L"; */
|
||||
"gwa-XG-q0L.headerCell.title" = "类型";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add annotation"; ObjectID = "Jdh-Cj-6ef"; */
|
||||
"Jdh-Cj-6ef.ibShadowedToolTip" = "添加注释条目";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Restore Defaults"; ObjectID = "nBh-jv-KDG"; */
|
||||
"nBh-jv-KDG.title" = "恢复默认";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata type"; ObjectID = "nXW-oy-rtu"; */
|
||||
"nXW-oy-rtu.ibExternalAccessibilityDescription" = "元数据类型";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Available values:"; ObjectID = "OYx-Dd-YIf"; */
|
||||
"OYx-Dd-YIf.title" = "可用值:";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "sd5-qb-K5v"; */
|
||||
"sd5-qb-K5v.ibShadowedToolTip" = "移除所选项";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata map"; ObjectID = "Tid-Rc-Ljr"; */
|
||||
"Tid-Rc-Ljr.ibExternalAccessibilityDescription" = "元数据映射";
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Language data files"; ObjectID = "7YG-8f-1AH"; */
|
||||
"7YG-8f-1AH.headerCell.title" = "语言支持文件";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Get"; ObjectID = "DIS-cU-NvL"; */
|
||||
"DIS-cU-NvL.title" = "获取";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Language specific OCR data files can improve the optical character recognition results."; ObjectID = "LFI-zD-ohi"; */
|
||||
"LFI-zD-ohi.title" = "特定语言的 OCR 支持文件可以改善光学文字识别的结果";
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Offset:"; ObjectID = "1MN-KJ-v23"; */
|
||||
"1MN-KJ-v23.title" = "偏移:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "ms"; ObjectID = "nxC-E2-XnZ"; */
|
||||
"nxC-E2-XnZ.title" = "毫秒";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "Ypd-2w-xig"; */
|
||||
"Ypd-2w-xig.title" = "取消";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "OK"; ObjectID = "zRv-hv-PCL"; */
|
||||
"zRv-hv-PCL.title" = "确定";
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Set the format to create a custom filename in the Save As… panel and in the queue."; ObjectID = "hE3-zH-XFE"; */
|
||||
"hE3-zH-XFE.title" = "在“另存为…”面板和队列中设置格式以创建自定义文件名。";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Set filename of TV Shows to:"; ObjectID = "kQC-bu-0by"; */
|
||||
"kQC-bu-0by.title" = "将电视节目文件名设置为:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Set filename of Movies to:"; ObjectID = "wci-gO-GWT"; */
|
||||
"wci-gO-GWT.title" = "将电影文件名设置为:";
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "0nh-AI-EEk"; */
|
||||
"0nh-AI-EEk.title" = "保留现有注释";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "2ur-nu-rZh"; */
|
||||
"2ur-nu-rZh.title" = "保留现有插图";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Add metadata item"; ObjectID = "30"; */
|
||||
"30.ibExternalAccessibilityDescription" = "添加元数据条目";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibShadowedToolTip = "Add a new metadata item"; ObjectID = "30"; */
|
||||
"30.ibShadowedToolTip" = "添加一个新的元数据条目";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibExternalAccessibilityDescription" = "移除所选项";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected item"; ObjectID = "53"; */
|
||||
"53.ibShadowedToolTip" = "移除所选项";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Dismiss"; ObjectID = "87e-za-hJV"; */
|
||||
"87e-za-hJV.ibShadowedToolTip" = "忽略";
|
||||
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "167"; */
|
||||
"167.title" = "窗口";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Name:"; ObjectID = "174"; */
|
||||
"174.title" = "名称:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Save"; ObjectID = "177"; */
|
||||
"177.title" = "存储";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "178"; */
|
||||
"178.title" = "取消";
|
||||
|
||||
/* Class = "NSPopUpButton"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "179"; */
|
||||
"179.ibExternalAccessibilityDescription" = "预设";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Add an artwork"; ObjectID = "223"; */
|
||||
"223.ibShadowedToolTip" = "添加插图";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected artwork"; ObjectID = "226"; */
|
||||
"226.ibShadowedToolTip" = "移除所选插图";
|
||||
|
||||
/* Class = "NSSlider"; ibShadowedToolTip = "Change artworks view zoom"; ObjectID = "235"; */
|
||||
"235.ibShadowedToolTip" = "改变插图视图缩放";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Title"; ObjectID = "CD8-S4-C35"; */
|
||||
"CD8-S4-C35.title" = "标题";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing artworks"; ObjectID = "CHk-xu-U9f"; */
|
||||
"CHk-xu-U9f.title" = "保留现有插图";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Annotation"; ObjectID = "j7q-XE-YXB"; */
|
||||
"j7q-XE-YXB.headerCell.title" = "注释";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Keep existing annotations"; ObjectID = "KxJ-Zr-uiZ"; */
|
||||
"KxJ-Zr-uiZ.title" = "保留现有注释";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "os0-Yb-exW"; */
|
||||
"os0-Yb-exW.headerCell.title" = "值";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Metadata"; ObjectID = "qg5-r0-E4V"; */
|
||||
"qg5-r0-E4V.ibExternalAccessibilityDescription" = "元数据";
|
||||
|
||||
/* Class = "NSTextField"; ibExternalAccessibilityDescription = "Preset Title"; ObjectID = "RvM-No-Mwg"; */
|
||||
"RvM-No-Mwg.ibExternalAccessibilityDescription" = "预设标题";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "OK"; ObjectID = "xfY-4F-IAd"; */
|
||||
"xfY-4F-IAd.title" = "确定";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Edit selected set"; ObjectID = "C1d-lu-T7S"; */
|
||||
"C1d-lu-T7S.ibShadowedToolTip" = "编辑所选预设";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected set"; ObjectID = "gBf-6T-hQv"; */
|
||||
"gBf-6T-hQv.ibShadowedToolTip" = "移除所选预设";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Sets"; ObjectID = "iRF-P7-a3Q"; */
|
||||
"iRF-P7-a3Q.ibExternalAccessibilityDescription" = "预设";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Remove selected set"; ObjectID = "SIg-lA-6FA"; */
|
||||
"SIg-lA-6FA.ibShadowedToolTip" = "移除所选预设";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Edit"; ObjectID = "W45-Bf-XCJ"; */
|
||||
"W45-Bf-XCJ.title" = "编辑";
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/* Class = "NSTextFieldCell"; title = "Saving…"; ObjectID = "1QY-aq-f1i"; */
|
||||
"1QY-aq-f1i.title" = "正在存储…";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "13i-3e-aOA"; */
|
||||
"13i-3e-aOA.title" = "取消";
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Note: don't use this option if you are not sure of what it is doing, it's not needed in almost every case.\nEnable 64bit timescale and duration support. Normally, it's only needed if a track will be longer than 10 hours."; ObjectID = "3CX-Vp-T0h"; */
|
||||
"3CX-Vp-T0h.ibShadowedToolTip" = "注意:如果不确定该选项的作用,请不要使用此选项,几乎在每种情况下都不需要使用此选项。\n启用64位时标和持续时间支持:通常,仅当时长超过10小时才需要。";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "64 bits chunk offset"; ObjectID = "14x-xv-HKI"; */
|
||||
"14x-xv-HKI.title" = "64位块偏移";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Options:"; ObjectID = "BXP-AU-x3T"; */
|
||||
"BXP-AU-x3T.title" = "选项:";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "File Format:"; ObjectID = "caN-zU-chS"; */
|
||||
"caN-zU-chS.title" = "文件格式:";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "64 bits times"; ObjectID = "DCI-a5-K73"; */
|
||||
"DCI-a5-K73.title" = "64位时间";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Needed for mp4 larger than 4GB."; ObjectID = "emp-1S-F7H"; */
|
||||
"emp-1S-F7H.ibShadowedToolTip" = "当 mp4 文件超过 4GB 时需要此项";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Optimize"; ObjectID = "OZC-sc-82O"; */
|
||||
"OZC-sc-82O.title" = "优化";
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Duration"; ObjectID = "0dC-Ux-mUt"; */
|
||||
"0dC-Ux-mUt.headerCell.title" = "持续时间";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Name"; ObjectID = "3zj-cH-wWV"; */
|
||||
"3zj-cH-wWV.headerCell.title" = "名称";
|
||||
|
||||
/* Class = "NSTableView"; ibExternalAccessibilityDescription = "Tracks"; ObjectID = "Bpi-e7-pHx"; */
|
||||
"Bpi-e7-pHx.ibExternalAccessibilityDescription" = "轨道";
|
||||
|
||||
/* Class = "NSButton"; ibExternalAccessibilityDescription = "Enabled"; ObjectID = "JD5-tO-uQc"; */
|
||||
"JD5-tO-uQc.ibExternalAccessibilityDescription" = "已启用";
|
||||
|
||||
/* Class = "NSButton"; ibShadowedToolTip = "Enable or disable the track"; ObjectID = "JD5-tO-uQc"; */
|
||||
"JD5-tO-uQc.ibShadowedToolTip" = "启用/禁用轨道";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "00:00:00"; ObjectID = "LAW-aU-7Ie"; */
|
||||
"LAW-aU-7Ie.title" = "00:00:00";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Text"; ObjectID = "LgC-JT-Lsx"; */
|
||||
"LgC-JT-Lsx.title" = "文本";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Language"; ObjectID = "qGd-Uo-RvP"; */
|
||||
"qGd-Uo-RvP.headerCell.title" = "语言";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Id"; ObjectID = "sB1-FL-VRd"; */
|
||||
"sB1-FL-VRd.headerCell.title" = "ID";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Format"; ObjectID = "vmh-dT-zIv"; */
|
||||
"vmh-dT-zIv.headerCell.title" = "格式";
|
||||
|
||||
/* Class = "NSTableColumn"; headerCell.title = "Enabled"; ObjectID = "Znw-bQ-tsE"; */
|
||||
"Znw-bQ-tsE.headerCell.title" = "已启用";
|
||||
|
||||
+3
-9
@@ -104,7 +104,7 @@
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Matroska video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<string>Editor</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>NSDocumentClass</key>
|
||||
@@ -142,7 +142,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>$(MARKETING_VERSION), Copyright 2025 Damiano Galassi</string>
|
||||
<string>$(MARKETING_VERSION), Copyright © 2026 Damiano Galassi</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
@@ -164,19 +164,13 @@
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2009-2025, Damiano Galassi</string>
|
||||
<string>Copyright © 2009-2026, Damiano Galassi</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>OSAScriptingDefinition</key>
|
||||
<string>Subler.sdef</string>
|
||||
<key>SUAllowsAutomaticUpdates</key>
|
||||
<false/>
|
||||
<key>SUFeedURL</key>
|
||||
<string>https://subler.org/appcast/appcast.xml</string>
|
||||
<key>SUPublicEDKey</key>
|
||||
<string>9M0JrgMq+5MrpLqTu7lT+ffThP8dRp78OQNTklwK/WE=</string>
|
||||
<key>NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac</key>
|
||||
<true/>
|
||||
<key>UTImportedTypeDeclarations</key>
|
||||
|
||||
+1
-1
Submodule MP42Foundation updated: ab939411c3...72e879e316.
Loaded 100 of 162 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user