Improve the Swift metadata search controller.
This commit is contained in:
1 parent
099dd4466b
commit
0edbccbf04
8 files changed
+641
-539
No files matched your search
+317
-245
@@ -1,5 +1,5 @@
|
|||||||
<?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="13168.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13168.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13168.3"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13168.3"/>
|
||||||
@@ -35,15 +35,17 @@
|
|||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="252" y="134" width="550" height="468"/>
|
<rect key="contentRect" x="252" y="134" width="550" height="468"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||||
<value key="minSize" type="size" width="550" height="468"/>
|
<value key="minSize" type="size" width="550" height="468"/>
|
||||||
<view key="contentView" id="4">
|
<view key="contentView" id="4">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="550" height="468"/>
|
<rect key="frame" x="0.0" y="0.0" width="550" height="468"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<button verticalHuggingPriority="750" id="9">
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9">
|
||||||
<rect key="frame" x="440" y="12" width="96" height="32"/>
|
<rect key="frame" x="440" y="12" width="96" height="32"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="84" id="Fq2-Xa-w7l"/>
|
||||||
|
</constraints>
|
||||||
<buttonCell key="cell" type="push" title="Add" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="12">
|
<buttonCell key="cell" type="push" title="Add" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="12">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -52,9 +54,8 @@
|
|||||||
<action selector="loadAdditionalMetadata:" target="-2" id="180"/>
|
<action selector="loadAdditionalMetadata:" target="-2" id="180"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<button verticalHuggingPriority="750" id="8">
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8">
|
||||||
<rect key="frame" x="344" y="12" width="96" height="32"/>
|
<rect key="frame" x="344" y="12" width="96" height="32"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
|
||||||
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="13">
|
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="13">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -66,23 +67,283 @@ Gw
|
|||||||
<action selector="closeWindow:" target="-2" id="52"/>
|
<action selector="closeWindow:" target="-2" id="52"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<splitView id="7">
|
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="6">
|
||||||
<rect key="frame" x="20" y="60" width="510" height="286"/>
|
<rect key="frame" x="20" y="20" width="16" height="16"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
</progressIndicator>
|
||||||
|
<tabView translatesAutoresizingMaskIntoConstraints="NO" id="62">
|
||||||
|
<rect key="frame" x="-12" y="353" width="574" height="111"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<tabViewItems>
|
||||||
|
<tabViewItem label="Movie" identifier="1" id="64">
|
||||||
|
<view key="view" id="65">
|
||||||
|
<rect key="frame" x="10" y="33" width="554" height="65"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="145">
|
||||||
|
<rect key="frame" x="18" y="42" width="44" height="17"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Movie:" id="148">
|
||||||
|
<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="151">
|
||||||
|
<rect key="frame" x="67" y="39" width="387" height="22"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="152">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<accessibilityConnection property="title" destination="145" id="e3L-XT-Gah"/>
|
||||||
|
<outlet property="delegate" destination="-2" id="153"/>
|
||||||
|
</connections>
|
||||||
|
</textField>
|
||||||
|
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="199">
|
||||||
|
<rect key="frame" x="65" y="7" width="185" height="26"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="180" id="wEh-H2-SVU"/>
|
||||||
|
</constraints>
|
||||||
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="200">
|
||||||
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="menu"/>
|
||||||
|
<menu key="menu" title="OtherViews" id="201"/>
|
||||||
|
</popUpButtonCell>
|
||||||
|
<accessibility description="Language"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="metadataProviderLanguageSelected:" target="-2" id="227"/>
|
||||||
|
</connections>
|
||||||
|
</popUpButton>
|
||||||
|
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="Dqq-15-Mee">
|
||||||
|
<rect key="frame" x="437" y="9" width="102" height="21"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="99" id="re0-ko-ZyB"/>
|
||||||
|
</constraints>
|
||||||
|
<popUpButtonCell key="cell" type="radio" title="iTunes Store" bezelStyle="regularSquare" imagePosition="left" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" selectedItem="giP-a2-HBU" id="MaT-Se-EGC">
|
||||||
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
<font key="font" metaFont="menu"/>
|
||||||
|
<menu key="menu" title="OtherViews" id="g4k-W3-b6M">
|
||||||
|
<items>
|
||||||
|
<menuItem title="iTunes Store" state="on" id="giP-a2-HBU"/>
|
||||||
|
<menuItem title="TheMovieDB" id="5jG-kG-wLF"/>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</popUpButtonCell>
|
||||||
|
<accessibility description="Metadata Provider"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="metadataProviderSelected:" target="-2" id="Iyv-27-FbT"/>
|
||||||
|
</connections>
|
||||||
|
</popUpButton>
|
||||||
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="67">
|
||||||
|
<rect key="frame" x="460" y="32" width="83" height="32"/>
|
||||||
|
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="68">
|
||||||
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<string key="keyEquivalent" base64-UTF8="YES">
|
||||||
|
DQ
|
||||||
|
</string>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="searchForResults:" target="-2" id="179"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="67" firstAttribute="trailing" secondItem="Dqq-15-Mee" secondAttribute="trailing" id="0Vz-36-7DI"/>
|
||||||
|
<constraint firstItem="Dqq-15-Mee" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="65" secondAttribute="leading" constant="20" symbolic="YES" id="5JC-Lr-el0"/>
|
||||||
|
<constraint firstItem="145" firstAttribute="leading" secondItem="65" secondAttribute="leading" constant="20" symbolic="YES" id="7aT-Nm-VXF"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="199" secondAttribute="bottom" constant="10" id="BTC-ZB-2MS"/>
|
||||||
|
<constraint firstItem="67" firstAttribute="leading" secondItem="151" secondAttribute="trailing" constant="12" id="BaM-Yc-xYZ"/>
|
||||||
|
<constraint firstItem="151" firstAttribute="top" secondItem="65" secondAttribute="top" constant="4" id="FPe-q8-VCh"/>
|
||||||
|
<constraint firstItem="199" firstAttribute="bottom" secondItem="Dqq-15-Mee" secondAttribute="bottom" id="IUE-ve-sBb"/>
|
||||||
|
<constraint firstItem="151" firstAttribute="leading" secondItem="145" secondAttribute="trailing" constant="7" id="Lff-ex-jTB"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="67" secondAttribute="trailing" constant="17" id="RdP-qa-IaQ"/>
|
||||||
|
<constraint firstItem="151" firstAttribute="leading" secondItem="145" secondAttribute="trailing" constant="7" id="T8j-co-xGh"/>
|
||||||
|
<constraint firstItem="151" firstAttribute="baseline" secondItem="67" secondAttribute="baseline" id="Xiz-hM-tUO"/>
|
||||||
|
<constraint firstItem="145" firstAttribute="baseline" secondItem="151" secondAttribute="baseline" id="ZIj-T3-ei9"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="199" secondAttribute="trailing" constant="20" symbolic="YES" id="eZU-z3-z07"/>
|
||||||
|
<constraint firstItem="151" firstAttribute="leading" secondItem="199" secondAttribute="leading" id="el3-bl-dT5"/>
|
||||||
|
<constraint firstItem="199" firstAttribute="top" secondItem="151" secondAttribute="bottom" constant="8" id="loe-JW-dpU"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
</tabViewItem>
|
||||||
|
<tabViewItem label="TV Episode" identifier="2" id="63">
|
||||||
|
<view key="view" id="66">
|
||||||
|
<rect key="frame" x="10" y="33" width="554" height="65"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="89">
|
||||||
|
<rect key="frame" x="14" y="43" width="62" height="17"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="TV Show:" id="90">
|
||||||
|
<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="98">
|
||||||
|
<rect key="frame" x="14" y="13" width="62" height="17"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Season #" id="99">
|
||||||
|
<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="96">
|
||||||
|
<rect key="frame" x="81" y="10" width="30" height="22"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="30" id="2Ka-JG-y8x"/>
|
||||||
|
</constraints>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="97">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<accessibilityConnection property="title" destination="98" id="Fdt-YI-c0h"/>
|
||||||
|
<outlet property="delegate" destination="-2" id="115"/>
|
||||||
|
</connections>
|
||||||
|
</textField>
|
||||||
|
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="100">
|
||||||
|
<rect key="frame" x="185" y="10" width="30" height="22"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="30" id="fgL-ZB-PKc"/>
|
||||||
|
</constraints>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="101">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<accessibilityConnection property="title" destination="102" id="nNR-Gv-Ajs"/>
|
||||||
|
<outlet property="delegate" destination="-2" id="116"/>
|
||||||
|
</connections>
|
||||||
|
</textField>
|
||||||
|
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="102">
|
||||||
|
<rect key="frame" x="116" y="13" width="64" height="17"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Episode #" id="103">
|
||||||
|
<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="135">
|
||||||
|
<rect key="frame" x="81" y="38" width="376" height="26"/>
|
||||||
|
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="136">
|
||||||
|
<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="89" id="cGV-Ur-Qnq"/>
|
||||||
|
<outlet property="dataSource" destination="-2" id="143"/>
|
||||||
|
<outlet property="delegate" destination="-2" id="137"/>
|
||||||
|
</connections>
|
||||||
|
</comboBox>
|
||||||
|
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="192">
|
||||||
|
<rect key="frame" x="223" y="7" width="158" height="26"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="153" id="oMT-wK-UiL"/>
|
||||||
|
</constraints>
|
||||||
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="193">
|
||||||
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="menu"/>
|
||||||
|
<menu key="menu" title="OtherViews" id="194"/>
|
||||||
|
</popUpButtonCell>
|
||||||
|
<accessibility description="Language"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="metadataProviderLanguageSelected:" target="-2" id="226"/>
|
||||||
|
</connections>
|
||||||
|
</popUpButton>
|
||||||
|
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="217">
|
||||||
|
<rect key="frame" x="437" y="9" width="102" height="21"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="99" id="6Db-v9-yHY"/>
|
||||||
|
</constraints>
|
||||||
|
<popUpButtonCell key="cell" type="radio" title="iTunes Store" bezelStyle="regularSquare" imagePosition="left" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" selectedItem="220" id="218">
|
||||||
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
<font key="font" metaFont="menu"/>
|
||||||
|
<menu key="menu" title="OtherViews" id="219">
|
||||||
|
<items>
|
||||||
|
<menuItem title="iTunes Store" state="on" id="220"/>
|
||||||
|
<menuItem title="TheMovieDB" id="221"/>
|
||||||
|
<menuItem title="TheTVDB" id="QfG-gH-Nrj"/>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</popUpButtonCell>
|
||||||
|
<accessibility description="Metadata provider"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="metadataProviderSelected:" target="-2" id="224"/>
|
||||||
|
</connections>
|
||||||
|
</popUpButton>
|
||||||
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S7c-Ws-WWl">
|
||||||
|
<rect key="frame" x="460" y="32" width="83" height="32"/>
|
||||||
|
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="X7l-No-znX">
|
||||||
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<string key="keyEquivalent" base64-UTF8="YES">
|
||||||
|
DQ
|
||||||
|
</string>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="searchForResults:" target="-2" id="bxF-Qe-9ES"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="96" secondAttribute="bottom" constant="10" id="0dk-ur-JSX"/>
|
||||||
|
<constraint firstItem="98" firstAttribute="width" secondItem="89" secondAttribute="width" id="4mf-8G-ENz"/>
|
||||||
|
<constraint firstItem="98" firstAttribute="leading" secondItem="89" secondAttribute="leading" id="54Y-kd-o2c"/>
|
||||||
|
<constraint firstItem="192" firstAttribute="bottom" secondItem="217" secondAttribute="bottom" id="8HM-Dr-8DG"/>
|
||||||
|
<constraint firstItem="135" firstAttribute="top" secondItem="66" secondAttribute="top" constant="3" id="8wl-dD-M1X"/>
|
||||||
|
<constraint firstItem="98" firstAttribute="baseline" secondItem="96" secondAttribute="baseline" id="9He-al-Qin"/>
|
||||||
|
<constraint firstItem="217" firstAttribute="leading" secondItem="192" secondAttribute="trailing" constant="60" id="CAo-RG-bUH"/>
|
||||||
|
<constraint firstItem="89" firstAttribute="leading" secondItem="66" secondAttribute="leading" constant="16" id="CNg-9k-r5n"/>
|
||||||
|
<constraint firstItem="S7c-Ws-WWl" firstAttribute="leading" secondItem="135" secondAttribute="trailing" constant="12" id="FB7-qm-RVx"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="98" secondAttribute="trailing" constant="20" symbolic="YES" id="FkR-gv-f6F"/>
|
||||||
|
<constraint firstItem="192" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="100" secondAttribute="trailing" priority="750" constant="8" symbolic="YES" id="JXz-yb-FwA"/>
|
||||||
|
<constraint firstItem="S7c-Ws-WWl" firstAttribute="baseline" secondItem="135" secondAttribute="baseline" id="MZk-01-sWL"/>
|
||||||
|
<constraint firstItem="96" firstAttribute="top" secondItem="135" secondAttribute="bottom" constant="10" id="QD4-Bx-NvL"/>
|
||||||
|
<constraint firstItem="100" firstAttribute="leading" secondItem="102" secondAttribute="trailing" constant="7" id="T9s-cQ-XuR"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="S7c-Ws-WWl" secondAttribute="trailing" constant="17" id="TfP-gC-KMb"/>
|
||||||
|
<constraint firstItem="135" firstAttribute="leading" secondItem="96" secondAttribute="leading" id="YJk-dX-13v"/>
|
||||||
|
<constraint firstItem="89" firstAttribute="top" secondItem="S7c-Ws-WWl" secondAttribute="top" id="c0u-34-0dS"/>
|
||||||
|
<constraint firstItem="S7c-Ws-WWl" firstAttribute="trailing" secondItem="217" secondAttribute="trailing" id="c92-On-LE8"/>
|
||||||
|
<constraint firstItem="102" firstAttribute="leading" secondItem="96" secondAttribute="trailing" constant="7" id="jge-I2-jin"/>
|
||||||
|
<constraint firstItem="135" firstAttribute="leading" secondItem="89" secondAttribute="trailing" constant="7" id="szo-KC-kTe"/>
|
||||||
|
<constraint firstItem="96" firstAttribute="baseline" secondItem="102" secondAttribute="baseline" id="uWn-OZ-U9S"/>
|
||||||
|
<constraint firstItem="102" firstAttribute="baseline" secondItem="100" secondAttribute="baseline" id="woQ-nC-ErE"/>
|
||||||
|
<constraint firstItem="100" firstAttribute="bottom" secondItem="192" secondAttribute="bottom" id="xWx-mc-PJs"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
</tabViewItem>
|
||||||
|
</tabViewItems>
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="-2" id="119"/>
|
||||||
|
</connections>
|
||||||
|
</tabView>
|
||||||
|
<textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="176">
|
||||||
|
<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="177">
|
||||||
|
<font key="font" metaFont="smallSystem"/>
|
||||||
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
</textField>
|
||||||
|
<splitView translatesAutoresizingMaskIntoConstraints="NO" id="7">
|
||||||
|
<rect key="frame" x="20" y="60" width="510" height="295"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<customView id="14">
|
<customView id="14">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="510" height="95"/>
|
<rect key="frame" x="0.0" y="0.0" width="510" height="132"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="25">
|
<scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="25">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="510" height="95"/>
|
<rect key="frame" x="0.0" y="0.0" width="510" height="132"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<clipView key="contentView" id="B4s-TK-Lf9">
|
<clipView key="contentView" id="B4s-TK-Lf9">
|
||||||
<rect key="frame" x="1" y="0.0" width="508" height="94"/>
|
<rect key="frame" x="1" y="0.0" width="508" height="131"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="14" headerView="29" id="28">
|
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="14" headerView="29" id="28">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="508" height="77"/>
|
<rect key="frame" x="0.0" y="0.0" width="508" height="108"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<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"/>
|
||||||
@@ -115,29 +376,34 @@ Gw
|
|||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="26">
|
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="26">
|
||||||
<rect key="frame" x="224" y="17" width="15" height="102"/>
|
<rect key="frame" x="493" y="23" width="16" height="0.0"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<tableHeaderView key="headerView" id="29">
|
<tableHeaderView key="headerView" id="29">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="508" height="17"/>
|
<rect key="frame" x="0.0" y="0.0" width="508" height="23"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</tableHeaderView>
|
</tableHeaderView>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="25" firstAttribute="leading" secondItem="14" secondAttribute="leading" id="0wl-VG-eXw"/>
|
||||||
|
<constraint firstItem="25" firstAttribute="top" secondItem="14" secondAttribute="top" id="985-S2-deN"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="25" secondAttribute="bottom" id="c2c-pn-1uB"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="25" secondAttribute="trailing" id="hzq-p0-QYw"/>
|
||||||
|
</constraints>
|
||||||
</customView>
|
</customView>
|
||||||
<customView id="15">
|
<customView id="15">
|
||||||
<rect key="frame" x="0.0" y="104" width="510" height="182"/>
|
<rect key="frame" x="0.0" y="141" width="510" height="154"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="16">
|
<scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="16">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="510" height="182"/>
|
<rect key="frame" x="0.0" y="0.0" width="510" height="154"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<clipView key="contentView" id="BjK-es-FMi">
|
<clipView key="contentView" id="BjK-es-FMi">
|
||||||
<rect key="frame" x="1" y="0.0" width="508" height="181"/>
|
<rect key="frame" x="1" y="0.0" width="508" height="153"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" headerView="20" id="19" customClass="SBTableView">
|
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" headerView="20" id="19" customClass="SBTableView">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="508" height="164"/>
|
<rect key="frame" x="0.0" y="0.0" width="508" height="130"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<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"/>
|
||||||
@@ -183,15 +449,21 @@ Gw
|
|||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="17">
|
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="17">
|
||||||
<rect key="frame" x="224" y="17" width="15" height="102"/>
|
<rect key="frame" x="493" y="23" width="16" height="2"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<tableHeaderView key="headerView" id="20">
|
<tableHeaderView key="headerView" id="20">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="508" height="17"/>
|
<rect key="frame" x="0.0" y="0.0" width="508" height="23"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</tableHeaderView>
|
</tableHeaderView>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="16" firstAttribute="leading" secondItem="15" secondAttribute="leading" id="8Jp-Hr-aQ6"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="16" secondAttribute="bottom" id="P0S-ia-V8r"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="16" secondAttribute="trailing" id="deN-12-edD"/>
|
||||||
|
<constraint firstItem="16" firstAttribute="top" secondItem="15" secondAttribute="top" id="oXi-If-y51"/>
|
||||||
|
</constraints>
|
||||||
</customView>
|
</customView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<holdingPriorities>
|
<holdingPriorities>
|
||||||
@@ -199,228 +471,28 @@ Gw
|
|||||||
<real value="250"/>
|
<real value="250"/>
|
||||||
</holdingPriorities>
|
</holdingPriorities>
|
||||||
</splitView>
|
</splitView>
|
||||||
<progressIndicator hidden="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" id="6">
|
|
||||||
<rect key="frame" x="20" y="20" width="16" height="16"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
||||||
</progressIndicator>
|
|
||||||
<tabView id="62">
|
|
||||||
<rect key="frame" x="13" y="344" width="524" height="110"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<tabViewItems>
|
|
||||||
<tabViewItem label="Movie" identifier="1" id="64">
|
|
||||||
<view key="view" id="65">
|
|
||||||
<rect key="frame" x="10" y="33" width="504" height="64"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="145">
|
|
||||||
<rect key="frame" x="14" y="41" width="63" height="17"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Movie:" id="148">
|
|
||||||
<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" id="151">
|
|
||||||
<rect key="frame" x="82" y="38" width="323" height="22"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="152">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
<connections>
|
|
||||||
<accessibilityConnection property="title" destination="145" id="e3L-XT-Gah"/>
|
|
||||||
<outlet property="delegate" destination="-2" id="153"/>
|
|
||||||
</connections>
|
|
||||||
</textField>
|
|
||||||
<popUpButton verticalHuggingPriority="750" id="199">
|
|
||||||
<rect key="frame" x="80" y="6" width="185" height="26"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="200">
|
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="menu"/>
|
|
||||||
<menu key="menu" title="OtherViews" id="201"/>
|
|
||||||
</popUpButtonCell>
|
|
||||||
<accessibility description="Language"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="metadataProviderLanguageSelected:" target="-2" id="227"/>
|
|
||||||
</connections>
|
|
||||||
</popUpButton>
|
|
||||||
<popUpButton id="Dqq-15-Mee">
|
|
||||||
<rect key="frame" x="387" y="8" width="102" height="21"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
|
||||||
<popUpButtonCell key="cell" type="radio" title="iTunes Store" bezelStyle="regularSquare" imagePosition="left" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" selectedItem="giP-a2-HBU" id="MaT-Se-EGC">
|
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
|
||||||
<font key="font" metaFont="menu"/>
|
|
||||||
<menu key="menu" title="OtherViews" id="g4k-W3-b6M">
|
|
||||||
<items>
|
|
||||||
<menuItem title="iTunes Store" state="on" id="giP-a2-HBU"/>
|
|
||||||
<menuItem title="TheMovieDB" id="5jG-kG-wLF"/>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</popUpButtonCell>
|
|
||||||
<accessibility description="Metadata Provider"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="metadataProviderSelected:" target="-2" id="Iyv-27-FbT"/>
|
|
||||||
</connections>
|
|
||||||
</popUpButton>
|
|
||||||
<button verticalHuggingPriority="750" misplaced="YES" id="67">
|
|
||||||
<rect key="frame" x="411" y="31" width="82" height="32"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
|
||||||
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="68">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<string key="keyEquivalent" base64-UTF8="YES">
|
|
||||||
DQ
|
|
||||||
</string>
|
|
||||||
</buttonCell>
|
|
||||||
<connections>
|
|
||||||
<action selector="searchForResults:" target="-2" id="179"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
|
||||||
</view>
|
|
||||||
</tabViewItem>
|
|
||||||
<tabViewItem label="TV Episode" identifier="2" id="63">
|
|
||||||
<view key="view" id="66">
|
|
||||||
<rect key="frame" x="10" y="33" width="504" height="64"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="89">
|
|
||||||
<rect key="frame" x="14" y="42" width="63" height="17"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="TV Show:" id="90">
|
|
||||||
<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" misplaced="YES" allowsCharacterPickerTouchBarItem="YES" id="98">
|
|
||||||
<rect key="frame" x="2" y="12" width="75" height="17"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Season #" id="99">
|
|
||||||
<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" id="96">
|
|
||||||
<rect key="frame" x="82" y="9" width="30" height="22"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="97">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
<connections>
|
|
||||||
<accessibilityConnection property="title" destination="98" id="Fdt-YI-c0h"/>
|
|
||||||
<outlet property="delegate" destination="-2" id="115"/>
|
|
||||||
</connections>
|
|
||||||
</textField>
|
|
||||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="100">
|
|
||||||
<rect key="frame" x="188" y="9" width="30" height="22"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="101">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
<connections>
|
|
||||||
<accessibilityConnection property="title" destination="102" id="nNR-Gv-Ajs"/>
|
|
||||||
<outlet property="delegate" destination="-2" id="116"/>
|
|
||||||
</connections>
|
|
||||||
</textField>
|
|
||||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="102">
|
|
||||||
<rect key="frame" x="117" y="12" width="66" height="17"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Episode #" id="103">
|
|
||||||
<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" id="135">
|
|
||||||
<rect key="frame" x="82" y="37" width="326" height="26"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
|
||||||
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="136">
|
|
||||||
<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="89" id="cGV-Ur-Qnq"/>
|
|
||||||
<outlet property="dataSource" destination="-2" id="143"/>
|
|
||||||
<outlet property="delegate" destination="-2" id="137"/>
|
|
||||||
</connections>
|
|
||||||
</comboBox>
|
|
||||||
<popUpButton verticalHuggingPriority="750" id="192">
|
|
||||||
<rect key="frame" x="224" y="6" width="157" height="26"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="193">
|
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="menu"/>
|
|
||||||
<menu key="menu" title="OtherViews" id="194"/>
|
|
||||||
</popUpButtonCell>
|
|
||||||
<accessibility description="Language"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="metadataProviderLanguageSelected:" target="-2" id="226"/>
|
|
||||||
</connections>
|
|
||||||
</popUpButton>
|
|
||||||
<popUpButton id="217">
|
|
||||||
<rect key="frame" x="387" y="8" width="102" height="21"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
|
||||||
<popUpButtonCell key="cell" type="radio" title="iTunes Store" bezelStyle="regularSquare" imagePosition="left" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" selectedItem="220" id="218">
|
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
|
||||||
<font key="font" metaFont="menu"/>
|
|
||||||
<menu key="menu" title="OtherViews" id="219">
|
|
||||||
<items>
|
|
||||||
<menuItem title="iTunes Store" state="on" id="220"/>
|
|
||||||
<menuItem title="TheMovieDB" id="221"/>
|
|
||||||
<menuItem title="TheTVDB" id="QfG-gH-Nrj"/>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</popUpButtonCell>
|
|
||||||
<accessibility description="Metadata provider"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="metadataProviderSelected:" target="-2" id="224"/>
|
|
||||||
</connections>
|
|
||||||
</popUpButton>
|
|
||||||
<button verticalHuggingPriority="750" misplaced="YES" id="S7c-Ws-WWl">
|
|
||||||
<rect key="frame" x="411" y="31" width="82" height="32"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
|
||||||
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="X7l-No-znX">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<string key="keyEquivalent" base64-UTF8="YES">
|
|
||||||
DQ
|
|
||||||
</string>
|
|
||||||
</buttonCell>
|
|
||||||
<connections>
|
|
||||||
<action selector="searchForResults:" target="-2" id="bxF-Qe-9ES"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
|
||||||
</view>
|
|
||||||
</tabViewItem>
|
|
||||||
</tabViewItems>
|
|
||||||
<connections>
|
|
||||||
<outlet property="delegate" destination="-2" id="119"/>
|
|
||||||
</connections>
|
|
||||||
</tabView>
|
|
||||||
<textField hidden="YES" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="176">
|
|
||||||
<rect key="frame" x="41" y="21" width="297" height="14"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
||||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Progress status" id="177">
|
|
||||||
<font key="font" metaFont="smallSystem"/>
|
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
</textField>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="176" firstAttribute="centerY" secondItem="6" secondAttribute="centerY" id="30j-SU-zh8"/>
|
||||||
|
<constraint firstItem="6" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" id="3c7-wO-Uyd"/>
|
||||||
|
<constraint firstItem="62" firstAttribute="top" secondItem="4" secondAttribute="top" constant="10" id="7Wx-HT-o1m"/>
|
||||||
|
<constraint firstItem="9" firstAttribute="leading" secondItem="8" secondAttribute="trailing" constant="12" id="81V-UZ-yFR"/>
|
||||||
|
<constraint firstItem="8" firstAttribute="leading" secondItem="176" secondAttribute="trailing" constant="14" id="Dio-lj-BM1"/>
|
||||||
|
<constraint firstItem="62" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="-5" id="H38-RO-czM"/>
|
||||||
|
<constraint firstItem="8" firstAttribute="baseline" secondItem="9" secondAttribute="baseline" id="J2Y-7O-mGQ"/>
|
||||||
|
<constraint firstItem="7" firstAttribute="trailing" secondItem="9" secondAttribute="trailing" id="PMM-e0-xnd"/>
|
||||||
|
<constraint firstItem="8" firstAttribute="width" secondItem="9" secondAttribute="width" id="Rj0-UN-iX3"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="6" secondAttribute="bottom" constant="20" id="aB0-hb-9E9"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="9" secondAttribute="bottom" constant="19" id="bGN-Kg-YDG"/>
|
||||||
|
<constraint firstItem="176" firstAttribute="leading" secondItem="6" secondAttribute="trailing" constant="7" id="ddY-qE-DDZ"/>
|
||||||
|
<constraint firstItem="9" firstAttribute="top" secondItem="7" secondAttribute="bottom" constant="20" id="fOx-m1-oHm"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="62" secondAttribute="trailing" constant="-5" id="gV2-Dj-Iqz"/>
|
||||||
|
<constraint firstItem="7" firstAttribute="top" secondItem="62" secondAttribute="bottom" constant="8" id="giP-5d-Ebl"/>
|
||||||
|
<constraint firstItem="7" firstAttribute="leading" secondItem="6" secondAttribute="leading" id="h22-wM-Bav"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="9" secondAttribute="trailing" constant="20" id="jpw-UV-N7K"/>
|
||||||
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<point key="canvasLocation" x="98" y="163"/>
|
<point key="canvasLocation" x="55" y="236"/>
|
||||||
</window>
|
</window>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||
@@ -0,0 +1,205 @@
|
|||||||
|
//
|
||||||
|
// ArtworkSelector.swift
|
||||||
|
// Subler
|
||||||
|
//
|
||||||
|
// Created by Damiano Galassi on 04/08/2017.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Cocoa
|
||||||
|
import Quartz
|
||||||
|
|
||||||
|
private protocol ArtworkImageObjectDelegate: AnyObject {
|
||||||
|
func reloadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ArtworkImageObject : NSObject {
|
||||||
|
|
||||||
|
private var data: Data?
|
||||||
|
private var version: Int
|
||||||
|
private var cancelled: Bool
|
||||||
|
fileprivate let artwork: RemoteImage
|
||||||
|
private let queue: DispatchQueue
|
||||||
|
private weak var delegate: ArtworkImageObjectDelegate?
|
||||||
|
|
||||||
|
init(artwork: RemoteImage, delegate: ArtworkImageObjectDelegate) {
|
||||||
|
self.artwork = artwork
|
||||||
|
self.delegate = delegate
|
||||||
|
self.version = 0
|
||||||
|
self.cancelled = false
|
||||||
|
self.queue = DispatchQueue(label: "artworkQueue")
|
||||||
|
}
|
||||||
|
|
||||||
|
func cancel() {
|
||||||
|
queue.sync {
|
||||||
|
cancelled = true
|
||||||
|
delegate = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc override func imageRepresentation() -> Any! {
|
||||||
|
// Get the data outside the main thread
|
||||||
|
var startDownload: Bool = false
|
||||||
|
queue.sync {
|
||||||
|
if self.version == 0 {
|
||||||
|
self.version = 1
|
||||||
|
startDownload = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if startDownload {
|
||||||
|
DispatchQueue.global(priority: .default).async {
|
||||||
|
let localData = URLSession.data(from: self.artwork.url)
|
||||||
|
var localCancelled = false
|
||||||
|
|
||||||
|
self.queue.sync {
|
||||||
|
self.data = localData
|
||||||
|
self.version = 2
|
||||||
|
localCancelled = self.cancelled
|
||||||
|
}
|
||||||
|
|
||||||
|
// We got the data, tell the controller to update the view
|
||||||
|
if localCancelled == false {
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.delegate?.reloadData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var localData: NSData? = nil
|
||||||
|
|
||||||
|
queue.sync {
|
||||||
|
if let returnData = data {
|
||||||
|
localData = NSData(data: returnData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return localData
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc override func imageRepresentationType() -> String {
|
||||||
|
return IKImageBrowserNSDataRepresentationType
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc override func imageUID() -> String {
|
||||||
|
return artwork.thumbURL.absoluteString
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc override func imageVersion()-> Int {
|
||||||
|
var returnValue: Int = 0
|
||||||
|
queue.sync {
|
||||||
|
returnValue = self.version
|
||||||
|
}
|
||||||
|
return returnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc override func imageTitle() -> String {
|
||||||
|
return artwork.providerName.components(separatedBy: "|").first ?? ""
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc override func imageSubtitle() -> String {
|
||||||
|
let components = artwork.providerName.components(separatedBy: "|")
|
||||||
|
return components.count > 1 ? components[1] : ""
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public protocol ArtworkSelectorControllerDelegate: AnyObject {
|
||||||
|
func didSelect(artworks: [RemoteImage])
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ArtworkSelectorController: NSWindowController, ArtworkImageObjectDelegate {
|
||||||
|
|
||||||
|
@IBOutlet var imageBrowser: IKImageBrowserView!
|
||||||
|
@IBOutlet var slider: NSSlider!
|
||||||
|
@IBOutlet var addArtworkButton: NSButton!
|
||||||
|
@IBOutlet var loadMoreArtworkButton: NSButton!
|
||||||
|
|
||||||
|
private var artworksUnloaded: [RemoteImage]
|
||||||
|
private var artworks: [ArtworkImageObject]
|
||||||
|
|
||||||
|
private weak var delegate: ArtworkSelectorControllerDelegate?
|
||||||
|
|
||||||
|
// MARK: - Init
|
||||||
|
init(artworks: [RemoteImage], delegate: ArtworkSelectorControllerDelegate) {
|
||||||
|
self.delegate = delegate
|
||||||
|
self.artworksUnloaded = artworks
|
||||||
|
self.artworks = Array()
|
||||||
|
super.init(window: nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
deinit {
|
||||||
|
imageBrowser.delegate = nil
|
||||||
|
imageBrowser.dataSource = nil
|
||||||
|
|
||||||
|
for artwork in artworks {
|
||||||
|
artwork.cancel()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override public var windowNibName: NSNib.Name? {
|
||||||
|
return NSNib.Name(rawValue: "ArtworkSelector")
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Load images
|
||||||
|
override public func windowDidLoad() {
|
||||||
|
super.windowDidLoad()
|
||||||
|
loadMoreArtwork(self)
|
||||||
|
imageBrowser.setSelectionIndexes(IndexSet(integer: 0), byExtendingSelection: false)
|
||||||
|
}
|
||||||
|
|
||||||
|
@IBAction func loadMoreArtwork(_ sender: Any) {
|
||||||
|
let endIndex = artworksUnloaded.count < 10 ? artworksUnloaded.count : 10
|
||||||
|
artworks.append(contentsOf: artworksUnloaded[0 ..< endIndex].map { ArtworkImageObject(artwork: $0, delegate: self) })
|
||||||
|
artworksUnloaded.removeFirst(endIndex)
|
||||||
|
loadMoreArtworkButton.isEnabled = artworksUnloaded.count > 0
|
||||||
|
imageBrowser.reloadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - User Interface
|
||||||
|
@IBAction func zoomSliderDidChange(_ sender: Any) {
|
||||||
|
imageBrowser.setZoomValue(slider.floatValue)
|
||||||
|
imageBrowser.needsDisplay = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func reloadData() {
|
||||||
|
imageBrowser.reloadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Finishing Up
|
||||||
|
@IBAction func addArtwork(_ sender: Any) {
|
||||||
|
if let indexes = imageBrowser.selectionIndexes() {
|
||||||
|
let selectedArtworks = indexes.map { artworks[$0].artwork }
|
||||||
|
delegate?.didSelect(artworks: selectedArtworks)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delegate?.didSelect(artworks: [])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@IBAction func addNoArtwork(_ sender: Any) {
|
||||||
|
delegate?.didSelect(artworks: [])
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - IKImageBrowserDataSource
|
||||||
|
override public func numberOfItems(inImageBrowser aBrowser: IKImageBrowserView!) -> Int {
|
||||||
|
return artworks.count
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func imageBrowser(_ aBrowser: IKImageBrowserView!, itemAt index: Int) -> Any! {
|
||||||
|
return artworks[index]
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - IKImageBrowserDelegate
|
||||||
|
override public func imageBrowser(_ aBrowser: IKImageBrowserView!, cellWasDoubleClickedAt index: Int) {
|
||||||
|
addArtwork(self)
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func imageBrowserSelectionDidChange(_ aBrowser: IKImageBrowserView!) {
|
||||||
|
addArtworkButton.isEnabled = aBrowser.selectionIndexes().count > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,12 +8,14 @@
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
@objc(SBMetadataSearchControllerDelegate) protocol MetadataSearchControllerDelegate {
|
@objc(SBMetadataSearchControllerDelegate) protocol MetadataSearchControllerDelegate {
|
||||||
func metadataImportDone(metadataToBeImported: SBMetadataResult)
|
func didSelect(metadata: SBMetadataResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc(SBMetadataSearchController) class MetadataSearchController: NSWindowController, NSTableViewDataSource, NSTableViewDelegate, NSComboBoxDelegate, NSComboBoxDataSource, NSTextFieldDelegate, SBArtworkSelectorDelegate {
|
@objc(SBMetadataSearchController) class MetadataSearchController: NSWindowController, NSTableViewDataSource, NSTableViewDelegate, NSComboBoxDelegate, NSComboBoxDataSource, NSTextFieldDelegate, ArtworkSelectorControllerDelegate {
|
||||||
|
|
||||||
@IBOutlet var searchMode: NSTabView!
|
@IBOutlet var searchMode: NSTabView!
|
||||||
|
@IBOutlet var movieTab: NSTabViewItem!
|
||||||
|
@IBOutlet var tvEpisodeTab: NSTabViewItem!
|
||||||
|
|
||||||
// MARK: - Movie
|
// MARK: - Movie
|
||||||
@IBOutlet var movieName: NSTextField!
|
@IBOutlet var movieName: NSTextField!
|
||||||
@@ -38,6 +40,11 @@ import Cocoa
|
|||||||
@IBOutlet var progress: NSProgressIndicator!
|
@IBOutlet var progress: NSProgressIndicator!
|
||||||
@IBOutlet var progressText: NSTextField!
|
@IBOutlet var progressText: NSTextField!
|
||||||
|
|
||||||
|
// MARK: - ComboBox
|
||||||
|
|
||||||
|
private var tvSeriesNameSearchArray: [String]
|
||||||
|
private var nameSearchTask: MetadataSearchTask?
|
||||||
|
|
||||||
// MARK: UI State
|
// MARK: UI State
|
||||||
private enum MetadataSearchState {
|
private enum MetadataSearchState {
|
||||||
case none
|
case none
|
||||||
@@ -53,8 +60,8 @@ import Cocoa
|
|||||||
private var tvShowService: MetadataService
|
private var tvShowService: MetadataService
|
||||||
|
|
||||||
// MARK: Other
|
// MARK: Other
|
||||||
private var artworkSelector: SBArtworkSelector?
|
private var artworkSelector: ArtworkSelectorController?
|
||||||
private let delegate: MetadataSearchControllerDelegate
|
private weak var delegate: MetadataSearchControllerDelegate?
|
||||||
private let searchTerm: String
|
private let searchTerm: String
|
||||||
|
|
||||||
// MARK: - Static methods
|
// MARK: - Static methods
|
||||||
@@ -62,17 +69,30 @@ import Cocoa
|
|||||||
UserDefaults.standard.removeObject(forKey: "Previously used TV series")
|
UserDefaults.standard.removeObject(forKey: "Previously used TV series")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static func recentSearches() -> [String] {
|
||||||
|
if let previousTVSeries = UserDefaults.standard.array(forKey: "Previously used TV series") as? [String] {
|
||||||
|
return previousTVSeries
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func saveRecentSearches(_ searches: [String]) {
|
||||||
|
UserDefaults.standard.set(searches, forKey: "Previously used TV series")
|
||||||
|
}
|
||||||
|
|
||||||
@objc public static func deleteCachedMetadata() {
|
@objc public static func deleteCachedMetadata() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Init
|
// MARK: - Init
|
||||||
@objc init(delegate: MetadataSearchControllerDelegate, searchString: String) {
|
@objc init(delegate: MetadataSearchControllerDelegate, searchString: String) {
|
||||||
|
|
||||||
self.searchTerm = searchString
|
self.searchTerm = searchString
|
||||||
self.delegate = delegate
|
self.delegate = delegate
|
||||||
self.state = .none
|
self.state = .none
|
||||||
self.movieService = MetadataServiceType.defaultMovieProvider
|
self.movieService = MetadataServiceType.defaultMovieProvider
|
||||||
self.tvShowService = MetadataServiceType.defaultTVProvider
|
self.tvShowService = MetadataServiceType.defaultTVProvider
|
||||||
|
self.tvSeriesNameSearchArray = Array()
|
||||||
|
|
||||||
super.init(window: nil)
|
super.init(window: nil)
|
||||||
}
|
}
|
||||||
@@ -103,7 +123,6 @@ import Cocoa
|
|||||||
|
|
||||||
if let info = searchTerm.parsedAsFilename() {
|
if let info = searchTerm.parsedAsFilename() {
|
||||||
switch info {
|
switch info {
|
||||||
|
|
||||||
case let .movie(title):
|
case let .movie(title):
|
||||||
searchMode.selectTabViewItem(at: 0)
|
searchMode.selectTabViewItem(at: 0)
|
||||||
movieName.stringValue = title
|
movieName.stringValue = title
|
||||||
@@ -111,8 +130,8 @@ import Cocoa
|
|||||||
case let .tvShow(seriesName, season, episode):
|
case let .tvShow(seriesName, season, episode):
|
||||||
searchMode.selectTabViewItem(at: 1)
|
searchMode.selectTabViewItem(at: 1)
|
||||||
tvSeriesName.stringValue = seriesName
|
tvSeriesName.stringValue = seriesName
|
||||||
tvSeasonNum.stringValue = season != nil ? String(describing: season) : ""
|
if let season = season { tvSeasonNum.stringValue = "\(season)" }
|
||||||
tvEpisodeNum.stringValue = episode != nil ? String(describing: episode) : ""
|
if let episode = episode { tvEpisodeNum.stringValue = "\(episode)" }
|
||||||
searchForResults(searchTvButton)
|
searchForResults(searchTvButton)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,7 +142,7 @@ import Cocoa
|
|||||||
|
|
||||||
// MARK: - Search UI
|
// MARK: - Search UI
|
||||||
|
|
||||||
func updateLanguagesMenu(service: MetadataService, popUpButton: NSPopUpButton) {
|
private func updateLanguagesMenu(service: MetadataService, popUpButton: NSPopUpButton) {
|
||||||
popUpButton.removeAllItems()
|
popUpButton.removeAllItems()
|
||||||
popUpButton.addItems(withTitles: service.languages.map { service.languageType.displayName(language: $0) })
|
popUpButton.addItems(withTitles: service.languages.map { service.languageType.displayName(language: $0) })
|
||||||
|
|
||||||
@@ -166,30 +185,48 @@ import Cocoa
|
|||||||
func comboBox(_ comboBox: NSComboBox, completedString string: String) -> String? {
|
func comboBox(_ comboBox: NSComboBox, completedString string: String) -> String? {
|
||||||
if string.count < 1 { return nil }
|
if string.count < 1 { return nil }
|
||||||
|
|
||||||
if comboBox == tvSeriesName, let previousTVSeries = UserDefaults.standard.array(forKey: "Previously used TV series") as? [String] {
|
for previousString in MetadataSearchController.recentSearches() {
|
||||||
for previousString in previousTVSeries {
|
if previousString.lowercased().hasPrefix(string.lowercased()) {
|
||||||
if previousString.localizedCaseInsensitiveCompare(string) == ComparisonResult.orderedSame {
|
return previousString
|
||||||
return previousString
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func comboBoxWillPopUp(_ notification: Notification) {
|
func comboBoxWillPopUp(_ notification: Notification) {
|
||||||
|
if tvSeriesName.stringValue.count == 0 {
|
||||||
|
tvSeriesNameSearchArray = MetadataSearchController.recentSearches().sorted()
|
||||||
|
}
|
||||||
|
else if tvSeriesName.stringValue.count > 3 {
|
||||||
|
if let task = nameSearchTask { task.cancel() }
|
||||||
|
|
||||||
|
tvSeriesNameSearchArray = [NSLocalizedString("Searching…", comment: "")]
|
||||||
|
|
||||||
|
nameSearchTask = MetadataNameSearch.tvNameSearch(service: TheTVDB(), tvSeries: tvSeriesName.stringValue, language: "en")
|
||||||
|
.search(completionHandler: { (results) in
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.tvSeriesNameSearchArray = results.sorted()
|
||||||
|
self.tvSeriesName.reloadData()
|
||||||
|
self.nameSearchTask = nil
|
||||||
|
}
|
||||||
|
}).runAsync()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tvSeriesNameSearchArray.removeAll()
|
||||||
|
}
|
||||||
|
tvSeriesName.reloadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
func comboBoxSelectionDidChange(_ notification: Notification) {
|
func comboBoxSelectionDidChange(_ notification: Notification) {
|
||||||
|
//TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
func numberOfItems(in comboBox: NSComboBox) -> Int {
|
func numberOfItems(in comboBox: NSComboBox) -> Int {
|
||||||
return 0
|
return tvSeriesNameSearchArray.count
|
||||||
}
|
}
|
||||||
|
|
||||||
func comboBox(_ comboBox: NSComboBox, objectValueForItemAt index: Int) -> Any? {
|
func comboBox(_ comboBox: NSComboBox, objectValueForItemAt index: Int) -> Any? {
|
||||||
return nil
|
return tvSeriesNameSearchArray[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Search
|
// MARK: - Search
|
||||||
@@ -269,31 +306,49 @@ import Cocoa
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func selectArtwork(artworks: [SBRemoteImage]) {
|
private func selectArtwork(artworks: [SBRemoteImage]) {
|
||||||
let artworkSelectorController = SBArtworkSelector(delegate: self, imageURLs: artworks)
|
let artworkSelectorController = ArtworkSelectorController(artworks: artworks.toStruct(), delegate: self)
|
||||||
window?.beginSheet(artworkSelectorController.window!, completionHandler: nil)
|
window?.beginSheet(artworkSelectorController.window!, completionHandler: nil)
|
||||||
artworkSelector = artworkSelectorController
|
artworkSelector = artworkSelectorController
|
||||||
}
|
}
|
||||||
|
|
||||||
func selectArtworkDone(_ indexes: IndexSet) {
|
func didSelect(artworks: [RemoteImage]) {
|
||||||
window?.endSheet((artworkSelector?.window)!)
|
window?.endSheet((artworkSelector?.window)!)
|
||||||
addMetadata()
|
load(artworks: artworks)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func load(artworks: [RemoteImage]) {
|
||||||
|
switch state {
|
||||||
|
case .closing(_, let result):
|
||||||
|
|
||||||
|
DispatchQueue.global(priority: .background).async {
|
||||||
|
for artwork in artworks {
|
||||||
|
if let data = URLSession.data(from: artwork.url) {
|
||||||
|
result.artworks.add(MP42Image(data: data, type: MP42_ART_JPEG))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.addMetadata()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
addMetadata()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func addMetadata() {
|
private func addMetadata() {
|
||||||
switch state {
|
switch state {
|
||||||
case .closing(let search, let result):
|
case .closing(let search, let result):
|
||||||
if search.type == .tvShow {
|
if search.type == .tvShow {
|
||||||
if let title = result[SBMetadataResultSeriesName] as? String,
|
if let title = result[SBMetadataResultSeriesName] as? String {
|
||||||
var previousTVSeries = UserDefaults.standard.array(forKey: "Previously used TV series") as? [String], previousTVSeries.contains(title) == false
|
var previousTVSeries = MetadataSearchController.recentSearches()
|
||||||
{
|
if previousTVSeries.contains(title) == false {
|
||||||
previousTVSeries.append(title)
|
previousTVSeries.append(title)
|
||||||
UserDefaults.standard.set(previousTVSeries, forKey: "Previously used TV series")
|
}
|
||||||
}
|
MetadataSearchController.saveRecentSearches(previousTVSeries)
|
||||||
else if let title = result[SBMetadataResultSeriesName] as? String{
|
|
||||||
UserDefaults.standard.set([title], forKey: "Previously used TV series")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delegate.metadataImportDone(metadataToBeImported: result)
|
delegate?.didSelect(metadata: result)
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -344,9 +399,11 @@ import Cocoa
|
|||||||
metadataTable.reloadData()
|
metadataTable.reloadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
private func swithDefaultButton(from oldDefault: NSButton, to newDefault: NSButton, disableOldButton: Bool) {
|
private func swithDefaultButton(from oldDefault: NSButton, to newDefault: NSButton, disableOldButton: Bool?) {
|
||||||
oldDefault.keyEquivalent = ""
|
oldDefault.keyEquivalent = ""
|
||||||
oldDefault.isEnabled = !disableOldButton
|
if let disableOldButton = disableOldButton {
|
||||||
|
oldDefault.isEnabled = !disableOldButton
|
||||||
|
}
|
||||||
newDefault.keyEquivalent = "\r"
|
newDefault.keyEquivalent = "\r"
|
||||||
newDefault.isEnabled = true
|
newDefault.isEnabled = true
|
||||||
}
|
}
|
||||||
@@ -364,21 +421,27 @@ import Cocoa
|
|||||||
state: false)
|
state: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func visibleSearchButton() -> NSButton {
|
||||||
|
return searchMode.selectedTabViewItem == movieTab ? searchMovieButton : searchTvButton
|
||||||
|
}
|
||||||
|
|
||||||
private func updateUI() {
|
private func updateUI() {
|
||||||
switch state {
|
switch state {
|
||||||
case .none:
|
case .none:
|
||||||
stopProgressReport()
|
stopProgressReport()
|
||||||
reloadTableData()
|
reloadTableData()
|
||||||
swithDefaultButton(from: addButton, to: searchMovieButton, disableOldButton: true)
|
swithDefaultButton(from: addButton, to: visibleSearchButton(), disableOldButton: true)
|
||||||
updateSearchButtonVisibility()
|
updateSearchButtonVisibility()
|
||||||
case .searching:
|
case .searching:
|
||||||
startProgressReport()
|
startProgressReport()
|
||||||
reloadTableData()
|
reloadTableData()
|
||||||
swithDefaultButton(from: addButton, to: searchMovieButton, disableOldButton: true)
|
swithDefaultButton(from: addButton, to: visibleSearchButton(), disableOldButton: true)
|
||||||
case .completed:
|
case .completed:
|
||||||
stopProgressReport()
|
stopProgressReport()
|
||||||
reloadTableData()
|
reloadTableData()
|
||||||
swithDefaultButton(from: searchMovieButton, to: addButton, disableOldButton: false)
|
swithDefaultButton(from: searchMovieButton, to: addButton, disableOldButton: nil)
|
||||||
|
swithDefaultButton(from: searchTvButton, to: addButton, disableOldButton: nil)
|
||||||
|
updateSearchButtonVisibility()
|
||||||
window?.makeFirstResponder(resultsTable)
|
window?.makeFirstResponder(resultsTable)
|
||||||
case .additionalSearch:
|
case .additionalSearch:
|
||||||
startProgressReport()
|
startProgressReport()
|
||||||
@@ -390,12 +453,28 @@ import Cocoa
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func updateSearchButtonVisibility() {
|
private func updateSearchButtonVisibility() {
|
||||||
//searchButton.isEnabled = searchTitle.stringValue.count > 0 ? true : false
|
if movieName.stringValue.count > 0 {
|
||||||
|
searchMovieButton.isEnabled = true
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
searchMovieButton.isEnabled = false
|
||||||
|
}
|
||||||
|
if tvSeriesName.stringValue.count > 0 {
|
||||||
|
if tvSeasonNum.stringValue.count == 0 && tvEpisodeNum.stringValue.count > 0 {
|
||||||
|
searchTvButton.isEnabled = false
|
||||||
|
} else {
|
||||||
|
searchTvButton.isEnabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
searchTvButton.isEnabled = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func controlTextDidChange(_ obj: Notification) {
|
override func controlTextDidChange(_ obj: Notification) {
|
||||||
updateSearchButtonVisibility()
|
updateSearchButtonVisibility()
|
||||||
searchMovieButton.keyEquivalent = "\r"
|
searchMovieButton.keyEquivalent = "\r"
|
||||||
|
searchTvButton.keyEquivalent = "\r"
|
||||||
addButton.keyEquivalent = ""
|
addButton.keyEquivalent = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
//
|
|
||||||
// ArtworkSelector.h
|
|
||||||
// Subler
|
|
||||||
//
|
|
||||||
// Created by Douglas Stebila on 2011/02/03.
|
|
||||||
// Copyright 2011 Douglas Stebila. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
|
||||||
|
|
||||||
@class SBRemoteImage;
|
|
||||||
|
|
||||||
@protocol SBArtworkSelectorDelegate <NSObject>
|
|
||||||
- (void)selectArtworkDone:(NSIndexSet *)indexes;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface SBArtworkSelector : NSWindowController
|
|
||||||
|
|
||||||
#pragma mark Initialization
|
|
||||||
- (instancetype)initWithDelegate:(id <SBArtworkSelectorDelegate>)del imageURLs:(NSArray<SBRemoteImage *> *)imageURLs;
|
|
||||||
|
|
||||||
#pragma mark Load images
|
|
||||||
- (IBAction) loadMoreArtwork:(id)sender;
|
|
||||||
|
|
||||||
#pragma mark User interface
|
|
||||||
- (IBAction) zoomSliderDidChange:(id)sender;
|
|
||||||
|
|
||||||
#pragma mark Finishing up
|
|
||||||
- (IBAction) addArtwork:(id)sender;
|
|
||||||
- (IBAction) addNoArtwork:(id)sender;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
//
|
|
||||||
// ArtworkSelector.m
|
|
||||||
// Subler
|
|
||||||
//
|
|
||||||
// Created by Douglas Stebila on 2011/02/03.
|
|
||||||
// Copyright 2011 Douglas Stebila. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "SBArtworkSelector.h"
|
|
||||||
#import "SBMetadataHelper.h"
|
|
||||||
#import <Quartz/Quartz.h>
|
|
||||||
#import "SBRemoteImage.h"
|
|
||||||
|
|
||||||
#pragma mark IKImageBrowserItem data source objects
|
|
||||||
|
|
||||||
@interface SBArtworkImageObject : NSObject {
|
|
||||||
NSString *_urlString;
|
|
||||||
NSString *_artworkProviderName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@property (atomic, unsafe_unretained) id delegate;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface SBArtworkImageObject ()
|
|
||||||
|
|
||||||
@property (nonatomic, readonly) NSURL *url;
|
|
||||||
@property (atomic) NSData *data;
|
|
||||||
@property (atomic) NSInteger version;
|
|
||||||
@property (atomic) BOOL isCancelled;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation SBArtworkImageObject
|
|
||||||
|
|
||||||
- (instancetype)initWithRemoteImage:(SBRemoteImage *)image delegate:(id)delegate
|
|
||||||
{
|
|
||||||
self = [super init];
|
|
||||||
if (self) {
|
|
||||||
_url = image.thumbURL;
|
|
||||||
_urlString = image.thumbURL.absoluteString;
|
|
||||||
_artworkProviderName = image.providerName;
|
|
||||||
_delegate = delegate;
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc {
|
|
||||||
self.delegate = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)cancel {
|
|
||||||
self.isCancelled = YES;
|
|
||||||
self.delegate = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *)imageRepresentationType {
|
|
||||||
return IKImageBrowserNSDataRepresentationType;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id)imageRepresentation {
|
|
||||||
@synchronized(self) {
|
|
||||||
if (!self.version) {
|
|
||||||
self.version = 1;
|
|
||||||
// Get the data outside the main thread
|
|
||||||
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
|
||||||
if (!self.isCancelled) {
|
|
||||||
self.data = [SBMetadataHelper downloadDataFromURL:self.url cachePolicy:SBCachePolicyDefault];
|
|
||||||
self.version = 2;
|
|
||||||
// We got the data, tell the controller to update the view
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
if (!self.isCancelled) {
|
|
||||||
[self.delegate reloadData];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return self.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *)imageUID {
|
|
||||||
return _urlString;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSUInteger)imageVersion{
|
|
||||||
return self.version;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *)imageTitle {
|
|
||||||
NSArray *a = [_artworkProviderName componentsSeparatedByString:@"|"];
|
|
||||||
return a.firstObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *)imageSubtitle {
|
|
||||||
NSArray *a = [_artworkProviderName componentsSeparatedByString:@"|"];
|
|
||||||
if (a.count > 1) {
|
|
||||||
return a[1];
|
|
||||||
}
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
#pragma mark -
|
|
||||||
|
|
||||||
@interface SBArtworkSelector ()
|
|
||||||
{
|
|
||||||
id <SBArtworkSelectorDelegate> delegate;
|
|
||||||
IBOutlet IKImageBrowserView *imageBrowser;
|
|
||||||
IBOutlet NSSlider *slider;
|
|
||||||
IBOutlet NSButton *addArtworkButton;
|
|
||||||
IBOutlet NSButton *loadMoreArtworkButton;
|
|
||||||
|
|
||||||
NSMutableArray<SBRemoteImage *> *imageURLsUnloaded;
|
|
||||||
NSMutableArray<SBArtworkImageObject *> *images;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation SBArtworkSelector
|
|
||||||
|
|
||||||
#pragma mark Initialization
|
|
||||||
|
|
||||||
- (instancetype)initWithDelegate:(id <SBArtworkSelectorDelegate>)del imageURLs:(NSArray *)imageURLs {
|
|
||||||
if ((self = [super initWithWindowNibName:@"ArtworkSelector"])) {
|
|
||||||
delegate = del;
|
|
||||||
imageURLsUnloaded = [[NSMutableArray alloc] initWithArray:imageURLs];
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark Load images
|
|
||||||
|
|
||||||
- (void)windowDidLoad {
|
|
||||||
images = [[NSMutableArray alloc] initWithCapacity:imageURLsUnloaded.count];
|
|
||||||
|
|
||||||
for (NSUInteger i = 0; (i < 10) && (imageURLsUnloaded.count > 0); i++) {
|
|
||||||
SBArtworkImageObject *m = [[SBArtworkImageObject alloc] initWithRemoteImage:imageURLsUnloaded.firstObject delegate:self];
|
|
||||||
[imageURLsUnloaded removeObjectAtIndex:0];
|
|
||||||
[images addObject:m];
|
|
||||||
}
|
|
||||||
|
|
||||||
loadMoreArtworkButton.enabled = (imageURLsUnloaded.count > 0);
|
|
||||||
[imageBrowser reloadData];
|
|
||||||
[imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)loadMoreArtwork:(id)sender {
|
|
||||||
for (NSUInteger i = 0; (i < 10) && (imageURLsUnloaded.count > 0); i++) {
|
|
||||||
SBArtworkImageObject *m = [[SBArtworkImageObject alloc] initWithRemoteImage:imageURLsUnloaded.firstObject delegate:self];
|
|
||||||
[imageURLsUnloaded removeObjectAtIndex:0];
|
|
||||||
[images addObject:m];
|
|
||||||
}
|
|
||||||
loadMoreArtworkButton.enabled = (imageURLsUnloaded.count > 0);
|
|
||||||
[imageBrowser reloadData];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark User interface
|
|
||||||
|
|
||||||
- (IBAction) zoomSliderDidChange:(id)sender {
|
|
||||||
[imageBrowser setZoomValue:slider.floatValue];
|
|
||||||
[imageBrowser setNeedsDisplay:YES];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)reloadData {
|
|
||||||
[imageBrowser reloadData];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark Finishing up
|
|
||||||
|
|
||||||
- (IBAction) addArtwork:(id)sender {
|
|
||||||
[delegate selectArtworkDone:imageBrowser.selectionIndexes];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction) addNoArtwork:(id)sender {
|
|
||||||
[delegate selectArtworkDone:[NSIndexSet indexSet]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) dealloc {
|
|
||||||
[imageBrowser setDelegate:nil];
|
|
||||||
[imageBrowser setDataSource:nil];
|
|
||||||
|
|
||||||
[images makeObjectsPerformSelector:@selector(cancel)];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark -
|
|
||||||
#pragma mark IKImageBrowserDataSource
|
|
||||||
|
|
||||||
- (NSUInteger) numberOfItemsInImageBrowser:(IKImageBrowserView *) aBrowser {
|
|
||||||
return images.count;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id)imageBrowser:(IKImageBrowserView *) aBrowser itemAtIndex:(NSUInteger)index {
|
|
||||||
return images[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark -
|
|
||||||
#pragma mark IKImageBrowserDelegate
|
|
||||||
|
|
||||||
- (void)imageBrowser:(IKImageBrowserView *) aBrowser cellWasDoubleClickedAtIndex:(NSUInteger) index {
|
|
||||||
[self addArtwork:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser {
|
|
||||||
if ([aBrowser selectionIndexes].count) {
|
|
||||||
[addArtworkButton setEnabled:YES];
|
|
||||||
} else {
|
|
||||||
[addArtworkButton setEnabled:NO];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
#import "SBChapterViewController.h"
|
#import "SBChapterViewController.h"
|
||||||
#import "SBMultiSelectViewController.h"
|
#import "SBMultiSelectViewController.h"
|
||||||
|
|
||||||
#import "SBArtworkSelector.h"
|
|
||||||
#import "SBMetadataResult.h"
|
#import "SBMetadataResult.h"
|
||||||
#import "SBMetadataResultMap.h"
|
#import "SBMetadataResultMap.h"
|
||||||
|
|
||||||
@@ -857,7 +856,7 @@ static NSDictionary *_detailMonospacedAttr;
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)metadataImportDoneWithMetadataToBeImported:(SBMetadataResult *)metadataToBeImported
|
- (void)didSelectWithMetadata:(SBMetadataResult *)metadataToBeImported
|
||||||
{
|
{
|
||||||
if (metadataToBeImported) {
|
if (metadataToBeImported) {
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#import "SBMetadataResult.h"
|
#import "SBMetadataResult.h"
|
||||||
#import "SBMetadataResultMap.h"
|
#import "SBMetadataResultMap.h"
|
||||||
#import "SBRemoteImage.h"
|
#import "SBRemoteImage.h"
|
||||||
#import "SBArtworkSelector.h"
|
|
||||||
|
|
||||||
#import <MP42Foundation/MP42Ratings.h>
|
#import <MP42Foundation/MP42Ratings.h>
|
||||||
#import <MP42Foundation/MP42Languages.h>
|
#import <MP42Foundation/MP42Languages.h>
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
A9DA3B9C1B918D5C00F1E40C /* SBApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DA3B991B918D5C00F1E40C /* SBApplication.m */; };
|
A9DA3B9C1B918D5C00F1E40C /* SBApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DA3B991B918D5C00F1E40C /* SBApplication.m */; };
|
||||||
A9DA3B9D1B918D5C00F1E40C /* SBExceptionAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DA3B9B1B918D5C00F1E40C /* SBExceptionAlertController.m */; };
|
A9DA3B9D1B918D5C00F1E40C /* SBExceptionAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DA3B9B1B918D5C00F1E40C /* SBExceptionAlertController.m */; };
|
||||||
A9DA3BA31B918D6F00F1E40C /* ExceptionAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9DA3BA11B918D6F00F1E40C /* ExceptionAlert.xib */; };
|
A9DA3BA31B918D6F00F1E40C /* ExceptionAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9DA3BA11B918D6F00F1E40C /* ExceptionAlert.xib */; };
|
||||||
|
A9E932A71F34D31D00B1790B /* ArtworkSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9E932A61F34D31D00B1790B /* ArtworkSelector.swift */; };
|
||||||
A9E97F141F274F1100DBA586 /* iTunesStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9E97F131F274F1100DBA586 /* iTunesStore.swift */; };
|
A9E97F141F274F1100DBA586 /* iTunesStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9E97F131F274F1100DBA586 /* iTunesStore.swift */; };
|
||||||
A9EEA5F218D65490008B54B4 /* SBOptionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EEA5F018D65490008B54B4 /* SBOptionsViewController.m */; };
|
A9EEA5F218D65490008B54B4 /* SBOptionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EEA5F018D65490008B54B4 /* SBOptionsViewController.m */; };
|
||||||
A9EEA5F818D654B9008B54B4 /* QueueOptions.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9EEA5F618D654B9008B54B4 /* QueueOptions.xib */; };
|
A9EEA5F818D654B9008B54B4 /* QueueOptions.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9EEA5F618D654B9008B54B4 /* QueueOptions.xib */; };
|
||||||
@@ -101,7 +102,6 @@
|
|||||||
A9F7F8E01837C44B0036AE7E /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9ED7B21180067A2008FD3A8 /* IOKit.framework */; };
|
A9F7F8E01837C44B0036AE7E /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9ED7B21180067A2008FD3A8 /* IOKit.framework */; };
|
||||||
A9FC6FF61EF2E3280034CCED /* TheTVDBService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FC6FF51EF2E3280034CCED /* TheTVDBService.swift */; };
|
A9FC6FF61EF2E3280034CCED /* TheTVDBService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FC6FF51EF2E3280034CCED /* TheTVDBService.swift */; };
|
||||||
CD4E6E5D12F744210095C84F /* ArtworkSelector.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD4E6E5B12F744210095C84F /* ArtworkSelector.xib */; };
|
CD4E6E5D12F744210095C84F /* ArtworkSelector.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD4E6E5B12F744210095C84F /* ArtworkSelector.xib */; };
|
||||||
CD56963212FAAD680029FADB /* SBArtworkSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = CD56963112FAAD680029FADB /* SBArtworkSelector.m */; };
|
|
||||||
CD71FEA612F1B62600F0A98D /* MetadataSearch.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD71FEA412F1B62600F0A98D /* MetadataSearch.xib */; };
|
CD71FEA612F1B62600F0A98D /* MetadataSearch.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD71FEA412F1B62600F0A98D /* MetadataSearch.xib */; };
|
||||||
CDE8E452174CBBD4009410B5 /* iTunesStores.json in Resources */ = {isa = PBXBuildFile; fileRef = CDE8E451174CBBD4009410B5 /* iTunesStores.json */; };
|
CDE8E452174CBBD4009410B5 /* iTunesStores.json in Resources */ = {isa = PBXBuildFile; fileRef = CDE8E451174CBBD4009410B5 /* iTunesStores.json */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
@@ -324,6 +324,7 @@
|
|||||||
A9DA3B9A1B918D5C00F1E40C /* SBExceptionAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBExceptionAlertController.h; path = Classes/SBExceptionAlertController.h; sourceTree = "<group>"; };
|
A9DA3B9A1B918D5C00F1E40C /* SBExceptionAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBExceptionAlertController.h; path = Classes/SBExceptionAlertController.h; sourceTree = "<group>"; };
|
||||||
A9DA3B9B1B918D5C00F1E40C /* SBExceptionAlertController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBExceptionAlertController.m; path = Classes/SBExceptionAlertController.m; sourceTree = "<group>"; };
|
A9DA3B9B1B918D5C00F1E40C /* SBExceptionAlertController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBExceptionAlertController.m; path = Classes/SBExceptionAlertController.m; sourceTree = "<group>"; };
|
||||||
A9DA3BA01B918D6200F1E40C /* SBApplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBApplication.h; path = Classes/SBApplication.h; sourceTree = "<group>"; };
|
A9DA3BA01B918D6200F1E40C /* SBApplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBApplication.h; path = Classes/SBApplication.h; sourceTree = "<group>"; };
|
||||||
|
A9E932A61F34D31D00B1790B /* ArtworkSelector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ArtworkSelector.swift; path = Classes/ArtworkSelector.swift; sourceTree = "<group>"; };
|
||||||
A9E97F131F274F1100DBA586 /* iTunesStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = iTunesStore.swift; path = Classes/MetadataImporters/iTunesStore.swift; sourceTree = "<group>"; };
|
A9E97F131F274F1100DBA586 /* iTunesStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = iTunesStore.swift; path = Classes/MetadataImporters/iTunesStore.swift; sourceTree = "<group>"; };
|
||||||
A9ED7B21180067A2008FD3A8 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
|
A9ED7B21180067A2008FD3A8 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
|
||||||
A9EEA5EF18D65490008B54B4 /* SBOptionsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBOptionsViewController.h; path = Classes/SBOptionsViewController.h; sourceTree = "<group>"; };
|
A9EEA5EF18D65490008B54B4 /* SBOptionsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBOptionsViewController.h; path = Classes/SBOptionsViewController.h; sourceTree = "<group>"; };
|
||||||
@@ -333,8 +334,6 @@
|
|||||||
A9F5820B1DCC861F005F3E92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
A9F5820B1DCC861F005F3E92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
A9FC6FF41EF2E3280034CCED /* Subler-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Subler-Bridging-Header.h"; sourceTree = "<group>"; };
|
A9FC6FF41EF2E3280034CCED /* Subler-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Subler-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
A9FC6FF51EF2E3280034CCED /* TheTVDBService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TheTVDBService.swift; path = Classes/MetadataImporters/TheTVDBService.swift; sourceTree = "<group>"; };
|
A9FC6FF51EF2E3280034CCED /* TheTVDBService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TheTVDBService.swift; path = Classes/MetadataImporters/TheTVDBService.swift; sourceTree = "<group>"; };
|
||||||
CD56963012FAAD680029FADB /* SBArtworkSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBArtworkSelector.h; path = Classes/SBArtworkSelector.h; sourceTree = "<group>"; };
|
|
||||||
CD56963112FAAD680029FADB /* SBArtworkSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBArtworkSelector.m; path = Classes/SBArtworkSelector.m; sourceTree = "<group>"; };
|
|
||||||
CD56966E12FAAFA90029FADB /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
|
CD56966E12FAAFA90029FADB /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
|
||||||
CDE8E451174CBBD4009410B5 /* iTunesStores.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = iTunesStores.json; sourceTree = "<group>"; };
|
CDE8E451174CBBD4009410B5 /* iTunesStores.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = iTunesStores.json; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@@ -606,8 +605,7 @@
|
|||||||
A9B46ABE12B79D1C0040517A /* SBDocument.m */,
|
A9B46ABE12B79D1C0040517A /* SBDocument.m */,
|
||||||
A9B46A7E12B79B240040517A /* SBFileImport.h */,
|
A9B46A7E12B79B240040517A /* SBFileImport.h */,
|
||||||
A9B46A7F12B79B240040517A /* SBFileImport.m */,
|
A9B46A7F12B79B240040517A /* SBFileImport.m */,
|
||||||
CD56963012FAAD680029FADB /* SBArtworkSelector.h */,
|
A9E932A61F34D31D00B1790B /* ArtworkSelector.swift */,
|
||||||
CD56963112FAAD680029FADB /* SBArtworkSelector.m */,
|
|
||||||
A997B0A91F348AB000974C9C /* MetadataSearchController.swift */,
|
A997B0A91F348AB000974C9C /* MetadataSearchController.swift */,
|
||||||
A99189D01F2F88F700623ED7 /* ChapterSearchController.swift */,
|
A99189D01F2F88F700623ED7 /* ChapterSearchController.swift */,
|
||||||
A909440E1DD4C85B00E9F89C /* Table View */,
|
A909440E1DD4C85B00E9F89C /* Table View */,
|
||||||
@@ -861,13 +859,13 @@
|
|||||||
A9C703121C05E08B00C89151 /* SBMetadataHelper.m in Sources */,
|
A9C703121C05E08B00C89151 /* SBMetadataHelper.m in Sources */,
|
||||||
A997B0AA1F348AB000974C9C /* MetadataSearchController.swift in Sources */,
|
A997B0AA1F348AB000974C9C /* MetadataSearchController.swift in Sources */,
|
||||||
A909440D1DD4C70900E9F89C /* SBTokenFieldCell.m in Sources */,
|
A909440D1DD4C70900E9F89C /* SBTokenFieldCell.m in Sources */,
|
||||||
|
A9E932A71F34D31D00B1790B /* ArtworkSelector.swift in Sources */,
|
||||||
A9C5FA6E19FA22590051F3FF /* SBLogWindowController.m in Sources */,
|
A9C5FA6E19FA22590051F3FF /* SBLogWindowController.m in Sources */,
|
||||||
A9D73C5218BF3F1100C6FFA6 /* SBQueue.m in Sources */,
|
A9D73C5218BF3F1100C6FFA6 /* SBQueue.m in Sources */,
|
||||||
A9AB485717F0AEAC000AA72E /* SBSoundViewController.m in Sources */,
|
A9AB485717F0AEAC000AA72E /* SBSoundViewController.m in Sources */,
|
||||||
A9C828F5195950C3004C4718 /* SBQueuePreferences.m in Sources */,
|
A9C828F5195950C3004C4718 /* SBQueuePreferences.m in Sources */,
|
||||||
A9B514191EFC12310055A035 /* TheTVDB.swift in Sources */,
|
A9B514191EFC12310055A035 /* TheTVDB.swift in Sources */,
|
||||||
A9DA3B9C1B918D5C00F1E40C /* SBApplication.m in Sources */,
|
A9DA3B9C1B918D5C00F1E40C /* SBApplication.m in Sources */,
|
||||||
CD56963212FAAD680029FADB /* SBArtworkSelector.m in Sources */,
|
|
||||||
A9CBAB1E1F29C083001C26B3 /* MetadataImporter.swift in Sources */,
|
A9CBAB1E1F29C083001C26B3 /* MetadataImporter.swift in Sources */,
|
||||||
A9FC6FF61EF2E3280034CCED /* TheTVDBService.swift in Sources */,
|
A9FC6FF61EF2E3280034CCED /* TheTVDBService.swift in Sources */,
|
||||||
61CEC0D31E756ADA000FECC1 /* SBMultiSelectViewController.m in Sources */,
|
61CEC0D31E756ADA000FECC1 /* SBMultiSelectViewController.m in Sources */,
|
||||||
|
|||||||
Reference in new issue
Block a user