Add a nice filename prefs icon, and rename some labels.

This commit is contained in:
Damiano Galassi committed 2017-12-11 15:25:10 +01:00
1 parent 68b3642dcc
commit f093013a8c
6 files changed
+52 -18

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "file.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "file@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

+3 -3
View File
@@ -39,7 +39,7 @@
<action selector="setPrefView:" target="-2" id="Ag8-C8-L9t"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="17842401-943C-414A-8A69-EF8E637F2B25" explicitItemIdentifier="TOOLBAR_OUTPUT" label="Filename" paletteLabel="Filename" tag="-1" image="NSFolder" autovalidates="NO" selectable="YES" id="DgV-th-SMR">
<toolbarItem implicitItemIdentifier="17842401-943C-414A-8A69-EF8E637F2B25" explicitItemIdentifier="TOOLBAR_OUTPUT" label="Filename" paletteLabel="Filename" tag="-1" image="mp4-file" autovalidates="NO" selectable="YES" id="DgV-th-SMR">
<connections>
<action selector="setPrefView:" target="-2" id="TZd-0g-SWe"/>
</connections>
@@ -58,8 +58,8 @@
<defaultToolbarItems>
<toolbarItem reference="h9J-Wg-NA5"/>
<toolbarItem reference="1NM-zc-8xJ"/>
<toolbarItem reference="DgV-th-SMR"/>
<toolbarItem reference="x8c-1o-aZk"/>
<toolbarItem reference="DgV-th-SMR"/>
<toolbarItem reference="yrt-qD-Ctd"/>
</defaultToolbarItems>
</toolbar>
@@ -578,9 +578,9 @@
</objects>
<resources>
<image name="NSAdvanced" width="32" height="32"/>
<image name="NSFolder" width="32" height="32"/>
<image name="NSFolderSmart" width="32" height="32"/>
<image name="NSPreferencesGeneral" width="32" height="32"/>
<image name="NSUserAccounts" width="32" height="32"/>
<image name="mp4-file" width="32" height="32"/>
</resources>
</document>
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13770" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13770"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -16,11 +16,11 @@
<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="610" height="160"/>
<rect key="frame" x="0.0" y="0.0" width="610" height="214"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PZS-8W-dno">
<rect key="frame" x="67" y="124" width="180" height="18"/>
<rect key="frame" x="67" y="178" width="180" height="18"/>
<buttonCell key="cell" type="check" title="Set filename of Movies to:" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="wci-gO-GWT">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -30,7 +30,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TBF-BD-fSk">
<rect key="frame" x="67" y="48" width="197" height="18"/>
<rect key="frame" x="67" y="102" width="197" height="18"/>
<buttonCell key="cell" type="check" title="Set filename of TV Shows to:" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="kQC-bu-0by">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -40,7 +40,7 @@
</connections>
</button>
<tokenField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="i8H-oP-Sif">
<rect key="frame" x="85" y="96" width="440" height="22"/>
<rect key="frame" x="85" y="150" width="440" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="440" id="6Ap-Ey-VHf"/>
</constraints>
@@ -55,7 +55,7 @@
</connections>
</tokenField>
<tokenField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rzc-AK-4Vr">
<rect key="frame" x="85" y="20" width="440" height="22"/>
<rect key="frame" x="85" y="74" width="440" height="22"/>
<tokenFieldCell key="cell" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" allowsEditingTextAttributes="YES" id="aHe-D5-fgj">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -67,7 +67,7 @@
</connections>
</tokenField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dq1-e8-fa6">
<rect key="frame" x="527" y="89" width="50" height="32"/>
<rect key="frame" x="527" y="143" width="50" height="32"/>
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSSmartBadgeTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="qsh-5h-jhl">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -77,7 +77,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fZZ-im-9BI">
<rect key="frame" x="527" y="13" width="50" height="32"/>
<rect key="frame" x="527" y="67" width="50" height="32"/>
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSSmartBadgeTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gf3-DD-hW7">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -86,24 +86,38 @@
<action selector="showTvShowTokens:" target="-2" id="pHZ-v7-U0W"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="700" translatesAutoresizingMaskIntoConstraints="NO" id="Pbz-wc-RXA">
<rect key="frame" x="83" y="20" width="444" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="Y5R-jS-Whb"/>
</constraints>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Set the format to create a custom filename in the Save As… panel and in the queue." id="hE3-zH-XFE">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="Pbz-wc-RXA" secondAttribute="bottom" constant="20" id="0R2-Y8-s5e"/>
<constraint firstItem="Pbz-wc-RXA" firstAttribute="leading" secondItem="i8H-oP-Sif" secondAttribute="leading" id="4Vz-o1-zSY"/>
<constraint firstItem="rzc-AK-4Vr" firstAttribute="leading" secondItem="TBF-BD-fSk" secondAttribute="leading" constant="16" id="Aws-ML-M7P"/>
<constraint firstItem="TBF-BD-fSk" firstAttribute="top" secondItem="i8H-oP-Sif" secondAttribute="bottom" constant="32" id="C0O-NO-8Te"/>
<constraint firstItem="dq1-e8-fa6" firstAttribute="centerY" secondItem="i8H-oP-Sif" secondAttribute="centerY" id="Dsc-lq-HSw"/>
<constraint firstItem="rzc-AK-4Vr" firstAttribute="top" secondItem="TBF-BD-fSk" secondAttribute="bottom" constant="8" id="FZZ-y5-ycJ"/>
<constraint firstItem="PZS-8W-dno" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="GYO-gT-cbH"/>
<constraint firstItem="i8H-oP-Sif" firstAttribute="top" secondItem="PZS-8W-dno" secondAttribute="bottom" constant="8" id="Mvi-1G-Dhn"/>
<constraint firstItem="Pbz-wc-RXA" firstAttribute="top" secondItem="rzc-AK-4Vr" secondAttribute="bottom" constant="20" id="ZQc-Um-c3U"/>
<constraint firstItem="i8H-oP-Sif" firstAttribute="leading" secondItem="PZS-8W-dno" secondAttribute="leading" constant="16" id="ael-zI-oHU"/>
<constraint firstItem="TBF-BD-fSk" firstAttribute="leading" secondItem="PZS-8W-dno" secondAttribute="leading" id="cyH-w2-B1O"/>
<constraint firstItem="dq1-e8-fa6" firstAttribute="leading" secondItem="i8H-oP-Sif" secondAttribute="trailing" constant="8" id="dhO-Zz-g71"/>
<constraint firstItem="fZZ-im-9BI" firstAttribute="centerY" secondItem="rzc-AK-4Vr" secondAttribute="centerY" id="gzL-hH-eGN"/>
<constraint firstAttribute="bottom" secondItem="rzc-AK-4Vr" secondAttribute="bottom" constant="20" id="icu-JT-7hW"/>
<constraint firstItem="Pbz-wc-RXA" firstAttribute="trailing" secondItem="i8H-oP-Sif" secondAttribute="trailing" id="ipc-wG-c2z"/>
<constraint firstItem="fZZ-im-9BI" firstAttribute="leading" secondItem="rzc-AK-4Vr" secondAttribute="trailing" constant="8" id="kZg-YA-eMU"/>
<constraint firstItem="i8H-oP-Sif" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="n4G-w8-dKr"/>
<constraint firstItem="i8H-oP-Sif" firstAttribute="width" secondItem="rzc-AK-4Vr" secondAttribute="width" id="xG0-RB-Iyt"/>
</constraints>
<point key="canvasLocation" x="-23" y="40"/>
<point key="canvasLocation" x="-23" y="58.5"/>
</customView>
<userDefaultsController representsSharedInstance="YES" id="BZm-iR-6oK"/>
</objects>
+2 -4
View File
@@ -47,15 +47,13 @@ extension MP42File {
let season = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyTVSeason).first?.numberValue?.intValue,
let number = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyTVEpisodeNumber).first?.numberValue?.intValue,
let mediaKind = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyMediaKind).first?.numberValue?.intValue,
mediaKind == 10
{
mediaKind == 10 {
return MetadataSearchTerms.tvShow(seriesName: tvShow, season: season, episode: number)
}
else if let title = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyName).first?.stringValue,
let _ = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyReleaseDate).first?.stringValue,
let mediaKind = metadata.metadataItemsFiltered(byIdentifier: MP42MetadataKeyMediaKind).first?.numberValue?.intValue,
mediaKind == 9
{
mediaKind == 9 {
return MetadataSearchTerms.movie(title: title)
}
else if let url = firstSourceURL() ?? fallbackURL {