Improve artworks categorization.

This commit is contained in:
Damiano Galassi committed 2019-11-18 11:46:05 +01:00
1 parent 79734ef123
commit 1f39136f34
10 files changed
+111 -113

No files matched your search

+42 -42
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15504"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@@ -32,7 +32,7 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view misplaced="YES" id="1lR-dE-p3x"> <view misplaced="YES" id="1lR-dE-p3x">
<rect key="frame" x="0.0" y="0.0" width="550" height="354"/> <rect key="frame" x="0.0" y="0.0" width="550" height="444"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bfj-tB-Wq2"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bfj-tB-Wq2">
@@ -65,7 +65,7 @@ Gw
<rect key="frame" x="20" y="20" width="16" height="16"/> <rect key="frame" x="20" y="20" width="16" height="16"/>
</progressIndicator> </progressIndicator>
<tabView translatesAutoresizingMaskIntoConstraints="NO" id="6hW-RR-cfF"> <tabView translatesAutoresizingMaskIntoConstraints="NO" id="6hW-RR-cfF">
<rect key="frame" x="-12" y="240" width="574" height="110"/> <rect key="frame" x="-12" y="279" width="574" height="109"/>
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<tabViewItems> <tabViewItems>
<tabViewItem label="Movie" identifier="1" id="apc-8c-iyM"> <tabViewItem label="Movie" identifier="1" id="apc-8c-iyM">
@@ -109,12 +109,12 @@ Gw
</connections> </connections>
</popUpButton> </popUpButton>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="0aO-Wz-ASZ"> <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="0aO-Wz-ASZ">
<rect key="frame" x="437" y="9" width="102" height="20"/> <rect key="frame" x="424" y="7" width="116" height="25"/>
<constraints> <constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="99" id="4MR-8H-PO9"/> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="110" id="4MR-8H-PO9"/>
</constraints> </constraints>
<popUpButtonCell key="cell" type="radio" title="iTunes Store" bezelStyle="regularSquare" imagePosition="left" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" selectedItem="nn6-mR-Bh1" id="k9r-Fo-4Nl"> <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" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<menu key="menu" title="OtherViews" id="Gqk-Gk-yG7"> <menu key="menu" title="OtherViews" id="Gqk-Gk-yG7">
<items> <items>
@@ -167,7 +167,7 @@ DQ
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="PoJ-z7-u2L"> <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="PoJ-z7-u2L">
<rect key="frame" x="14" y="45" width="62" height="16"/> <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"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="TV Show:" id="lE4-J1-ySV">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -175,7 +175,7 @@ DQ
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gWo-ag-3S4"> <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gWo-ag-3S4">
<rect key="frame" x="14" y="13" width="62" height="16"/> <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"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Season #" id="kz7-mH-DuT">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -183,7 +183,7 @@ DQ
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nYS-Uo-Puv"> <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nYS-Uo-Puv">
<rect key="frame" x="81" y="10" width="30" height="21"/> <rect key="frame" x="80" y="10" width="30" height="21"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="30" id="9CR-ib-DtF"/> <constraint firstAttribute="width" constant="30" id="9CR-ib-DtF"/>
</constraints> </constraints>
@@ -198,7 +198,7 @@ DQ
</connections> </connections>
</textField> </textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PmP-Uz-mXF"> <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PmP-Uz-mXF">
<rect key="frame" x="185" y="10" width="30" height="21"/> <rect key="frame" x="184" y="10" width="30" height="21"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="30" id="JnI-dd-MkA"/> <constraint firstAttribute="width" constant="30" id="JnI-dd-MkA"/>
</constraints> </constraints>
@@ -212,8 +212,8 @@ DQ
<outlet property="delegate" destination="-2" id="Em3-9Q-0I2"/> <outlet property="delegate" destination="-2" id="Em3-9Q-0I2"/>
</connections> </connections>
</textField> </textField>
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r32-v1-g3U"> <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r32-v1-g3U">
<rect key="frame" x="116" y="13" width="64" height="16"/> <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"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Episode #" id="Zik-QU-m81">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -221,7 +221,7 @@ DQ
</textFieldCell> </textFieldCell>
</textField> </textField>
<comboBox verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yxL-hY-Wvf"> <comboBox verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yxL-hY-Wvf">
<rect key="frame" x="81" y="35" width="376" height="25"/> <rect key="frame" x="80" y="35" width="377" height="25"/>
<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"> <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"/> <font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -234,7 +234,7 @@ DQ
</connections> </connections>
</comboBox> </comboBox>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4yY-id-JNb"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4yY-id-JNb">
<rect key="frame" x="223" y="7" width="158" height="25"/> <rect key="frame" x="212" y="7" width="158" height="25"/>
<constraints> <constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="153" id="aRl-QK-caF"/> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="153" id="aRl-QK-caF"/>
</constraints> </constraints>
@@ -248,13 +248,13 @@ DQ
<action selector="metadataProviderLanguageSelected:" target="-2" id="7uv-wc-CIQ"/> <action selector="metadataProviderLanguageSelected:" target="-2" id="7uv-wc-CIQ"/>
</connections> </connections>
</popUpButton> </popUpButton>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="UTG-O0-5RG"> <popUpButton horizontalCompressionResistancePriority="749" translatesAutoresizingMaskIntoConstraints="NO" id="UTG-O0-5RG">
<rect key="frame" x="437" y="9" width="102" height="20"/> <rect key="frame" x="425" y="7" width="115" height="25"/>
<constraints> <constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="99" id="yze-MC-pfr"/> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="110" id="yze-MC-pfr"/>
</constraints> </constraints>
<popUpButtonCell key="cell" type="radio" title="iTunes Store" bezelStyle="regularSquare" imagePosition="left" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" selectedItem="j44-FV-Lpy" id="O3t-4h-3zl"> <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" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<menu key="menu" title="OtherViews" id="OYz-qX-3i2"> <menu key="menu" title="OtherViews" id="OYz-qX-3i2">
<items> <items>
@@ -318,26 +318,26 @@ DQ
<textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dWj-kw-NVW"> <textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dWj-kw-NVW">
<rect key="frame" x="41" y="21" width="297" height="14"/> <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"> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Progress status" id="gYx-cY-5Xj">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<splitView autosaveName="SBMetadataSearchSplitView" translatesAutoresizingMaskIntoConstraints="NO" id="BfX-EM-ktQ"> <splitView autosaveName="SBMetadataSearchSplitView" translatesAutoresizingMaskIntoConstraints="NO" id="BfX-EM-ktQ">
<rect key="frame" x="20" y="61" width="510" height="181"/> <rect key="frame" x="20" y="61" width="510" height="220"/>
<subviews> <subviews>
<customView misplaced="YES" id="8It-Zb-03g"> <customView misplaced="YES" id="8It-Zb-03g">
<rect key="frame" x="0.0" y="0.0" width="510" height="62"/> <rect key="frame" x="0.0" y="0.0" width="510" height="77"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<scrollView autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VnH-EL-2bp"> <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="-18" width="510" height="57"/> <rect key="frame" x="0.0" y="-10" width="510" height="155"/>
<clipView key="contentView" id="I28-fS-tPQ"> <clipView key="contentView" id="I28-fS-tPQ">
<rect key="frame" x="1" y="0.0" width="508" height="56"/> <rect key="frame" x="1" y="0.0" width="508" height="154"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="15" rowSizeStyle="automatic" headerView="Bv4-ow-7Qb" viewBased="YES" id="IDz-Ox-2sW"> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" 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="31"/> <rect key="frame" x="0.0" y="0.0" width="508" height="129"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/> <size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -345,12 +345,12 @@ DQ
<tableColumns> <tableColumns>
<tableColumn width="505" minWidth="40" maxWidth="1000" id="ZZg-QL-MyD"> <tableColumn width="505" minWidth="40" maxWidth="1000" id="ZZg-QL-MyD">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Title"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Title">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
</tableHeaderCell> </tableHeaderCell>
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" alignment="left" title="Text Cell" id="Fzd-0O-qsU"> <textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" alignment="left" title="Text Cell" id="Fzd-0O-qsU">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -363,7 +363,7 @@ DQ
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFv-ne-Jzf"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFv-ne-Jzf">
<rect key="frame" x="0.0" y="1" width="505" height="14"/> <rect key="frame" x="0.0" y="1" width="505" height="14"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Table View Cell" id="wLe-r3-x0V"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Table View Cell" id="wLe-r3-x0V">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -414,17 +414,17 @@ DQ
</constraints> </constraints>
</customView> </customView>
<customView misplaced="YES" id="YFw-L1-xW7"> <customView misplaced="YES" id="YFw-L1-xW7">
<rect key="frame" x="0.0" y="71" width="510" height="110"/> <rect key="frame" x="0.0" y="86" width="510" height="134"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<scrollView autohidesScrollers="YES" horizontalLineScroll="39" horizontalPageScroll="10" verticalLineScroll="39" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L9f-RN-ymm"> <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="-33" width="510" height="115"/> <rect key="frame" x="0.0" y="-16" width="510" height="56"/>
<clipView key="contentView" id="JKj-Cf-XlS"> <clipView key="contentView" id="JKj-Cf-XlS">
<rect key="frame" x="1" y="0.0" width="508" height="114"/> <rect key="frame" x="1" y="0.0" width="508" height="55"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" 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"> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" 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="89"/> <rect key="frame" x="0.0" y="0.0" width="508" height="55"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/> <size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -433,12 +433,12 @@ DQ
<tableColumns> <tableColumns>
<tableColumn identifier="name" width="101" minWidth="40" maxWidth="1000" id="XgL-ec-DEt"> <tableColumn identifier="name" width="101" minWidth="40" maxWidth="1000" id="XgL-ec-DEt">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Annotation"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Annotation">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
</tableHeaderCell> </tableHeaderCell>
<textFieldCell key="dataCell" controlSize="small" alignment="right" title="Text Cell" id="gQU-uU-Cfx"> <textFieldCell key="dataCell" controlSize="small" alignment="right" title="Text Cell" id="gQU-uU-Cfx">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -450,7 +450,7 @@ DQ
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDJ-re-Kse"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDJ-re-Kse">
<rect key="frame" x="0.0" y="22" width="101" height="14"/> <rect key="frame" x="0.0" y="22" width="101" height="14"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Table View Cell" id="5mH-2x-szO"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Table View Cell" id="5mH-2x-szO">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -469,12 +469,12 @@ DQ
</tableColumn> </tableColumn>
<tableColumn identifier="value" editable="NO" width="401" minWidth="40" maxWidth="1000" id="d9Q-FE-uuK"> <tableColumn identifier="value" editable="NO" width="401" minWidth="40" maxWidth="1000" id="d9Q-FE-uuK">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Value"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Value">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
</tableHeaderCell> </tableHeaderCell>
<textFieldCell key="dataCell" controlSize="small" alignment="left" title="Text Cell" id="0u1-ap-s6L"> <textFieldCell key="dataCell" controlSize="small" alignment="left" title="Text Cell" id="0u1-ap-s6L">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -487,7 +487,7 @@ DQ
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Szc-uj-Lea"> <textField 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"/> <rect key="frame" x="0.0" y="0.0" width="401" height="14"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Table View Cell" id="cXa-al-MIH"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Table View Cell" id="cXa-al-MIH">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -510,7 +510,7 @@ DQ
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uJ3-OT-6fm"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uJ3-OT-6fm">
<rect key="frame" x="0.0" y="12" width="401" height="14"/> <rect key="frame" x="0.0" y="12" width="401" height="14"/>
<textFieldCell key="cell" controlSize="small" selectable="YES" sendsActionOnEndEditing="YES" title="Table View Cell" id="L0d-pm-lX4"> <textFieldCell key="cell" controlSize="small" selectable="YES" sendsActionOnEndEditing="YES" title="Table View Cell" id="L0d-pm-lX4">
<font key="font" metaFont="toolTip"/> <font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
@@ -586,7 +586,7 @@ DQ
<constraint firstItem="BfX-EM-ktQ" firstAttribute="leading" secondItem="QEr-1S-JZX" secondAttribute="leading" id="mjk-ta-h2N"/> <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"/> <constraint firstItem="zM1-YP-Au2" firstAttribute="leading" secondItem="dWj-kw-NVW" secondAttribute="trailing" constant="14" id="vyk-qX-8IX"/>
</constraints> </constraints>
<point key="canvasLocation" x="139" y="153.5"/> <point key="canvasLocation" x="-3.5" y="116"/>
</view> </view>
</objects> </objects>
</document> </document>
+3 -12
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15505"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@@ -484,7 +484,7 @@
</connections> </connections>
</button> </button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="08Q-2k-0Gb"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="08Q-2k-0Gb">
<rect key="frame" x="183" y="364" width="79" height="17"/> <rect key="frame" x="183" y="364" width="76" height="17"/>
<popUpButtonCell key="cell" type="roundRect" title="Poster" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" selectedItem="YjX-6f-SPu" id="1t8-o9-ckI"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu" size="11"/> <font key="font" metaFont="menu" size="11"/>
@@ -496,21 +496,12 @@
<menuItem title="Season" tag="1" id="QR6-hq-GZL"> <menuItem title="Season" tag="1" id="QR6-hq-GZL">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
</menuItem> </menuItem>
<menuItem title="Square" tag="2" id="7zv-RG-1w4">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="Rectangle" tag="3" id="ALr-6K-nSQ">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="Episode" tag="4" id="mps-yj-l7z"> <menuItem title="Episode" tag="4" id="mps-yj-l7z">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
</menuItem> </menuItem>
<menuItem title="Backdrop" tag="5" id="Aaf-km-GUP"> <menuItem title="Backdrop" tag="5" id="Aaf-km-GUP">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
</menuItem> </menuItem>
<menuItem title="iTunes" tag="6" id="GXR-5u-c8a">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="None" tag="7" id="Fid-Wo-2Eb"> <menuItem title="None" tag="7" id="Fid-Wo-2Eb">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
</menuItem> </menuItem>
+26 -31
View File
@@ -36,9 +36,7 @@ private extension MetadataResult {
self[.releaseDate] = formatter.string(from: date) self[.releaseDate] = formatter.string(from: date)
} }
let artworks = [item.images.coverArt16X9, item.images.coverArt].compactMap { $0?.artwork } self.remoteArtworks = [item.images.coverArt16X9, item.images.coverArt].compactMap { $0?.artwork(type: .poster) }
self.remoteArtworks = artworks
} }
convenience init(item: AppleTV.Item, episode: AppleTV.Episode) { convenience init(item: AppleTV.Item, episode: AppleTV.Episode) {
@@ -64,10 +62,7 @@ private extension MetadataResult {
self[.episodeNumber] = episode.episodeNumber self[.episodeNumber] = episode.episodeNumber
self[.trackNumber] = episode.episodeNumber self[.trackNumber] = episode.episodeNumber
if let rating = episode.rating { self[.rating] = episode.rating?.formatted
let system = rating.system.replacingOccurrences(of: "_", with: "-")
self[.rating] = "\(system)|\(rating.displayName)|\(rating.value)|"
}
self[.iTunesURL] = episode.showURL self[.iTunesURL] = episode.showURL
self[.serviceSeriesID] = episode.showID self[.serviceSeriesID] = episode.showID
@@ -76,10 +71,9 @@ private extension MetadataResult {
self[.releaseDate] = Date(timeIntervalSince1970: releaseDate / 1000) self[.releaseDate] = Date(timeIntervalSince1970: releaseDate / 1000)
} }
let artworks = [item.images.coverArt16X9, item.images.coverArt, episode.seasonImages.coverArt16X9, self.remoteArtworks = [item.images.coverArt16X9, item.images.coverArt].compactMap { $0?.artwork(type: .poster) }
episode.seasonImages.coverArt, episode.images.previewFrame].compactMap { $0?.artwork } self.remoteArtworks += [episode.seasonImages.coverArt16X9, episode.seasonImages.coverArt].compactMap { $0?.artwork(type: .season) }
self.remoteArtworks += [episode.images.previewFrame].compactMap { $0?.artwork(type: .episode) }
self.remoteArtworks = artworks
} }
} }
@@ -173,9 +167,7 @@ public struct AppleTV: MetadataService {
metadata[.studio] = content.studio metadata[.studio] = content.studio
if metadata[.rating] == nil { if metadata[.rating] == nil {
let rating = content.rating metadata[.rating] = content.rating.formatted
let system = rating.system.replacingOccurrences(of: "_", with: "-")
metadata[.rating] = "\(system)|\(rating.displayName)|\(rating.value)|"
} }
metadata[.cast] = details.roles.filter { $0.type == "Actor" }.map { $0.personName }.joined(separator: ", ") + metadata[.cast] = details.roles.filter { $0.type == "Actor" }.map { $0.personName }.joined(separator: ", ") +
@@ -208,9 +200,7 @@ public struct AppleTV: MetadataService {
metadata[.genre] = content.genres.map { $0.name }.joined(separator: ", ") metadata[.genre] = content.genres.map { $0.name }.joined(separator: ", ")
metadata[.studio] = content.studio metadata[.studio] = content.studio
let rating = content.rating metadata[.rating] = content.rating.formatted
let system = rating.system.replacingOccurrences(of: "_", with: "-")
metadata[.rating] = "\(system)|\(rating.displayName)|\(rating.value)|"
metadata[.cast] = details.roles.filter { $0.type == "Actor" }.map { $0.personName }.joined(separator: ", ") + metadata[.cast] = details.roles.filter { $0.type == "Actor" }.map { $0.personName }.joined(separator: ", ") +
details.roles.filter { $0.type == "Voice" }.map { $0.personName }.joined(separator: ", ") details.roles.filter { $0.type == "Voice" }.map { $0.personName }.joined(separator: ", ")
@@ -229,7 +219,7 @@ public struct AppleTV: MetadataService {
if let url = URL(string: urlString), let results = sendJSONRequest(url: url, type: Wrapper<Seasons>.self) { 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 } let filteredResults = results.data.seasons.values.joined().filter { $0.seasonNumber == season }
return filteredResults.compactMap { $0.images }.compactMap { $0.coverArt16X9 }.compactMap { $0.artwork } return filteredResults.compactMap { $0.images }.compactMap { $0.coverArt16X9 }.compactMap { $0.artwork(type: .season) }
} }
return [] return []
} }
@@ -254,7 +244,7 @@ public struct AppleTV: MetadataService {
} }
}() }()
let artworks = filteredResults.compactMap { $0.images }.compactMap { $0.coverArt16X9 }.compactMap { $0.artwork } let artworks = filteredResults.compactMap { $0.images }.compactMap { $0.coverArt16X9 }.compactMap { $0.artwork(type: .poster) }
if case let MediaType.tvShow(season) = type, let item = filteredResults.first { if case let MediaType.tvShow(season) = type, let item = filteredResults.first {
if let season = season { if let season = season {
@@ -335,21 +325,21 @@ public struct AppleTV: MetadataService {
let joeColor: String? let joeColor: String?
let url: String let url: String
var type: ArtworkType { var size: ArtworkSize {
get { get {
if width > height { if width > height {
return .rectangle return .rectangle
} else if width == height { } else if width == height {
return .square return .square
} else { } else {
return .poster return .standard
} }
} }
} }
var thumbSize: String { var thumbSize: String {
get { get {
switch type { switch size {
case .square: case .square:
return "329x329.jpg" return "329x329.jpg"
case .rectangle: case .rectangle:
@@ -362,7 +352,7 @@ public struct AppleTV: MetadataService {
var fullSize: String { var fullSize: String {
get { get {
switch type { switch size {
case .square: case .square:
return "800x800.jpg" return "800x800.jpg"
case .rectangle: case .rectangle:
@@ -373,14 +363,12 @@ public struct AppleTV: MetadataService {
} }
} }
var artwork: Artwork? { func artwork(type: ArtworkType) -> Artwork? {
get { let baseURL = url.replacingOccurrences(of: "{w}x{h}.{f}", with: "")
let baseURL = url.replacingOccurrences(of: "{w}x{h}.{f}", with: "") if let artworkURL = URL(string: baseURL + fullSize), let thumbURL = URL(string: baseURL + thumbSize) {
if let artworkURL = URL(string: baseURL + fullSize), let thumbURL = URL(string: baseURL + thumbSize) { return Artwork(url: artworkURL, thumbURL: thumbURL, service: "Apple TV", type: type, size: size)
return Artwork(url: artworkURL, thumbURL: thumbURL, service: "Apple TV", type: type) } else {
} else { return nil
return nil
}
} }
} }
} }
@@ -401,6 +389,13 @@ public struct AppleTV: MetadataService {
let name: String let name: String
let system: String let system: String
let value: UInt let value: UInt
var formatted: String {
get {
let formattedSystem = system.replacingOccurrences(of: "_", with: "-").replacingOccurrences(of: "movies", with: "movie")
return "\(formattedSystem)|\(displayName)|\(value)|"
}
}
} }
private struct Genre: Codable { private struct Genre: Codable {
+18 -9
View File
@@ -10,6 +10,23 @@ import MP42Foundation
// MARK: - Image // MARK: - Image
public enum ArtworkSize : Int, CustomStringConvertible {
public var description: String {
switch self {
case .standard:
return "standard"
case .square:
return "square"
case .rectangle:
return "rectangle"
}
}
case standard
case square
case rectangle
}
public enum ArtworkType : Int, CustomStringConvertible { public enum ArtworkType : Int, CustomStringConvertible {
public var description: String { public var description: String {
switch self { switch self {
@@ -17,16 +34,10 @@ public enum ArtworkType : Int, CustomStringConvertible {
return "poster" return "poster"
case .season: case .season:
return "season" return "season"
case .square:
return "square"
case .rectangle:
return "rectangle"
case .episode: case .episode:
return "episode" return "episode"
case .backdrop: case .backdrop:
return "backdrop" return "backdrop"
case .iTunes:
return "iTunes"
case .none: case .none:
return NSLocalizedString("None", comment: "Queue metadata search artwork type") return NSLocalizedString("None", comment: "Queue metadata search artwork type")
@@ -35,11 +46,8 @@ public enum ArtworkType : Int, CustomStringConvertible {
case poster case poster
case season case season
case square
case rectangle
case episode case episode
case backdrop case backdrop
case iTunes
case none case none
} }
@@ -48,6 +56,7 @@ public struct Artwork {
public let thumbURL: URL public let thumbURL: URL
public let service: String public let service: String
public let type: ArtworkType public let type: ArtworkType
public let size: ArtworkSize
} }
private let localizedKeys: [MetadataResult.Key: String] = [ private let localizedKeys: [MetadataResult.Key: String] = [
+2 -2
View File
@@ -39,7 +39,7 @@ private struct SquaredTVArtJsonApi {
func toRemoteImage() -> Artwork { func toRemoteImage() -> Artwork {
let thumbURL = alt_sizes.filter { $0.width > 200 && $0.width < 400 }.first?.url ?? original_size.url let thumbURL = alt_sizes.filter { $0.width > 200 && $0.width < 400 }.first?.url ?? original_size.url
return Artwork(url: original_size.url, thumbURL: thumbURL, service: "Squared TV Art", type: .square) return Artwork(url: original_size.url, thumbURL: thumbURL, service: "Squared TV Art", type: .season, size: .square)
} }
} }
@@ -139,7 +139,7 @@ private struct SquaredTVArtHTMLScraper {
} }
func toRemoteImage() -> Artwork { func toRemoteImage() -> Artwork {
return Artwork(url: url, thumbURL: thumbURL, service: "Squared TV Art", type: .square) return Artwork(url: url, thumbURL: thumbURL, service: "Squared TV Art", type: .season, size: .rectangle)
} }
} }
+6 -6
View File
@@ -105,7 +105,7 @@ public struct TheMovieDB: MetadataService {
private func loadArtwork(filePath: String, baseURL: String, thumbSize: String, kind: ArtworkType) -> Artwork? { private func loadArtwork(filePath: String, baseURL: String, thumbSize: String, kind: ArtworkType) -> Artwork? {
guard let url = URL(string: baseURL + "original" + filePath), guard let url = URL(string: baseURL + "original" + filePath),
let thumbURL = URL(string: baseURL + thumbSize + filePath) else { return nil } let thumbURL = URL(string: baseURL + thumbSize + filePath) else { return nil }
return Artwork(url: url, thumbURL: thumbURL, service: self.name, type: kind) return Artwork(url: url, thumbURL: thumbURL, service: self.name, type: kind, size: .standard)
} }
private func loadMovieArtworks(result: TMDBMovie) -> [Artwork] { private func loadMovieArtworks(result: TMDBMovie) -> [Artwork] {
@@ -129,8 +129,8 @@ public struct TheMovieDB: MetadataService {
} }
group.wait() group.wait()
artworks.append(contentsOf: iTunesImage)
artworks.append(contentsOf: appleTV) artworks.append(contentsOf: appleTV)
artworks.append(contentsOf: iTunesImage)
// Add TheMovieDB artworks // Add TheMovieDB artworks
if let config = session.fetchConfiguration()?.images, if let config = session.fetchConfiguration()?.images,
@@ -248,7 +248,7 @@ public struct TheMovieDB: MetadataService {
if let backdropPath = result.backdrop_path, if let backdropPath = result.backdrop_path,
let url = URL(string: imageBaseURL + "original" + backdropPath), let url = URL(string: imageBaseURL + "original" + backdropPath),
let thumbURL = URL(string: imageBaseURL + backdropThumbnailSize + backdropPath) { let thumbURL = URL(string: imageBaseURL + backdropThumbnailSize + backdropPath) {
let remoteImage = Artwork(url: url, thumbURL: thumbURL, service: self.name, type: .backdrop) let remoteImage = Artwork(url: url, thumbURL: thumbURL, service: self.name, type: .backdrop, size: .rectangle)
artworks.append(remoteImage) artworks.append(remoteImage)
} }
@@ -256,7 +256,7 @@ public struct TheMovieDB: MetadataService {
for image in images { for image in images {
if let url = URL(string: imageBaseURL + "original" + image.file_path), if let url = URL(string: imageBaseURL + "original" + image.file_path),
let thumbURL = URL(string: imageBaseURL + posterThumbnailSize + image.file_path) { let thumbURL = URL(string: imageBaseURL + posterThumbnailSize + image.file_path) {
let remoteImage = Artwork(url: url, thumbURL: thumbURL, service: self.name, type: .poster) let remoteImage = Artwork(url: url, thumbURL: thumbURL, service: self.name, type: .poster, size: .standard)
artworks.append(remoteImage) artworks.append(remoteImage)
} }
} }
@@ -266,7 +266,7 @@ public struct TheMovieDB: MetadataService {
let posterPath = result.poster_path, let posterPath = result.poster_path,
let url = URL(string: imageBaseURL + "original" + posterPath), let url = URL(string: imageBaseURL + "original" + posterPath),
let thumbURL = URL(string: imageBaseURL + posterThumbnailSize + posterPath) { let thumbURL = URL(string: imageBaseURL + posterThumbnailSize + posterPath) {
let remoteImage = Artwork(url: url, thumbURL: thumbURL, service: self.name, type: .poster) let remoteImage = Artwork(url: url, thumbURL: thumbURL, service: self.name, type: .poster, size: .standard)
artworks.append(remoteImage) artworks.append(remoteImage)
} }
@@ -407,9 +407,9 @@ public struct TheMovieDB: MetadataService {
} }
group.wait() group.wait()
artworks.insert(contentsOf: appleTV, at: 0)
artworks.insert(contentsOf: iTunesImage, at: 0) artworks.insert(contentsOf: iTunesImage, at: 0)
artworks.insert(contentsOf: squareTVArt, at: 0) artworks.insert(contentsOf: squareTVArt, at: 0)
artworks.insert(contentsOf: appleTV, at: 0)
metadata.remoteArtworks = artworks metadata.remoteArtworks = artworks
+4 -4
View File
@@ -320,7 +320,7 @@ public struct TheTVDB : MetadataService {
for image in images { for image in images {
guard let fileURL = URL(string: TheTVDB.bannerPath + image.fileName), guard let fileURL = URL(string: TheTVDB.bannerPath + image.fileName),
let thumbURL = URL(string: TheTVDB.bannerPath + image.thumbnail) let thumbURL = URL(string: TheTVDB.bannerPath + image.fileName.replacingOccurrences(of: ".jpg", with: "_t.jpg"))
else { continue } else { continue }
var selected = true var selected = true
@@ -330,7 +330,7 @@ public struct TheTVDB : MetadataService {
} }
if selected { if selected {
artworks.append(Artwork(url: fileURL, thumbURL: image.thumbnail.isEmpty ? fileURL : thumbURL, service: self.name, type: type)) artworks.append(Artwork(url: fileURL, thumbURL: image.thumbnail.isEmpty ? fileURL : thumbURL, service: self.name, type: type, size: .standard))
} }
} }
return artworks return artworks
@@ -356,7 +356,7 @@ public struct TheTVDB : MetadataService {
} }
if let filename = info.filename, let url = URL(string: TheTVDB.bannerPath + filename) { if let filename = info.filename, let url = URL(string: TheTVDB.bannerPath + filename) {
artworks.append(Artwork(url: url, thumbURL: url, service: self.name, type: .episode)) artworks.append(Artwork(url: url, thumbURL: url, service: self.name, type: .episode, size: .rectangle))
} }
} }
@@ -381,9 +381,9 @@ public struct TheTVDB : MetadataService {
} }
group.wait() group.wait()
artworks.insert(contentsOf: appleTV, at: 0)
artworks.insert(contentsOf: iTunesImage, at: 0) artworks.insert(contentsOf: iTunesImage, at: 0)
artworks.insert(contentsOf: squareTVArt, at: 0) artworks.insert(contentsOf: squareTVArt, at: 0)
artworks.insert(contentsOf: appleTV, at: 0)
artworks.append(contentsOf: seasonImages) artworks.append(contentsOf: seasonImages)
artworks.append(contentsOf: posterImages) artworks.append(contentsOf: posterImages)
} }
@@ -13,6 +13,7 @@ public struct TVDBSeriesSearchResult : Codable {
public let banner: String? public let banner: String?
public let firstAired: String? public let firstAired: String?
public let id: Int public let id: Int
public let imdbId: String?
public let network: String? public let network: String?
public let overview: String? public let overview: String?
public let seriesName: String? public let seriesName: String?
@@ -227,7 +228,7 @@ final public class TheTVDBService {
guard let url = URL(string: "https://api.thetvdb.com/login") else { return nil } guard let url = URL(string: "https://api.thetvdb.com/login") else { return nil }
let header = ["Content-Type" : "application/json", let header = ["Content-Type" : "application/json",
"Accept" : "application/json"] "Accept" : "application/vnd.thetvdb.v3"]
guard let response = URLSession.data(from: url, guard let response = URLSession.data(from: url,
httpMethod: "POST", httpMethod: "POST",
@@ -263,7 +264,7 @@ final public class TheTVDBService {
let header = ["Authorization": "Bearer \(token.key)", let header = ["Authorization": "Bearer \(token.key)",
"Content-Type" : "application/json", "Content-Type" : "application/json",
"Accept" : "application/json", "Accept" : "application/vnd.thetvdb.v3",
"Accept-Language" : language] "Accept-Language" : language]
return URLSession.data(from: url, header: header) return URLSession.data(from: url, header: header)
+3 -2
View File
@@ -367,8 +367,9 @@ public struct iTunesStore: MetadataService {
if let artworkURL = URL(string: text), if let artworkURL = URL(string: text),
let artworkFullSizeURL = URL(string: text.replacingOccurrences(of: "100x100bb", with: replacement)) { let artworkFullSizeURL = URL(string: text.replacingOccurrences(of: "100x100bb", with: replacement)) {
let type = isTVShow ? ArtworkType.square : .poster let size = isTVShow ? ArtworkSize.square : .standard
return Artwork(url:artworkFullSizeURL, thumbURL: artworkURL, service: self.name, type: type) let type = isTVShow ? ArtworkType.season : .poster
return Artwork(url:artworkFullSizeURL, thumbURL: artworkURL, service: self.name, type: type, size: size)
} }
return nil return nil
+4 -3
View File
@@ -185,9 +185,10 @@ extension Array where Element == Artwork {
if service == iTunesServiceName { if service == iTunesServiceName {
return self.first return self.first
} }
else if type == ArtworkType.iTunes { // FIXME
/*else if type == ArtworkType.iTunes {
return self.filter { $0.service == iTunesServiceName }.first return self.filter { $0.service == iTunesServiceName }.first
} }*/
else { else {
let serviceArtwork = self.filter { $0.type == type && $0.service == service }.first let serviceArtwork = self.filter { $0.type == type && $0.service == service }.first
let artwork = self.filter { $0.type == type }.first let artwork = self.filter { $0.type == type }.first
@@ -220,7 +221,7 @@ class QueueMetadataAction : NSObject, QueueActionProtocol {
self.tvShowLanguage = tvShowLanguage; self.tvShowLanguage = tvShowLanguage;
self.tvShowProvider = tvShowProvider self.tvShowProvider = tvShowProvider
self.preferredArtwork = ArtworkType(rawValue: preferredArtwork) ?? ArtworkType.square self.preferredArtwork = ArtworkType(rawValue: preferredArtwork) ?? ArtworkType.poster
} }
private func load(artworkURL: URL) -> MP42Image? { private func load(artworkURL: URL) -> MP42Image? {