Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16e81d4be0 | ||
|
|
153b8e6570 | ||
|
|
45cf445bca | ||
|
|
cf3dae6490 | ||
|
|
51f395469c | ||
|
|
c01460cb43 | ||
|
|
fc082f3bca | ||
|
|
9122f520db | ||
|
|
1a797e20fa | ||
|
|
f58142a250 | ||
|
|
68bef59a9f | ||
|
|
78ddedb92a | ||
|
|
68709ef2ec | ||
|
|
9aaf78acd2 | ||
|
|
d6cd740aa8 | ||
|
|
418196dbe0 | ||
|
|
aeda6095a8 | ||
|
|
4b5f384a56 | ||
|
|
d50ad9a86f | ||
|
|
03c9a0a129 | ||
|
|
11633fe0e2 | ||
|
|
c928f94e18 | ||
|
|
49edd9adc5 | ||
|
|
43ebf7e835 | ||
|
|
6bc6b749c5 | ||
|
|
20521b0446 | ||
|
|
dea7426df2 |
No files matched your search
@@ -16,7 +16,7 @@
|
|||||||
<window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1" customClass="PrefsWindow" customModule="Subler" customModuleProvider="target">
|
<window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1" customClass="PrefsWindow" customModule="Subler" customModuleProvider="target">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="625" y="560" width="660" height="220"/>
|
<rect key="contentRect" x="625" y="660" width="660" height="220"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||||
<view key="contentView" id="2">
|
<view key="contentView" id="2">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="660" height="220"/>
|
<rect key="frame" x="0.0" y="0.0" width="660" height="220"/>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24127" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24127"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24506"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="19" rowSizeStyle="automatic" viewBased="YES" id="7" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="19" rowSizeStyle="automatic" viewBased="YES" id="7" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="512" height="458"/>
|
<rect key="frame" x="0.0" y="0.0" width="503" height="458"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<size key="intercellSpacing" width="3" height="4"/>
|
<size key="intercellSpacing" width="3" height="4"/>
|
||||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableColumns>
|
<tableColumns>
|
||||||
<tableColumn identifier="nameColumn" editable="NO" width="500" minWidth="40" maxWidth="3000" id="8">
|
<tableColumn identifier="nameColumn" editable="NO" width="462" minWidth="40" maxWidth="3000" id="8">
|
||||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="nameColumn">
|
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="nameColumn">
|
||||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
@@ -52,13 +52,13 @@
|
|||||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
||||||
<prototypeCellViews>
|
<prototypeCellViews>
|
||||||
<tableCellView id="ofF-gY-wBR">
|
<tableCellView id="ofF-gY-wBR">
|
||||||
<rect key="frame" x="1" y="2" width="509" height="19"/>
|
<rect key="frame" x="1" y="2" width="471" height="19"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
||||||
<rect key="frame" x="29" y="2" width="451" height="17"/>
|
<rect key="frame" x="29" y="2" width="413" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Name" id="srx-EJ-mK6">
|
<textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" title="Name" usesSingleLineMode="YES" id="srx-EJ-mK6">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="EncodeComplete" id="uXb-c3-MQO"/>
|
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="EncodeComplete" id="uXb-c3-MQO"/>
|
||||||
</imageView>
|
</imageView>
|
||||||
<button toolTip="Show item info" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o98-wM-YAQ">
|
<button toolTip="Show item info" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o98-wM-YAQ">
|
||||||
<rect key="frame" x="486" y="2" width="16" height="16"/>
|
<rect key="frame" x="448" y="2" width="16" height="16"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="info" imagePosition="overlaps" alignment="center" alternateImage="info-pressed" imageScaling="proportionallyDown" inset="2" id="AFW-1U-iaL">
|
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="info" imagePosition="overlaps" alignment="center" alternateImage="info-pressed" imageScaling="proportionallyDown" inset="2" id="AFW-1U-iaL">
|
||||||
<behavior key="behavior" lightByContents="YES"/>
|
<behavior key="behavior" lightByContents="YES"/>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
</tableView>
|
</tableView>
|
||||||
</subviews>
|
</subviews>
|
||||||
</clipView>
|
</clipView>
|
||||||
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6">
|
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6">
|
||||||
<rect key="frame" x="1" y="443" width="503" height="16"/>
|
<rect key="frame" x="1" y="443" width="503" height="16"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" toolbarStyle="expanded" id="s5f-yH-26m" userLabel="Window">
|
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" toolbarStyle="expanded" id="s5f-yH-26m" userLabel="Window">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="50" y="490" width="520" height="510"/>
|
<rect key="contentRect" x="200" y="500" width="520" height="510"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||||
<value key="minSize" type="size" width="520" height="510"/>
|
<value key="minSize" type="size" width="520" height="510"/>
|
||||||
<view key="contentView" id="rip-YL-WpY">
|
<view key="contentView" id="rip-YL-WpY">
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
<customView id="Hz6-mo-xeY">
|
<customView id="Hz6-mo-xeY">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="610" height="220"/>
|
<rect key="frame" x="0.0" y="0.0" width="660" height="202"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PZS-8W-dno">
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PZS-8W-dno">
|
||||||
<rect key="frame" x="67" y="183" width="184" height="18"/>
|
<rect key="frame" x="69" y="166" width="180" height="16"/>
|
||||||
<buttonCell key="cell" type="check" title="Set filename of Movies to:" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="wci-gO-GWT">
|
<buttonCell key="cell" type="check" title="Set filename of Movies to:" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="wci-gO-GWT">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TBF-BD-fSk">
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TBF-BD-fSk">
|
||||||
<rect key="frame" x="67" y="104" width="201" height="18"/>
|
<rect key="frame" x="69" y="86" width="197" height="16"/>
|
||||||
<buttonCell key="cell" type="check" title="Set filename of TV Shows to:" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="kQC-bu-0by">
|
<buttonCell key="cell" type="check" title="Set filename of TV Shows to:" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="kQC-bu-0by">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -39,12 +39,9 @@
|
|||||||
<binding destination="BZm-iR-6oK" name="value" keyPath="values.SBSetTVShowFormat" id="e2b-dq-8JE"/>
|
<binding destination="BZm-iR-6oK" name="value" keyPath="values.SBSetTVShowFormat" id="e2b-dq-8JE"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<tokenField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="i8H-oP-Sif">
|
<tokenField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="i8H-oP-Sif">
|
||||||
<rect key="frame" x="85" y="153" width="440" height="23"/>
|
<rect key="frame" x="69" y="134" width="476" height="24"/>
|
||||||
<constraints>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<constraint firstAttribute="width" constant="440" id="6Ap-Ey-VHf"/>
|
|
||||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="23" id="JPO-az-iic"/>
|
|
||||||
</constraints>
|
|
||||||
<tokenFieldCell key="cell" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" allowsEditingTextAttributes="YES" id="h4P-Ma-djC">
|
<tokenFieldCell key="cell" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" allowsEditingTextAttributes="YES" id="h4P-Ma-djC">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -54,11 +51,9 @@
|
|||||||
<outlet property="delegate" destination="-2" id="39Q-aI-o60"/>
|
<outlet property="delegate" destination="-2" id="39Q-aI-o60"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tokenField>
|
</tokenField>
|
||||||
<tokenField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rzc-AK-4Vr">
|
<tokenField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rzc-AK-4Vr">
|
||||||
<rect key="frame" x="85" y="74" width="440" height="23"/>
|
<rect key="frame" x="69" y="54" width="476" height="24"/>
|
||||||
<constraints>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="23" id="bvK-Gm-JUU"/>
|
|
||||||
</constraints>
|
|
||||||
<tokenFieldCell key="cell" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" allowsEditingTextAttributes="YES" id="aHe-D5-fgj">
|
<tokenFieldCell key="cell" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" allowsEditingTextAttributes="YES" id="aHe-D5-fgj">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -68,8 +63,9 @@
|
|||||||
<outlet property="delegate" destination="-2" id="mh9-CJ-zVx"/>
|
<outlet property="delegate" destination="-2" id="mh9-CJ-zVx"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tokenField>
|
</tokenField>
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dq1-e8-fa6">
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dq1-e8-fa6">
|
||||||
<rect key="frame" x="526" y="148" width="44" height="32"/>
|
<rect key="frame" x="553" y="134" width="38" height="24"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSSmartBadgeTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="qsh-5h-jhl">
|
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSSmartBadgeTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="qsh-5h-jhl">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -78,8 +74,9 @@
|
|||||||
<action selector="showMovieTokens:" target="-2" id="Er8-nw-di4"/>
|
<action selector="showMovieTokens:" target="-2" id="Er8-nw-di4"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fZZ-im-9BI">
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fZZ-im-9BI">
|
||||||
<rect key="frame" x="526" y="69" width="44" height="32"/>
|
<rect key="frame" x="553" y="54" width="38" height="24"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSSmartBadgeTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gf3-DD-hW7">
|
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSSmartBadgeTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gf3-DD-hW7">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -89,10 +86,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Pbz-wc-RXA">
|
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Pbz-wc-RXA">
|
||||||
<rect key="frame" x="83" y="20" width="444" height="34"/>
|
<rect key="frame" x="83" y="20" width="441" height="14"/>
|
||||||
<constraints>
|
|
||||||
<constraint firstAttribute="height" constant="34" id="Y5R-jS-Whb"/>
|
|
||||||
</constraints>
|
|
||||||
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Set the format to create a custom filename in the Save As… panel and in the queue." id="hE3-zH-XFE">
|
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Set the format to create a custom filename in the Save As… panel and in the queue." id="hE3-zH-XFE">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -101,25 +95,18 @@
|
|||||||
</textField>
|
</textField>
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="bottom" secondItem="Pbz-wc-RXA" secondAttribute="bottom" constant="20" symbolic="YES" id="0R2-Y8-s5e"/>
|
<constraint firstAttribute="bottom" secondItem="Pbz-wc-RXA" secondAttribute="bottom" constant="20" symbolic="YES" id="1zf-9m-dj9"/>
|
||||||
<constraint firstItem="Pbz-wc-RXA" firstAttribute="leading" secondItem="i8H-oP-Sif" secondAttribute="leading" id="4Vz-o1-zSY"/>
|
<constraint firstItem="Pbz-wc-RXA" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="85" id="7Sa-nY-Sp0"/>
|
||||||
<constraint firstItem="rzc-AK-4Vr" firstAttribute="leading" secondItem="TBF-BD-fSk" secondAttribute="leading" constant="16" id="Aws-ML-M7P"/>
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="PZS-8W-dno" secondAttribute="trailing" constant="40" id="FWW-Rk-8oX"/>
|
||||||
<constraint firstItem="TBF-BD-fSk" firstAttribute="top" secondItem="i8H-oP-Sif" secondAttribute="bottom" constant="32" id="C0O-NO-8Te"/>
|
<constraint firstItem="TBF-BD-fSk" firstAttribute="top" secondItem="PZS-8W-dno" secondAttribute="bottom" constant="64" id="RMy-yp-T41"/>
|
||||||
<constraint firstItem="dq1-e8-fa6" firstAttribute="centerY" secondItem="i8H-oP-Sif" secondAttribute="centerY" id="Dsc-lq-HSw"/>
|
<constraint firstItem="PZS-8W-dno" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="69" id="Zr8-m0-a0L"/>
|
||||||
<constraint firstItem="rzc-AK-4Vr" firstAttribute="top" secondItem="TBF-BD-fSk" secondAttribute="bottom" constant="8" id="FZZ-y5-ycJ"/>
|
<constraint firstAttribute="trailing" secondItem="Pbz-wc-RXA" secondAttribute="trailing" constant="138" id="f8r-kX-5Cf"/>
|
||||||
<constraint firstItem="PZS-8W-dno" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="GYO-gT-cbH"/>
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="TBF-BD-fSk" secondAttribute="trailing" constant="40" id="sO9-ww-FzW"/>
|
||||||
<constraint firstItem="i8H-oP-Sif" firstAttribute="top" secondItem="PZS-8W-dno" secondAttribute="bottom" constant="8" id="Mvi-1G-Dhn"/>
|
<constraint firstItem="PZS-8W-dno" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" symbolic="YES" id="uzL-77-0e4"/>
|
||||||
<constraint firstItem="Pbz-wc-RXA" firstAttribute="top" secondItem="rzc-AK-4Vr" secondAttribute="bottom" constant="20" id="ZQc-Um-c3U"/>
|
<constraint firstItem="Pbz-wc-RXA" firstAttribute="top" secondItem="TBF-BD-fSk" secondAttribute="bottom" constant="52" id="vr9-90-hg3"/>
|
||||||
<constraint firstItem="i8H-oP-Sif" firstAttribute="leading" secondItem="PZS-8W-dno" secondAttribute="leading" constant="16" id="ael-zI-oHU"/>
|
<constraint firstItem="TBF-BD-fSk" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="69" id="yiZ-p7-IJl"/>
|
||||||
<constraint firstItem="TBF-BD-fSk" firstAttribute="leading" secondItem="PZS-8W-dno" secondAttribute="leading" id="cyH-w2-B1O"/>
|
|
||||||
<constraint firstItem="dq1-e8-fa6" firstAttribute="leading" secondItem="i8H-oP-Sif" secondAttribute="trailing" constant="8" id="dhO-Zz-g71"/>
|
|
||||||
<constraint firstItem="fZZ-im-9BI" firstAttribute="centerY" secondItem="rzc-AK-4Vr" secondAttribute="centerY" id="gzL-hH-eGN"/>
|
|
||||||
<constraint firstItem="Pbz-wc-RXA" firstAttribute="trailing" secondItem="i8H-oP-Sif" secondAttribute="trailing" id="ipc-wG-c2z"/>
|
|
||||||
<constraint firstItem="fZZ-im-9BI" firstAttribute="leading" secondItem="rzc-AK-4Vr" secondAttribute="trailing" constant="8" id="kZg-YA-eMU"/>
|
|
||||||
<constraint firstItem="i8H-oP-Sif" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="n4G-w8-dKr"/>
|
|
||||||
<constraint firstItem="i8H-oP-Sif" firstAttribute="width" secondItem="rzc-AK-4Vr" secondAttribute="width" id="xG0-RB-Iyt"/>
|
|
||||||
</constraints>
|
</constraints>
|
||||||
<point key="canvasLocation" x="-186" y="-587"/>
|
<point key="canvasLocation" x="-200" y="-636"/>
|
||||||
</customView>
|
</customView>
|
||||||
<userDefaultsController representsSharedInstance="YES" id="BZm-iR-6oK"/>
|
<userDefaultsController representsSharedInstance="YES" id="BZm-iR-6oK"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
|||||||
|
|
||||||
if Prefs.rememberDocumentWindowSize {
|
if Prefs.rememberDocumentWindowSize {
|
||||||
window.setFrameAutosaveName("documentSave")
|
window.setFrameAutosaveName("documentSave")
|
||||||
window.setFrame(from: "documentSave")
|
window.setFrameUsingName("documentSave")
|
||||||
|
|
||||||
splitViewController.splitView.autosaveName = DocumentWindowController.splitViewResorationAutosaveName
|
splitViewController.splitView.autosaveName = DocumentWindowController.splitViewResorationAutosaveName
|
||||||
splitViewController.splitView.identifier = DocumentWindowController.splitViewResorationIdentifier
|
splitViewController.splitView.identifier = DocumentWindowController.splitViewResorationIdentifier
|
||||||
|
|||||||
@@ -360,11 +360,11 @@ public struct AppleTV: MetadataService {
|
|||||||
get {
|
get {
|
||||||
switch size {
|
switch size {
|
||||||
case .square:
|
case .square:
|
||||||
return "800x800.jpg"
|
return "1600x1600.jpg"
|
||||||
case .rectangle:
|
case .rectangle:
|
||||||
return "800x450.jpg"
|
return "1920x1080.jpg"
|
||||||
default:
|
default:
|
||||||
return "600x900.jpg"
|
return "1200x1800.jpg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,16 @@ import MP42Foundation
|
|||||||
|
|
||||||
public enum LanguageType {
|
public enum LanguageType {
|
||||||
case ISO
|
case ISO
|
||||||
|
case ISO_639_2
|
||||||
case custom
|
case custom
|
||||||
|
|
||||||
public func displayName(language: String) -> String {
|
public func displayName(language: String) -> String {
|
||||||
switch self {
|
switch self {
|
||||||
case .ISO:
|
case .ISO:
|
||||||
return MP42Languages.defaultManager .localizedLang(forExtendedTag: language)
|
return MP42Languages.defaultManager.localizedLang(forExtendedTag: language)
|
||||||
|
case .ISO_639_2:
|
||||||
|
let extendedTag = MP42Languages.defaultManager.extendedTag(forISO_639_2: language)
|
||||||
|
return MP42Languages.defaultManager.localizedLang(forExtendedTag: extendedTag)
|
||||||
case .custom:
|
case .custom:
|
||||||
return language
|
return language
|
||||||
}
|
}
|
||||||
@@ -25,6 +29,20 @@ public enum LanguageType {
|
|||||||
switch self {
|
switch self {
|
||||||
case .ISO:
|
case .ISO:
|
||||||
return MP42Languages.defaultManager.extendedTag(forLocalizedLang: displayName)
|
return MP42Languages.defaultManager.extendedTag(forLocalizedLang: displayName)
|
||||||
|
case .ISO_639_2:
|
||||||
|
return MP42Languages.defaultManager.extendedTag(forLocalizedLang: displayName)
|
||||||
|
case .custom:
|
||||||
|
return displayName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func tag(displayName: String) -> String {
|
||||||
|
switch self {
|
||||||
|
case .ISO:
|
||||||
|
return MP42Languages.defaultManager.extendedTag(forLocalizedLang: displayName)
|
||||||
|
case .ISO_639_2:
|
||||||
|
let extendedTag = MP42Languages.defaultManager.extendedTag(forLocalizedLang: displayName)
|
||||||
|
return MP42Languages.defaultManager.iso_639_2Code(forExtendedTag: extendedTag)
|
||||||
case .custom:
|
case .custom:
|
||||||
return displayName
|
return displayName
|
||||||
}
|
}
|
||||||
@@ -113,7 +131,7 @@ public enum MetadataSearch {
|
|||||||
|
|
||||||
extension MetadataSearch {
|
extension MetadataSearch {
|
||||||
|
|
||||||
public static var movieProviders: [String] { get { return [AppleTV().name, TheMovieDB().name, iTunesStore().name] } }
|
public static var movieProviders: [String] { get { return [AppleTV().name, TheMovieDB().name, TheTVDB().name, iTunesStore().name] } }
|
||||||
public static var tvProviders: [String] { get { return [AppleTV().name, TheMovieDB().name, TheTVDB().name, iTunesStore().name] } }
|
public static var tvProviders: [String] { get { return [AppleTV().name, TheMovieDB().name, TheTVDB().name, iTunesStore().name] } }
|
||||||
|
|
||||||
public static func service(name: String?) -> MetadataService {
|
public static func service(name: String?) -> MetadataService {
|
||||||
@@ -147,8 +165,8 @@ extension MetadataSearch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static func setDefaultLanguage(_ language: String, service: MetadataService, type: MetadataType) {
|
public static func setDefaultLanguage(_ language: String, service: MetadataService, type: MetadataType) {
|
||||||
let extendedLanguage = service.languageType.extendedTag(displayName: language)
|
let language = service.languageType.tag(displayName: language)
|
||||||
UserDefaults.standard.set(extendedLanguage, forKey: "SBMetadataPreference|\(type.description)|\(service.name)|Language")
|
UserDefaults.standard.set(language, forKey: "SBMetadataPreference|\(type.description)|\(service.name)|Language")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,11 +11,10 @@ import MP42Foundation
|
|||||||
public struct TheTVDB : MetadataService {
|
public struct TheTVDB : MetadataService {
|
||||||
|
|
||||||
private let session = TheTVDBService.sharedInstance
|
private let session = TheTVDBService.sharedInstance
|
||||||
private static let bannerPath = "https://thetvdb.com/banners/"
|
|
||||||
|
|
||||||
public var languageType: LanguageType {
|
public var languageType: LanguageType {
|
||||||
get {
|
get {
|
||||||
return .ISO
|
return .ISO_639_2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ public struct TheTVDB : MetadataService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public var defaultLanguage: String {
|
public var defaultLanguage: String {
|
||||||
return "en"
|
return "eng"
|
||||||
}
|
}
|
||||||
|
|
||||||
public var name: String {
|
public var name: String {
|
||||||
@@ -38,13 +37,8 @@ public struct TheTVDB : MetadataService {
|
|||||||
public func search(tvShow: String, language: String) -> [String] {
|
public func search(tvShow: String, language: String) -> [String] {
|
||||||
var results: Set<String> = Set()
|
var results: Set<String> = Set()
|
||||||
|
|
||||||
let series = session.fetch(series: tvShow, language: language)
|
let series = session.fetch(series: tvShow)
|
||||||
results.formUnion(series.compactMap { $0.seriesName } )
|
results.formUnion(series.compactMap { $0.translations?[language] } )
|
||||||
|
|
||||||
if language != defaultLanguage {
|
|
||||||
let englishResults = search(tvShow: tvShow, language: defaultLanguage)
|
|
||||||
results.formUnion(englishResults)
|
|
||||||
}
|
|
||||||
|
|
||||||
if results.isEmpty {
|
if results.isEmpty {
|
||||||
return TheMovieDB().search(tvShow: tvShow, language: language)
|
return TheMovieDB().search(tvShow: tvShow, language: language)
|
||||||
@@ -55,31 +49,32 @@ public struct TheTVDB : MetadataService {
|
|||||||
|
|
||||||
// MARK: - TV Series ID search
|
// MARK: - TV Series ID search
|
||||||
|
|
||||||
private func match(series: TVDBSeriesSearchResult, name: String) -> Bool {
|
private func match(series: TVDBSearchResult, name: String) -> Bool {
|
||||||
if let name = series.seriesName, name.caseInsensitiveCompare(name) == .orderedSame {
|
if let seriesName = series.name, seriesName.caseInsensitiveCompare(name) == .orderedSame {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
for alias in series.aliases {
|
if let aliases = series.aliases {
|
||||||
if alias.caseInsensitiveCompare(name) == .orderedSame {
|
for alias in aliases {
|
||||||
return true
|
if alias.caseInsensitiveCompare(name) == .orderedSame {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
private func searchIDs(seriesName: String, language: String) -> [Int] {
|
private func searchIDs(seriesName: String) -> [String] {
|
||||||
let series = session.fetch(series: seriesName, language: language)
|
let series = session.fetch(series: seriesName)
|
||||||
let sorted = series.sorted { el1, el2 -> Bool in
|
let sorted = series.sorted { el1, el2 -> Bool in
|
||||||
return el1.seriesName?.caseInsensitiveCompare(seriesName) == .orderedSame ? true : false
|
return el1.name?.caseInsensitiveCompare(seriesName) == .orderedSame ? true : false
|
||||||
}
|
}
|
||||||
let filteredSeries = sorted.filter { $0.status.isEmpty == false && match(series: $0, name: seriesName) }.map { $0.id }
|
let filteredSeries = sorted.filter { $0.status?.isEmpty == false && match(series: $0, name: seriesName) }.map { $0.tvdb_id }
|
||||||
|
|
||||||
if filteredSeries.isEmpty == false {
|
if filteredSeries.isEmpty == false {
|
||||||
return filteredSeries
|
return filteredSeries
|
||||||
}
|
} else if let firstItemsID = series.first?.tvdb_id {
|
||||||
else if let firstItemsID = series.first?.id {
|
|
||||||
return [firstItemsID]
|
return [firstItemsID]
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -89,12 +84,27 @@ public struct TheTVDB : MetadataService {
|
|||||||
|
|
||||||
// MARK: - Helpers
|
// MARK: - Helpers
|
||||||
|
|
||||||
private func cleanList(actors: [TVDBActor]) -> String {
|
private func cleanList(characters: [TVDBCharacter], type: String) -> String {
|
||||||
return actors.map { $0.name } .reduce("", { $0 + ($0.isEmpty ? "" : ", ") + $1 })
|
return characters.filter { $0.peopleType == type }
|
||||||
|
.map { $0.personName }
|
||||||
|
.reduce("", { $0 + ($0.isEmpty ? "" : ", ") + $1 })
|
||||||
}
|
}
|
||||||
|
|
||||||
private func cleanList(names: [String]) -> String {
|
private func cleanList(genres: [TVDBGenreBaseRecord]) -> String {
|
||||||
return names.reduce("", { $0 + ($0.isEmpty ? "" : ", ") + $1 })
|
return genres.map {$0.name }.reduce("", { $0 + ($0.isEmpty ? "" : ", ") + $1 })
|
||||||
|
}
|
||||||
|
|
||||||
|
private func cleanList(ratings: [TVDBContentRating], mediaKind: MediaKind) -> String? {
|
||||||
|
if let rating = ratings.filter({ $0.country == "usa" }).first {
|
||||||
|
return Ratings.shared.rating(countryCode: "USA", mediaKind: mediaKind, name: rating.name)?.iTunesCode
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
private func cleanList(companies: [TVDBCompany]) -> String {
|
||||||
|
return companies
|
||||||
|
.map { $0.name }
|
||||||
|
.reduce("", { $0 + ($0.isEmpty ? "" : ", ") + $1 })
|
||||||
}
|
}
|
||||||
|
|
||||||
private func areInIncreasingOrder(ep1: MetadataResult, ep2: MetadataResult) -> Bool {
|
private func areInIncreasingOrder(ep1: MetadataResult, ep2: MetadataResult) -> Bool {
|
||||||
@@ -112,37 +122,127 @@ public struct TheTVDB : MetadataService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func merge(episode: TVDBEpisode, info: TVDBSeriesInfo, actors: [TVDBActor]) -> MetadataResult {
|
fileprivate func cleanArtworks(_ records: [TVDBArtworBaseRecord]) -> [Artwork] {
|
||||||
|
var artworks: [Artwork] = []
|
||||||
|
let artworkTypes = session.fetchArtworkTypes()
|
||||||
|
|
||||||
|
for artwork in records {
|
||||||
|
let url = URL(string: artwork.image)
|
||||||
|
let thumbnailURL = URL(string: artwork.thumbnail)
|
||||||
|
|
||||||
|
var type: ArtworkType?
|
||||||
|
var size: ArtworkSize = .default
|
||||||
|
|
||||||
|
let artworkType = artworkTypes.first(where: { $0.id == artwork.type })
|
||||||
|
switch (artworkType?.name, artworkType?.recordType) {
|
||||||
|
case ("Poster", "movie"):
|
||||||
|
type = .poster
|
||||||
|
case ("Background", "movie"):
|
||||||
|
type = .backdrop
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (artworkType?.width ?? 1, artworkType?.height ?? 1) {
|
||||||
|
case (let width, let height) where width == height:
|
||||||
|
size = .square
|
||||||
|
case (let width, let height) where width >= height:
|
||||||
|
size = .rectangle
|
||||||
|
case (let width, let height) where height < width:
|
||||||
|
size = .default
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if let url, let thumbnailURL, let type {
|
||||||
|
let entry = Artwork(url: url,
|
||||||
|
thumbURL: thumbnailURL,
|
||||||
|
service: self.name,
|
||||||
|
type: type,
|
||||||
|
size: size)
|
||||||
|
artworks.append(entry)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return artworks
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate func cleanArtworks(_ records: [TVDBArtworkExtendedRecord]) -> [Artwork] {
|
||||||
|
var artworks: [Artwork] = []
|
||||||
|
let artworkTypes = session.fetchArtworkTypes()
|
||||||
|
|
||||||
|
for artwork in records {
|
||||||
|
let url = URL(string: artwork.image)
|
||||||
|
let thumbnailURL = URL(string: artwork.thumbnail)
|
||||||
|
|
||||||
|
var type: ArtworkType?
|
||||||
|
var size: ArtworkSize = .default
|
||||||
|
|
||||||
|
let artworkType = artworkTypes.first(where: { $0.id == artwork.type })
|
||||||
|
switch (artworkType?.name, artworkType?.recordType) {
|
||||||
|
case ("Poster", "series"):
|
||||||
|
type = .poster
|
||||||
|
case ("Poster", "season"):
|
||||||
|
type = .season
|
||||||
|
case ("Background", "series"),
|
||||||
|
("Background", "season"):
|
||||||
|
type = .backdrop
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (artworkType?.width ?? 1, artworkType?.height ?? 1) {
|
||||||
|
case (let width, let height) where width == height:
|
||||||
|
size = .square
|
||||||
|
case (let width, let height) where width >= height:
|
||||||
|
size = .rectangle
|
||||||
|
case (let width, let height) where height < width:
|
||||||
|
size = .default
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if let url, let thumbnailURL, let type {
|
||||||
|
let entry = Artwork(url: url,
|
||||||
|
thumbURL: thumbnailURL,
|
||||||
|
service: self.name,
|
||||||
|
type: type,
|
||||||
|
size: size)
|
||||||
|
artworks.append(entry)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return artworks
|
||||||
|
}
|
||||||
|
|
||||||
|
private func merge(episode: TVDBEpisodeBaseRecord,
|
||||||
|
info: TVDBSeriesExtendedRecord,
|
||||||
|
translation: TVDBTranslation?,
|
||||||
|
episodeTranslation: TVDBTranslation?) -> MetadataResult {
|
||||||
let result = MetadataResult()
|
let result = MetadataResult()
|
||||||
|
|
||||||
result.mediaKind = .tvShow
|
result.mediaKind = .tvShow
|
||||||
|
|
||||||
// TV Show Info
|
// TV Show Info
|
||||||
result[.serviceContentID] = info.id
|
result[.serviceContentID] = info.id
|
||||||
result[.seriesName] = info.seriesName
|
result[.seriesName] = translation?.name ?? info.name
|
||||||
result[.seriesDescription] = info.overview?.trimmingWhitespacesAndNewlinews()
|
result[.seriesDescription] = (translation?.overview ?? info.overview)?.trimmingWhitespacesAndNewlinews()
|
||||||
result[.genre] = cleanList(names: info.genre)
|
result[.genre] = cleanList(genres: info.genres)
|
||||||
result[.network] = info.network
|
result[.network] = info.originalNetwork?.name
|
||||||
|
result[.rating] = cleanList(ratings: info.contentRatings, mediaKind: .tvShow)
|
||||||
|
result[.cast] = cleanList(characters: info.characters ?? [], type: "Actor")
|
||||||
|
|
||||||
// Episode Info
|
// Episode Info
|
||||||
result[.serviceEpisodeID] = episode.id
|
result[.serviceEpisodeID] = episode.id
|
||||||
result[.name] = episode.episodeName
|
result[.name] = episodeTranslation?.name ?? episode.name
|
||||||
result[.releaseDate] = episode.firstAired
|
result[.releaseDate] = episode.aired
|
||||||
result[.longDescription] = episode.overview?.trimmingWhitespacesAndNewlinews()
|
result[.longDescription] = (episodeTranslation?.overview ?? episode.overview)?.trimmingWhitespacesAndNewlinews()
|
||||||
|
result[.season] = episode.seasonNumber
|
||||||
|
result[.episodeID] = String(format: "%d%02d", episode.seasonNumber, episode.number)
|
||||||
|
result[.episodeNumber] = episode.number
|
||||||
|
result[.trackNumber] = episode.number
|
||||||
|
|
||||||
result[.season] = episode.airedSeason
|
result.remoteArtworks += cleanArtworks(info.artworks)
|
||||||
|
|
||||||
result[.episodeID] = String(format: "%d%02d", episode.airedSeason, episode.airedEpisodeNumber)
|
|
||||||
result[.episodeNumber] = episode.airedEpisodeNumber
|
|
||||||
result[.trackNumber] = episode.airedEpisodeNumber
|
|
||||||
|
|
||||||
// Rating
|
|
||||||
if let rating = info.rating, rating.count > 0 {
|
|
||||||
result[.rating] = Ratings.shared.rating(countryCode: "USA", mediaKind: .tvShow, name: rating)?.iTunesCode
|
|
||||||
}
|
|
||||||
|
|
||||||
// Actors
|
|
||||||
result[.cast] = cleanList(actors: actors)
|
|
||||||
|
|
||||||
// TheTVDB does not provide the following fields normally associated with TV shows in SBMetadataResult:
|
// TheTVDB does not provide the following fields normally associated with TV shows in SBMetadataResult:
|
||||||
// "Copyright", "Comments", "Producers", "Artist"
|
// "Copyright", "Comments", "Producers", "Artist"
|
||||||
@@ -150,14 +250,24 @@ public struct TheTVDB : MetadataService {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
private func loadEpisodes(info: TVDBSeriesInfo, actors: [TVDBActor], season: Int?, episode: Int?, language: String) -> [MetadataResult] {
|
private func loadEpisodes(info: TVDBSeriesExtendedRecord, seasonID: Int?, episodeID: Int?, language: String) -> [MetadataResult] {
|
||||||
let episodes = session.fetch(episodeForSeriesID: info.id, season: season, episode: episode, language: language)
|
let translation = session.fetch(seriesTranslation: String(info.id), language: language)
|
||||||
let filteredEpisodes = episodes.filter {
|
|
||||||
(season != nil ? $0.airedSeason == season : true) &&
|
|
||||||
(episode != nil ? $0.airedEpisodeNumber == episode : true)
|
|
||||||
}
|
|
||||||
|
|
||||||
return filteredEpisodes.map { merge(episode: $0, info: info, actors: actors) }
|
if let seasonID, let episodeID,
|
||||||
|
let episode = session.fetch(episodesForSeriesID: info.id, season: seasonID, episode: episodeID).first,
|
||||||
|
let episodeTranslation = session.fetch(episodesTranslation: episode.id, language: language) {
|
||||||
|
return [merge(episode: episode, info: info, translation: translation, episodeTranslation: episodeTranslation)]
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let episodes = session.fetch(translatedEpisodesForSeriesID: info.id, season: seasonID, episode: episodeID, language: language)
|
||||||
|
|
||||||
|
let filteredEpisodes = episodes.filter {
|
||||||
|
(seasonID != nil ? $0.seasonNumber == seasonID : true) &&
|
||||||
|
(episodeID != nil ? $0.number == episodeID : true)
|
||||||
|
}
|
||||||
|
|
||||||
|
return filteredEpisodes.map { merge(episode: $0, info: info, translation: translation, episodeTranslation: nil ) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Nil values check
|
// MARK: - Nil values check
|
||||||
@@ -213,8 +323,8 @@ public struct TheTVDB : MetadataService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func merge(info: TVDBSeriesInfo, results: [MetadataResult]) {
|
private func merge(info: TVDBSeriesExtendedRecord, results: [MetadataResult]) {
|
||||||
let name = info.seriesName
|
let name = info.name
|
||||||
for result in results {
|
for result in results {
|
||||||
result[.seriesName] = name
|
result[.seriesName] = name
|
||||||
}
|
}
|
||||||
@@ -229,52 +339,30 @@ public struct TheTVDB : MetadataService {
|
|||||||
// MARK: - TV Search
|
// MARK: - TV Search
|
||||||
|
|
||||||
public func search(tvShow: String, language: String, season: Int?, episode: Int?) -> [MetadataResult] {
|
public func search(tvShow: String, language: String, season: Int?, episode: Int?) -> [MetadataResult] {
|
||||||
let seriesIDs: [Int] = {
|
let seriesIDs: [String] = self.searchIDs(seriesName: tvShow)
|
||||||
let result = self.searchIDs(seriesName: tvShow, language: language)
|
|
||||||
if result.isEmpty {
|
|
||||||
let enResults = self.searchIDs(seriesName: tvShow, language: defaultLanguage)
|
|
||||||
if enResults.isEmpty {
|
|
||||||
let tmdb = TheMovieDB()
|
|
||||||
let tvShowsTMDB = tmdb.search(tvShow: tvShow, language: language)
|
|
||||||
if let tvShowTMDB = tvShowsTMDB.first {
|
|
||||||
return self.searchIDs(seriesName: tvShowTMDB, language: language)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return enResults
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}()
|
|
||||||
|
|
||||||
var results: [MetadataResult] = []
|
|
||||||
|
|
||||||
for id in seriesIDs {
|
for id in seriesIDs {
|
||||||
guard let info: TVDBSeriesInfo = {
|
if let info = session.fetch(seriesInfo: id) {
|
||||||
let result = session.fetch(seriesInfo: id, language: language)
|
let availableLanguage = info.overviewTranslations.first(where: { $0 == language }) ??
|
||||||
return result != nil ? result : session.fetch(seriesInfo: id, language: defaultLanguage)
|
info.overviewTranslations.first(where: { $0 == defaultLanguage }) ??
|
||||||
}()
|
info.overviewTranslations.first ?? defaultLanguage
|
||||||
else { continue }
|
|
||||||
let actors = session.fetch(actors: id, language: language)
|
|
||||||
let episodes = loadEpisodes(info: info, actors: actors, season: season, episode: episode, language: language)
|
|
||||||
|
|
||||||
let nilValues = checkMissingValues(results: episodes)
|
let episodes = loadEpisodes(info: info, seasonID: season, episodeID: episode, language: availableLanguage)
|
||||||
|
|
||||||
if language != defaultLanguage {
|
let nilValues = checkMissingValues(results: episodes)
|
||||||
if nilValues.contains(.seriesInfo),
|
|
||||||
let enInfo = session.fetch(seriesInfo: id, language: defaultLanguage) {
|
if language != defaultLanguage {
|
||||||
merge(info: enInfo, results: episodes)
|
if nilValues.contains(.episodesInfo) {
|
||||||
|
let enResults = loadEpisodes(info: info, seasonID: season, episodeID: episode, language: defaultLanguage)
|
||||||
|
merge(enResults: enResults, results: episodes)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if nilValues.contains(.episodesInfo) {
|
return episodes.sorted(by: areInIncreasingOrder)
|
||||||
let enResults = loadEpisodes(info: info, actors: actors, season: season, episode: episode, language: defaultLanguage)
|
|
||||||
merge(enResults: enResults, results: episodes)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
results.append(contentsOf: episodes.sorted(by: areInIncreasingOrder))
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return results
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Additional metadata
|
// MARK: - Additional metadata
|
||||||
@@ -306,45 +394,16 @@ public struct TheTVDB : MetadataService {
|
|||||||
return AppleTV().searchArtwork(term: name, store: store, type: .tvShow(season: season))
|
return AppleTV().searchArtwork(term: name, store: store, type: .tvShow(season: season))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func loadTVArtwork(seriesID: Int, type: ArtworkType, season: String, language: String) -> [Artwork] {
|
|
||||||
var artworks: [Artwork] = []
|
|
||||||
let images: [TVDBImage] = {
|
|
||||||
var result = session.fetch(images: seriesID, type: type, language: language)
|
|
||||||
if result.count == 0 || language != defaultLanguage {
|
|
||||||
result.append(contentsOf: session.fetch(images: seriesID, type: type, language: defaultLanguage))
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}()
|
|
||||||
|
|
||||||
for image in images {
|
|
||||||
guard let fileURL = URL(string: TheTVDB.bannerPath + image.fileName),
|
|
||||||
let thumbURL = URL(string: TheTVDB.bannerPath + image.fileName.replacingOccurrences(of: ".jpg", with: "_t.jpg"))
|
|
||||||
else { continue }
|
|
||||||
|
|
||||||
var selected = true
|
|
||||||
|
|
||||||
if type == .season, let subKey = image.subKey, subKey != season {
|
|
||||||
selected = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if selected {
|
|
||||||
artworks.append(Artwork(url: fileURL, thumbURL: image.thumbnail.isEmpty ? fileURL : thumbURL, service: self.name, type: type, size: .standard))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return artworks
|
|
||||||
}
|
|
||||||
|
|
||||||
public func loadTVMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult {
|
public func loadTVMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult {
|
||||||
guard let id = metadata[.serviceEpisodeID] as? Int else { return metadata }
|
guard let id = metadata[.serviceEpisodeID] as? Int else { return metadata }
|
||||||
guard let seriesId = metadata[.serviceContentID] as? Int else { return metadata }
|
|
||||||
|
|
||||||
var artworks: [Artwork] = []
|
var artworks: [Artwork] = []
|
||||||
|
|
||||||
if let info = session.fetch(episodeInfo: id, language: language) {
|
if let info = session.fetch(episodeInfo: id, language: language) {
|
||||||
metadata[.director] = cleanList(names: info.directors)
|
metadata[.director] = cleanList(characters: info.characters ?? [], type: "Director")
|
||||||
metadata[.screenwriters] = cleanList(names: info.writers)
|
metadata[.screenwriters] = cleanList(characters: info.characters ?? [], type: "Writer")
|
||||||
|
|
||||||
let guests = cleanList(names: info.guestStars)
|
let guests = cleanList(characters: info.characters ?? [], type: "Guest Star")
|
||||||
if let actors = metadata[.cast] as? String {
|
if let actors = metadata[.cast] as? String {
|
||||||
if actors.count > 0 && guests.count > 0 {
|
if actors.count > 0 && guests.count > 0 {
|
||||||
metadata[.cast] = actors + ", " + guests
|
metadata[.cast] = actors + ", " + guests
|
||||||
@@ -353,14 +412,14 @@ public struct TheTVDB : MetadataService {
|
|||||||
metadata[.cast] = guests
|
metadata[.cast] = guests
|
||||||
}
|
}
|
||||||
|
|
||||||
if let filename = info.filename, let url = URL(string: TheTVDB.bannerPath + filename) {
|
if let path = info.image, let url = URL(string: path) {
|
||||||
artworks.append(Artwork(url: url, thumbURL: url, service: self.name, type: .episode, size: .rectangle))
|
artworks.append(Artwork(url: url, thumbURL: url, service: self.name, type: .episode, size: .rectangle))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get additionals images
|
// Get additionals images
|
||||||
if let season = metadata[.season] as? Int {
|
if ((metadata[.season] as? Int) != nil) {
|
||||||
var iTunesImage = [Artwork](), appleTV = [Artwork](), squareTVArt = [Artwork](), seasonImages = [Artwork](), posterImages = [Artwork]()
|
var iTunesImage = [Artwork](), appleTV = [Artwork](), squareTVArt = [Artwork]()
|
||||||
let group = DispatchGroup()
|
let group = DispatchGroup()
|
||||||
DispatchQueue.global().async(group: group) {
|
DispatchQueue.global().async(group: group) {
|
||||||
iTunesImage = self.loadiTunesArtwork(metadata)
|
iTunesImage = self.loadiTunesArtwork(metadata)
|
||||||
@@ -371,33 +430,83 @@ public struct TheTVDB : MetadataService {
|
|||||||
DispatchQueue.global().async(group: group) {
|
DispatchQueue.global().async(group: group) {
|
||||||
appleTV = self.loadAppleTVArtwork(metadata)
|
appleTV = self.loadAppleTVArtwork(metadata)
|
||||||
}
|
}
|
||||||
DispatchQueue.global().async(group: group) {
|
|
||||||
seasonImages = self.loadTVArtwork(seriesID: seriesId, type: .season, season: String(season), language: language)
|
|
||||||
}
|
|
||||||
DispatchQueue.global().async(group: group) {
|
|
||||||
posterImages = self.loadTVArtwork(seriesID: seriesId, type: .poster, season: String(season), language: language)
|
|
||||||
}
|
|
||||||
group.wait()
|
group.wait()
|
||||||
|
|
||||||
artworks.insert(contentsOf: iTunesImage, at: 0)
|
artworks.insert(contentsOf: iTunesImage, at: 0)
|
||||||
artworks.insert(contentsOf: squareTVArt, at: 0)
|
artworks.insert(contentsOf: squareTVArt, at: 0)
|
||||||
artworks.insert(contentsOf: appleTV, at: 0)
|
artworks.insert(contentsOf: appleTV, at: 0)
|
||||||
artworks.append(contentsOf: seasonImages)
|
|
||||||
artworks.append(contentsOf: posterImages)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
metadata.remoteArtworks.insert(contentsOf: artworks, at: 0)
|
||||||
|
|
||||||
|
return metadata
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Movie search
|
||||||
|
|
||||||
|
private func metadata(forMoviePartialResult result: TVDBSearchResult, language: String?) -> MetadataResult {
|
||||||
|
let metadata = MetadataResult()
|
||||||
|
|
||||||
|
metadata.mediaKind = .movie
|
||||||
|
|
||||||
|
metadata[.serviceContentID] = result.tvdb_id
|
||||||
|
metadata[.name] = result.translations?[language ?? defaultLanguage] ?? result.name
|
||||||
|
metadata[.releaseDate] = result.first_air_time
|
||||||
|
metadata[.longDescription] = (result.overviews?[language ?? defaultLanguage] ?? result.overview)?.trimmingWhitespacesAndNewlinews()
|
||||||
|
metadata[.studio] = result.studios?.first
|
||||||
|
|
||||||
|
return metadata
|
||||||
|
}
|
||||||
|
|
||||||
|
public func search(movie: String, language: String) -> [MetadataResult] {
|
||||||
|
let results = session.fetch(movie: movie)
|
||||||
|
return results.map { metadata(forMoviePartialResult: $0, language: language) }
|
||||||
|
}
|
||||||
|
|
||||||
|
public func loadMovieMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult {
|
||||||
|
guard let movieID = metadata[.serviceContentID] as? String,
|
||||||
|
let info = session.fetch(movieInfo: movieID)
|
||||||
|
else { return metadata }
|
||||||
|
|
||||||
|
metadata[.releaseDate] = info.first_release?.date
|
||||||
|
metadata[.rating] = cleanList(ratings: info.contentRatings ?? [], mediaKind: .movie)
|
||||||
|
metadata[.genre] = cleanList(genres: info.genres)
|
||||||
|
metadata[.studio] = cleanList(companies: info.companies?.studio ?? [])
|
||||||
|
metadata[.cast] = cleanList(characters: info.characters ?? [], type: "Actor")
|
||||||
|
metadata[.director] = cleanList(characters: info.characters ?? [], type: "Director")
|
||||||
|
metadata[.screenwriters] = cleanList(characters: info.characters ?? [], type: "Writer")
|
||||||
|
metadata[.producers] = cleanList(characters: info.characters ?? [], type: "Producer")
|
||||||
|
metadata[.executiveProducer] = cleanList(characters: info.characters ?? [], type: "Executive Producer")
|
||||||
|
metadata[.composer] = cleanList(characters: info.characters ?? [], type: "Original Music Composer")
|
||||||
|
|
||||||
|
metadata[.serviceContentID] = info.id
|
||||||
|
|
||||||
|
var artworks: [Artwork] = []
|
||||||
|
artworks += cleanArtworks(info.artworks)
|
||||||
|
|
||||||
|
var iTunesImage = [Artwork](), appleTV = [Artwork]()
|
||||||
|
let group = DispatchGroup()
|
||||||
|
let queue = DispatchQueue.global()
|
||||||
|
|
||||||
|
queue.async(group: group) {
|
||||||
|
// add iTunes artwork
|
||||||
|
if let iTunesMetadata = iTunesStore.quickiTunesSearch(movieName: info.name) {
|
||||||
|
iTunesImage = iTunesMetadata.remoteArtworks
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
queue.async(group: group) {
|
||||||
|
if let store = iTunesStore.Store(language: "USA (English)") {
|
||||||
|
appleTV = AppleTV().searchArtwork(term: info.name, store: store, type: .movie)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
group.wait()
|
||||||
|
|
||||||
|
artworks.insert(contentsOf: iTunesImage, at: 0)
|
||||||
|
artworks.insert(contentsOf: appleTV, at: 0)
|
||||||
|
|
||||||
metadata.remoteArtworks = artworks
|
metadata.remoteArtworks = artworks
|
||||||
|
|
||||||
return metadata
|
return metadata
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Unimplemented movie search
|
|
||||||
|
|
||||||
public func search(movie: String, language: String) -> [MetadataResult] {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
public func loadMovieMetadata(_ metadata: MetadataResult, language: String) -> MetadataResult {
|
|
||||||
return metadata
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -8,117 +8,377 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import MP42Foundation
|
import MP42Foundation
|
||||||
|
|
||||||
public struct TVDBSeriesSearchResult : Codable {
|
struct TVDBLanguage : Codable {
|
||||||
public let aliases: [String]
|
let id: String
|
||||||
public let banner: String?
|
let name: String
|
||||||
public let firstAired: String?
|
let nativeName: String
|
||||||
public let id: Int
|
let shortCode: String?
|
||||||
public let imdbId: String?
|
|
||||||
public let network: String?
|
|
||||||
public let overview: String?
|
|
||||||
public let seriesName: String?
|
|
||||||
public let status: String
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TVDBSeriesInfo : Codable {
|
public struct TVDBAlias : Codable {
|
||||||
public let added: String?
|
public let language: String
|
||||||
public let airsDayOfWeek: String?
|
|
||||||
public let airsTime: String?
|
|
||||||
public let firstAired: String?
|
|
||||||
|
|
||||||
public let aliases: [String]
|
|
||||||
public let banner: String?
|
|
||||||
public let genre: [String]
|
|
||||||
|
|
||||||
public let id: Int
|
|
||||||
public let imdbId: String?
|
|
||||||
|
|
||||||
public let lastUpdated: Int?
|
|
||||||
|
|
||||||
public let network: String?
|
|
||||||
public let networkId: String?
|
|
||||||
|
|
||||||
public let rating: String?
|
|
||||||
public let runtime: String?
|
|
||||||
|
|
||||||
public let seriesId: String
|
|
||||||
public let seriesName: String
|
|
||||||
public let overview: String?
|
|
||||||
|
|
||||||
//public let siteRating: Double?
|
|
||||||
//public let siteRatingCount: Double?
|
|
||||||
|
|
||||||
//public let status: String?
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct TVDBActor : Codable {
|
|
||||||
public let id: Int
|
|
||||||
public let name: String
|
public let name: String
|
||||||
//public let role: String?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TVDBRatingInfo : Codable {
|
public class TVDBArtworkType : Codable {
|
||||||
public let average: Double
|
public let id: Int64
|
||||||
public let count: Int
|
public let name: String
|
||||||
|
public let imageFormat: String
|
||||||
|
public let width: Int64
|
||||||
|
public let height: Int64
|
||||||
|
public let thumbHeight: Int64
|
||||||
|
public let thumbWidth: Int64
|
||||||
|
public let recordType: String
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TVDBImage : Codable {
|
public class TVDBArtworkStatus : Codable {
|
||||||
public let fileName: String
|
let id: Int64
|
||||||
public let keyType: String
|
let name: String?
|
||||||
public let ratingsInfo: TVDBRatingInfo?
|
}
|
||||||
public let resolution: String?
|
|
||||||
public let subKey: String?
|
public class TVDBArtworBaseRecord : Codable {
|
||||||
|
public let height: Int64
|
||||||
|
public let id: Int64
|
||||||
|
public let image: String
|
||||||
|
public let includesText: Bool
|
||||||
|
public let language: String?
|
||||||
|
public let score: Double?
|
||||||
public let thumbnail: String
|
public let thumbnail: String
|
||||||
|
public let type: Int64
|
||||||
|
public let width: Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TVDBEpisode : Codable {
|
public class TVDBArtworkExtendedRecord : Codable {
|
||||||
|
public let episodeId: Int?
|
||||||
|
public let height: Int64
|
||||||
|
public let id: Int64
|
||||||
|
public let image: String
|
||||||
|
public let includesText: Bool
|
||||||
|
public let language: String?
|
||||||
|
public let movieId: Int?
|
||||||
|
public let networkId: Int?
|
||||||
|
public let peopleId: Int?
|
||||||
|
public let score: Double
|
||||||
|
public let seasonId: Int?
|
||||||
|
public let seriesId: Int?
|
||||||
|
public let seriesPeopleId: Int?
|
||||||
|
public let status: TVDBArtworkStatus
|
||||||
|
// public let tagOptions: TVDBTagOptions
|
||||||
|
public let thumbnail: String
|
||||||
|
public let thumbnailHeight: Int64
|
||||||
|
public let thumbnailWidth: Int64
|
||||||
|
public let type: Int64
|
||||||
|
public let updatedAt: Int64
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TVDBGenreBaseRecord : Codable {
|
||||||
|
public let id: Int64
|
||||||
|
public let name: String
|
||||||
|
public let slug: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBCharacter : Codable {
|
||||||
|
public let aliases: [TVDBAlias]?
|
||||||
|
// public let episode: TVDBRecordInfo
|
||||||
|
public let episodeId: Int?
|
||||||
|
public let id: Int
|
||||||
|
public let image: String?
|
||||||
|
public let isFeatured: Bool?
|
||||||
|
public let movieId: Int?
|
||||||
|
public let name: String?
|
||||||
|
public let nameTranslations: [String]?
|
||||||
|
public let overviewTranslations: [String]?
|
||||||
|
public let peopleId: Int
|
||||||
|
public let personImgURL: String?
|
||||||
|
public let peopleType: String
|
||||||
|
public let seriesId: Int?
|
||||||
|
// public let series: TVDBRecordInfo
|
||||||
|
public let sort: Int
|
||||||
|
// public let tagOptions: TVDBTagOptions
|
||||||
|
public let type: Int
|
||||||
|
public let url: String
|
||||||
|
public let personName: String
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBParentCompany : Codable {
|
||||||
|
public let id: Int?
|
||||||
|
public let name: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBCompany : Codable {
|
||||||
|
public let activeDate: String?
|
||||||
|
public let aliases: [TVDBAlias]?
|
||||||
|
public let country: String?
|
||||||
|
public let id: Int64
|
||||||
|
public let inactiveDate: String?
|
||||||
|
public let name: String
|
||||||
|
public let nameTranslations: [String]?
|
||||||
|
public let overviewTranslations: [String]?
|
||||||
|
public let primaryCompanyType: Int64?
|
||||||
|
public let slug: String?
|
||||||
|
public let parentCompany: TVDBParentCompany?
|
||||||
|
// public let tagOptions: TVDBTagOptions
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBCompanies : Codable {
|
||||||
|
public let studio: [TVDBCompany]?
|
||||||
|
public let network: [TVDBCompany]?
|
||||||
|
public let production: [TVDBCompany]?
|
||||||
|
public let distributor: [TVDBCompany]?
|
||||||
|
public let special_effects: [TVDBCompany]?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBStudioBaseRecord : Codable {
|
||||||
|
public let id: Int64
|
||||||
|
public let name: String
|
||||||
|
public let parentStudio: Int?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBContentRating : Codable {
|
||||||
|
public let id: Int64
|
||||||
|
public let name: String
|
||||||
|
public let description: String
|
||||||
|
public let country: String
|
||||||
|
public let contentType: String
|
||||||
|
public let order: Int
|
||||||
|
public let fullName: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBRemoteId : Codable {
|
||||||
|
public let id: String
|
||||||
|
public let type: Int64
|
||||||
|
public let sourceName: String
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBTranslation : Codable {
|
||||||
|
public let aliases: [String]?
|
||||||
|
public let isAlias: Bool?
|
||||||
|
public let isPrimary: Bool?
|
||||||
|
public let language: String
|
||||||
|
public let name: String?
|
||||||
|
public let overview: String?
|
||||||
|
public let tagline: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBTranslationExtended : Codable {
|
||||||
|
public let nameTranslations: [TVDBTranslation]?
|
||||||
|
public let overviewTranslations: [TVDBTranslation]?
|
||||||
|
public let alias: [String]?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBRelease : Codable {
|
||||||
|
public let country: String
|
||||||
|
public let date: String
|
||||||
|
public let detail: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TVDBStatus : Codable {
|
||||||
|
public let id: Int64?
|
||||||
|
public let keepUpdated: Bool
|
||||||
|
public let name: String
|
||||||
|
public let recordType: String
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBSearchResult : Codable {
|
||||||
|
public let aliases: [String]?
|
||||||
|
public let companies: [String]?
|
||||||
|
public let companyType: String?
|
||||||
|
public let country: String?
|
||||||
|
public let directory: String?
|
||||||
|
public let first_air_time: String?
|
||||||
|
public let genres: [String]?
|
||||||
|
public let id: String
|
||||||
|
public let image_url: String?
|
||||||
|
public let name: String?
|
||||||
|
public let is_official: Bool?
|
||||||
|
public let name_translated: String?
|
||||||
|
public let network: String?
|
||||||
|
public let objectID: String?
|
||||||
|
public let officialList: String?
|
||||||
|
public let overview: String?
|
||||||
|
public let overviews: Dictionary<String, String>?
|
||||||
|
public let overview_translated: [String]?
|
||||||
|
public let poster: String?
|
||||||
|
public let posters: [String]?
|
||||||
|
public let primary_language: String?
|
||||||
|
public let status: String?
|
||||||
|
public let slug: String?
|
||||||
|
public let studios: [String]?
|
||||||
|
public let title: String?
|
||||||
|
public let thumbnail: String?
|
||||||
|
public let translations: Dictionary<String, String>?
|
||||||
|
public let translationsWithLang: [String]?
|
||||||
|
public let tvdb_id: String
|
||||||
|
public let type: String?
|
||||||
|
public let year: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBMovieExtendedRecord : Codable {
|
||||||
|
public let aliases: [TVDBAlias]?
|
||||||
|
public let artworks: [TVDBArtworBaseRecord]
|
||||||
|
public let audioLanguages: [String]?
|
||||||
|
// public let awards: [TVDBAwardBaseRecord]
|
||||||
|
public let boxOffice: String?
|
||||||
|
public let boxOfficeUS: String?
|
||||||
|
public let budget: String?
|
||||||
|
public let characters: [TVDBCharacter]?
|
||||||
|
public let companies: TVDBCompanies?
|
||||||
|
public let contentRatings: [TVDBContentRating]?
|
||||||
|
public let first_release: TVDBRelease?
|
||||||
|
public let genres: [TVDBGenreBaseRecord]
|
||||||
|
public let id: Int64
|
||||||
|
public let image: String?
|
||||||
|
// public let inspirations: [TVDBInspiration]?
|
||||||
|
public let lastUpdated: String
|
||||||
|
// public let lists: TVDBList
|
||||||
|
public let name: String
|
||||||
|
public let nameTranslations: [String]
|
||||||
|
public let originalCountry: String?
|
||||||
|
public let originalLanguage: String?
|
||||||
|
public let overviewTranslations: [String]?
|
||||||
|
// public let production_countries: [TVDBProductionCountry]?
|
||||||
|
public let releases: [TVDBRelease]?
|
||||||
|
public let remoteIds: [TVDBRemoteId]
|
||||||
|
public let runtime: Int?
|
||||||
|
public let score: Double?
|
||||||
|
public let slug: String?
|
||||||
|
public let spoken_languages: [String]?
|
||||||
|
public let studios: [TVDBStudioBaseRecord]?
|
||||||
|
public let subtitleLanguages: [String]?
|
||||||
|
// public let tagOptions: [TVDBTagOption]
|
||||||
|
// public let trailers: [TVDBTrailer]
|
||||||
|
public let translations: TVDBTranslationExtended?
|
||||||
|
public let year: String
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBEpisodeBaseRecord : Codable {
|
||||||
public let absoluteNumber: Double?
|
public let absoluteNumber: Double?
|
||||||
public let airedEpisodeNumber: Int
|
public let aired: String?
|
||||||
public let airedSeason: Int
|
public let airsBeforeEpisode: Int?
|
||||||
|
public let airsBeforeSeason: Int?
|
||||||
//public let dvdEpisodeNumber: Double?
|
public let finaleType: String?
|
||||||
//public let dvdSeason: Double?
|
|
||||||
|
|
||||||
public let episodeName: String?
|
|
||||||
public let firstAired: String?
|
|
||||||
|
|
||||||
public let id: Int
|
public let id: Int
|
||||||
|
public let image: String?
|
||||||
|
public let imageType: Int?
|
||||||
|
public let isMovie: Int
|
||||||
|
public let lastUpdated: String
|
||||||
|
public let name: String?
|
||||||
|
public let nameTranslations: [String]?
|
||||||
|
public let number: Int
|
||||||
public let overview: String?
|
public let overview: String?
|
||||||
|
public let overviewTranslations: [String]?
|
||||||
|
public let runtime: Int?
|
||||||
|
public let seasonNumber: Int
|
||||||
|
// public let seasons: []?
|
||||||
|
public let seriesId: Int?
|
||||||
|
public let year: String?
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TVDBEpisodeInfo : Codable {
|
public struct TVDBEpisodeExtendedRecord : Codable {
|
||||||
public let absoluteNumber: Int?
|
public let aired: String?
|
||||||
public let airedEpisodeNumber: Int?
|
public let airsAfterSeason: Int?
|
||||||
public let airedSeason: Int?
|
public let airsBeforeEpisode: Int?
|
||||||
|
public let airsBeforeSeason: Int?
|
||||||
public let directors: [String]
|
// public let awards: [TVDBAwardBaseRecord]
|
||||||
|
public let characters: [TVDBCharacter]?
|
||||||
//public let dvdEpisodeNumber: Double?
|
public let companies: [TVDBCompany]?
|
||||||
//public let dvdSeason: Double?
|
public let contentRatings: [TVDBContentRating]
|
||||||
|
public let finaleType: String?
|
||||||
public let episodeName: String?
|
public let id: Int64
|
||||||
public let filename: String?
|
public let image: String?
|
||||||
public let firstAired: String?
|
public let imageType: Int?
|
||||||
|
public let isMovie: Int64
|
||||||
public let guestStars: [String]
|
public let lastUpdated: String
|
||||||
|
public let linkedMovie: Int?
|
||||||
public let id: Int
|
public let name: String
|
||||||
|
public let nameTranslations: [String]
|
||||||
|
public let networks: [TVDBCompany]?
|
||||||
|
// public let nominations: [TVDBAwardNomineeBaseRecorde]
|
||||||
|
public let number: Int
|
||||||
public let overview: String?
|
public let overview: String?
|
||||||
|
public let overviewTranslations: [String]?
|
||||||
public let writers: [String]
|
public let productionCode: String?
|
||||||
|
public let remoteIds: [TVDBRemoteId]
|
||||||
|
public let runtime: Int?
|
||||||
|
public let seasonNumber: Int
|
||||||
|
// public let season: []
|
||||||
|
public let seriesId: Int64
|
||||||
|
public let studios: [TVDBCompany]?
|
||||||
|
// public let tagOptions: [TVDBTagOption]
|
||||||
|
// public let trailers: [TVDBTrailer]
|
||||||
|
public let translations: TVDBTranslationExtended?
|
||||||
|
public let year: String
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension ArtworkType {
|
public struct TVDBSeriesBaseRecord : Codable {
|
||||||
var theTVDBName: String {
|
public let aliases: [TVDBAlias]?
|
||||||
switch self {
|
public let averageRuntime: Int?
|
||||||
case .poster:
|
public let defaultSeasonType: Int64?
|
||||||
return "poster"
|
public let episodes: [TVDBEpisodeBaseRecord]?
|
||||||
case .season:
|
public let firstAired: String?
|
||||||
return "season"
|
public let id: Int
|
||||||
default:
|
public let image: String
|
||||||
return "poster"
|
public let isOrderRandomized: Bool
|
||||||
}
|
public let lastAired: String
|
||||||
}
|
public let lastUpdated: String
|
||||||
|
public let name: String
|
||||||
|
public let nameTranslations: [String]
|
||||||
|
public let nextAired: String
|
||||||
|
public let originalCountry: String
|
||||||
|
public let originalLanguage: String
|
||||||
|
public let overview: String?
|
||||||
|
public let overviewTranslations: [String]?
|
||||||
|
public let score: Int?
|
||||||
|
public let slug: String?
|
||||||
|
// public let status: Status
|
||||||
|
public let year: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBSeriesEpisodes : Codable {
|
||||||
|
public let series: TVDBSeriesBaseRecord
|
||||||
|
public let episodes: [TVDBEpisodeBaseRecord]
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TVDBSeriesExtendedRecord : Codable {
|
||||||
|
public let abbreviation: String?
|
||||||
|
// public let airsDays: TVDBSeriesAirsDays
|
||||||
|
public let aliases: [TVDBAlias]?
|
||||||
|
public let artworks: [TVDBArtworkExtendedRecord]
|
||||||
|
public let averageRuntime: Int?
|
||||||
|
public let characters: [TVDBCharacter]?
|
||||||
|
public let contentRatings: [TVDBContentRating]
|
||||||
|
public let country: String?
|
||||||
|
public let defaultSeasonType: Int64?
|
||||||
|
public let episodes: [TVDBEpisodeBaseRecord]?
|
||||||
|
public let firstAired: String?
|
||||||
|
// public let lists: TVDBList
|
||||||
|
public let genres: [TVDBGenreBaseRecord]
|
||||||
|
public let id: Int
|
||||||
|
public let image: String?
|
||||||
|
public let isOrderRandomized: Bool
|
||||||
|
public let lastAired: String
|
||||||
|
public let lastUpdated: String
|
||||||
|
public let name: String
|
||||||
|
public let nameTranslations: [String]
|
||||||
|
public let companies: [TVDBCompany]?
|
||||||
|
public let nextAired: String
|
||||||
|
public let originalCountry: String
|
||||||
|
public let originalLanguage: String
|
||||||
|
public let originalNetwork: TVDBCompany?
|
||||||
|
public let overview: String?
|
||||||
|
public let latestNetwork: TVDBCompany?
|
||||||
|
public let overviewTranslations: [String]
|
||||||
|
public let remoteIds: [TVDBRemoteId]
|
||||||
|
public let score: Double
|
||||||
|
// public let seasons: [TVDBSeasonBaseRecord]
|
||||||
|
// public let seasons: [TVDBSeasonType]
|
||||||
|
public let status: TVDBStatus
|
||||||
|
public let slug: String
|
||||||
|
// public let status: Status
|
||||||
|
// public let tags: [TVDBTagOptions]
|
||||||
|
// public let trailers: [TVDBTrailer]
|
||||||
|
public let translations: TVDBTranslationExtended?
|
||||||
|
public let year: String
|
||||||
}
|
}
|
||||||
|
|
||||||
final public class TheTVDBService {
|
final public class TheTVDBService {
|
||||||
@@ -128,40 +388,26 @@ final public class TheTVDBService {
|
|||||||
private let queue: DispatchQueue
|
private let queue: DispatchQueue
|
||||||
private let tokenQueue: DispatchQueue
|
private let tokenQueue: DispatchQueue
|
||||||
|
|
||||||
private let basePath = "https://api.thetvdb.com/"
|
private static let apiKey = "7bba6aca-a2c7-42d1-9c34-ed84bb44dfc6"
|
||||||
|
private static let basePath = "https://api4.thetvdb.com/v4/"
|
||||||
|
|
||||||
private struct Languages {
|
private var savedLanguages: [String]
|
||||||
let data: [String]
|
|
||||||
let timestamp: TimeInterval
|
|
||||||
}
|
|
||||||
|
|
||||||
private var savedLanguages: Languages?
|
|
||||||
|
|
||||||
public var languages: [String] {
|
public var languages: [String] {
|
||||||
get {
|
get {
|
||||||
return ["en",
|
return queue.sync {
|
||||||
"sv",
|
let now = Date.timeIntervalSinceReferenceDate
|
||||||
"no",
|
let timestamp = UserDefaults.standard.double(forKey: "SBTheTVBDv4LanguagesArrayTimestamp")
|
||||||
"da",
|
if let languagesArray = UserDefaults.standard.object(forKey: "SBTheTVBDv4LanguagesArray") as? [String], languagesArray.isEmpty == false,
|
||||||
"fi",
|
timestamp + 60 * 60 * 24 * 30 > Date.timeIntervalSinceReferenceDate {
|
||||||
"nl",
|
savedLanguages = languagesArray
|
||||||
"de",
|
} else {
|
||||||
"it",
|
savedLanguages = fetchLanguages()
|
||||||
"es",
|
UserDefaults.standard.set(savedLanguages, forKey: "SBTheTVBDv4LanguagesArray")
|
||||||
"fr",
|
UserDefaults.standard.set(now, forKey: "SBTheTVBDv4LanguagesArrayTimestamp")
|
||||||
"pl",
|
}
|
||||||
"hu",
|
return savedLanguages
|
||||||
"el",
|
}
|
||||||
"tr",
|
|
||||||
"ru",
|
|
||||||
"he",
|
|
||||||
"ja",
|
|
||||||
"pt",
|
|
||||||
"zh",
|
|
||||||
"cs",
|
|
||||||
"sl",
|
|
||||||
"hr",
|
|
||||||
"ko"]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,6 +416,9 @@ final public class TheTVDBService {
|
|||||||
let timestamp: TimeInterval
|
let timestamp: TimeInterval
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static let tokenKey = "SBTheTVBDv4Token"
|
||||||
|
private static let tokenTimestampKey = "SBTheTVBDv4TokenTimestamp"
|
||||||
|
|
||||||
private var savedToken: Token?
|
private var savedToken: Token?
|
||||||
|
|
||||||
private var token: Token? {
|
private var token: Token? {
|
||||||
@@ -179,8 +428,8 @@ final public class TheTVDBService {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
else if let result = login() {
|
else if let result = login() {
|
||||||
UserDefaults.standard.set(result.key, forKey: "SBTheTVBDToken")
|
UserDefaults.standard.set(result.key, forKey: TheTVDBService.tokenKey)
|
||||||
UserDefaults.standard.set(result.timestamp, forKey: "SBTheTVBDTokenTimestamp")
|
UserDefaults.standard.set(result.timestamp, forKey: TheTVDBService.tokenTimestampKey)
|
||||||
savedToken = result
|
savedToken = result
|
||||||
return result
|
return result
|
||||||
} else {
|
} else {
|
||||||
@@ -193,24 +442,27 @@ final public class TheTVDBService {
|
|||||||
private init() {
|
private init() {
|
||||||
queue = DispatchQueue(label: "org.subler.TheTVDBQueue")
|
queue = DispatchQueue(label: "org.subler.TheTVDBQueue")
|
||||||
tokenQueue = DispatchQueue(label: "org.subler.TheTVDBTokenQueue")
|
tokenQueue = DispatchQueue(label: "org.subler.TheTVDBTokenQueue")
|
||||||
|
savedLanguages = []
|
||||||
|
|
||||||
if let languagesArray = UserDefaults.standard.object(forKey: "SBTheTVBDLanguagesArray") as? [String] {
|
if let tokenKey = UserDefaults.standard.string(forKey: TheTVDBService.tokenKey) {
|
||||||
let timestamp = UserDefaults.standard.double(forKey: "SBTheTVBDLanguagesArrayTimestamp")
|
let timestamp = UserDefaults.standard.double(forKey: TheTVDBService.tokenTimestampKey)
|
||||||
if timestamp + 60 * 60 * 24 * 30 > Date.timeIntervalSinceReferenceDate {
|
|
||||||
savedLanguages = Languages(data: languagesArray, timestamp: timestamp)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if let tokenKey = UserDefaults.standard.string(forKey: "SBTheTVBDToken") {
|
|
||||||
let timestamp = UserDefaults.standard.double(forKey: "SBTheTVBDTokenTimestamp")
|
|
||||||
if timestamp + 60 * 60 * 4 > Date.timeIntervalSinceReferenceDate {
|
if timestamp + 60 * 60 * 4 > Date.timeIntervalSinceReferenceDate {
|
||||||
savedToken = Token(key: tokenKey, timestamp: timestamp)
|
savedToken = Token(key: tokenKey, timestamp: timestamp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private struct Links : Codable {
|
||||||
|
let next: String?
|
||||||
|
let page_size: Int
|
||||||
|
let prev: String?
|
||||||
|
let total_items: Int
|
||||||
|
}
|
||||||
|
|
||||||
private struct Wrapper<T> : Codable where T : Codable {
|
private struct Wrapper<T> : Codable where T : Codable {
|
||||||
let data: T
|
let data: T
|
||||||
|
let links: Links?
|
||||||
|
let status: String
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Login
|
// MARK: - Login
|
||||||
@@ -224,119 +476,188 @@ final public class TheTVDBService {
|
|||||||
let token: String
|
let token: String
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let apikey = try? JSONEncoder().encode(ApiKey(apikey: "3498815BE9484A62")) else { return nil }
|
guard let apikey = try? JSONEncoder().encode(ApiKey(apikey: TheTVDBService.apiKey)) else { return nil }
|
||||||
guard let url = URL(string: "https://api.thetvdb.com/login") else { return nil }
|
guard let url = URL(string: TheTVDBService.basePath + "login") else { return nil }
|
||||||
|
|
||||||
let header = ["Content-Type" : "application/json",
|
let header = ["Content-Type" : "application/json"]
|
||||||
"Accept" : "application/vnd.thetvdb.v3"]
|
|
||||||
|
|
||||||
guard let response = URLSession.data(from: url,
|
guard let response = URLSession.data(from: url,
|
||||||
httpMethod: "POST",
|
httpMethod: "POST",
|
||||||
httpBody:apikey,
|
httpBody:apikey,
|
||||||
header: header) else { return nil }
|
header: header) else { return nil }
|
||||||
|
|
||||||
guard let responseToken = try? JSONDecoder().decode(TokenWrapper.self, from: response) else { return nil }
|
do {
|
||||||
return Token(key: responseToken.token, timestamp: Date.timeIntervalSinceReferenceDate)
|
let responseToken = try JSONDecoder().decode(Wrapper<TokenWrapper>.self, from: response)
|
||||||
|
return Token(key: responseToken.data.token, timestamp: Date.timeIntervalSinceReferenceDate)
|
||||||
|
} catch {
|
||||||
|
print("\(error)")
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Languages
|
// MARK: - Languages
|
||||||
|
|
||||||
private func fetchLanguages() -> Languages? {
|
private func fetchLanguages() -> [String] {
|
||||||
struct Language: Codable {
|
|
||||||
let abbreviation: String
|
guard let url = URL(string: "\(TheTVDBService.basePath)languages"),
|
||||||
let englishName: String
|
let result = sendJSONRequest(url: url, type: Wrapper<[TVDBLanguage]>.self)
|
||||||
let id: Int
|
else { return [] }
|
||||||
let name: String
|
|
||||||
|
return result.data.map { $0.id }
|
||||||
|
}
|
||||||
|
|
||||||
|
private var artworkTypes: [TVDBArtworkType]?
|
||||||
|
|
||||||
|
public func fetchArtworkTypes() -> [TVDBArtworkType] {
|
||||||
|
if let artworkTypes {
|
||||||
|
return artworkTypes
|
||||||
|
} else {
|
||||||
|
guard let url = URL(string: "\(TheTVDBService.basePath)artwork/types"),
|
||||||
|
let result = sendJSONRequest(url: url, type: Wrapper<[TVDBArtworkType]>.self)
|
||||||
|
else { return [] }
|
||||||
|
|
||||||
|
artworkTypes = result.data
|
||||||
|
return result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let url = URL(string: "\(basePath)languages"),
|
|
||||||
let result = sendJSONRequest(url: url, language: "en", type: Wrapper<[Language]>.self)
|
|
||||||
else { return nil }
|
|
||||||
|
|
||||||
let langManager = MP42Languages.defaultManager
|
|
||||||
return Languages(data: result.data.map { langManager.extendedTag(forISO_639_1:$0.abbreviation) }, timestamp: Date.timeIntervalSinceReferenceDate)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Data request
|
// MARK: - Data request
|
||||||
|
|
||||||
private func sendRequest(url: URL, language: String) -> Data? {
|
private func sendRequest(url: URL) -> Data? {
|
||||||
guard let token = self.token else { return nil }
|
guard let token = self.token else { return nil }
|
||||||
|
|
||||||
let header = ["Authorization": "Bearer \(token.key)",
|
let header = ["Authorization": "Bearer \(token.key)",
|
||||||
"Content-Type" : "application/json",
|
"accept" : "application/json"]
|
||||||
"Accept" : "application/vnd.thetvdb.v3",
|
|
||||||
"Accept-Language" : language]
|
|
||||||
|
|
||||||
return URLSession.data(from: url, header: header)
|
return URLSession.data(from: url, header: header)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sendJSONRequest<T>(url: URL, language: String, type: T.Type) -> T? where T : Decodable {
|
private func sendJSONRequest<T>(url: URL, type: T.Type) -> T? where T : Decodable {
|
||||||
guard let data = sendRequest(url: url, language: language),
|
guard let data = sendRequest(url: url) else { return nil }
|
||||||
let result = try? JSONDecoder().decode(type, from: data)
|
|
||||||
else { return nil }
|
|
||||||
|
|
||||||
return result
|
// let response = String(data: data, encoding: .utf8)
|
||||||
|
// if let response {
|
||||||
|
// print(response)
|
||||||
|
// }
|
||||||
|
|
||||||
|
do {
|
||||||
|
return try JSONDecoder().decode(type, from: data)
|
||||||
|
} catch {
|
||||||
|
print(error)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Service calls
|
// MARK: - Service calls
|
||||||
|
|
||||||
public func fetch(series: String, language: String) -> [TVDBSeriesSearchResult] {
|
public func fetch(movie: String) -> [TVDBSearchResult] {
|
||||||
// Remove + because it breaks search
|
// Remove + because it breaks search
|
||||||
let encodedName = series.replacingOccurrences(of: "+", with: "").replacingOccurrences(of: "*", with: "-").urlEncoded()
|
let encodedName = movie.replacingOccurrences(of: "+", with: "").replacingOccurrences(of: "*", with: "-").urlEncoded()
|
||||||
|
|
||||||
guard let url = URL(string: "\(basePath)search/series?name=\(encodedName)"),
|
guard let url = URL(string: "\(TheTVDBService.basePath)search?query=\(encodedName)&type=movie"),
|
||||||
let result = sendJSONRequest(url: url, language: language, type: Wrapper<[TVDBSeriesSearchResult]>.self)
|
let result = sendJSONRequest(url: url, type: Wrapper<[TVDBSearchResult]>.self)
|
||||||
else { return [] }
|
else { return [] }
|
||||||
|
|
||||||
return result.data
|
return result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
public func fetch(seriesInfo seriesID: Int, language: String) -> TVDBSeriesInfo? {
|
public func fetch(movieInfo movieID: String) -> TVDBMovieExtendedRecord? {
|
||||||
guard let url = URL(string: "\(basePath)series/\(seriesID)"),
|
guard let url = URL(string: "\(TheTVDBService.basePath)movies/\(movieID)/extended"),
|
||||||
let result = sendJSONRequest(url: url, language: language, type: Wrapper<TVDBSeriesInfo>.self)
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBMovieExtendedRecord>.self)
|
||||||
else { return nil }
|
else { return nil }
|
||||||
|
|
||||||
return result.data
|
return result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
public func fetch(actors seriesID: Int, language: String) -> [TVDBActor] {
|
public func fetch(movieTranslation movieID: String, language: String) -> TVDBTranslation? {
|
||||||
guard let url = URL(string: "\(basePath)series/\(seriesID)/actors"),
|
guard let url = URL(string: "\(TheTVDBService.basePath)movies/\(movieID)/translations/\(language)"),
|
||||||
let result = sendJSONRequest(url: url, language: language, type: Wrapper<[TVDBActor]>.self)
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBTranslation>.self)
|
||||||
|
else { return nil }
|
||||||
|
|
||||||
|
return result.data
|
||||||
|
}
|
||||||
|
|
||||||
|
public func fetch(series: String) -> [TVDBSearchResult] {
|
||||||
|
// Remove + because it breaks search
|
||||||
|
let encodedName = series.replacingOccurrences(of: "+", with: "").replacingOccurrences(of: "*", with: "-").urlEncoded()
|
||||||
|
|
||||||
|
guard let url = URL(string: "\(TheTVDBService.basePath)search?query=\(encodedName)&type=series"),
|
||||||
|
let result = sendJSONRequest(url: url, type: Wrapper<[TVDBSearchResult]>.self)
|
||||||
else { return [] }
|
else { return [] }
|
||||||
|
|
||||||
return result.data
|
return result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
public func fetch(images seriesID: Int, type: ArtworkType, language: String) -> [TVDBImage] {
|
public func fetch(seriesInfo seriesID: String) -> TVDBSeriesExtendedRecord? {
|
||||||
guard let url = URL(string: "\(basePath)series/\(seriesID)/images/query?keyType=\(type.theTVDBName)"),
|
guard let url = URL(string: "\(TheTVDBService.basePath)series/\(seriesID)/extended"),
|
||||||
let result = sendJSONRequest(url: url, language: language, type: Wrapper<[TVDBImage]>.self)
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBSeriesExtendedRecord>.self)
|
||||||
else { return [] }
|
else { return nil }
|
||||||
|
|
||||||
return result.data
|
return result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
private func episodesURL(seriesID: Int, season: Int?, episode: Int?) -> URL? {
|
public func fetch(seriesTranslation seriesID: String, language: String) -> TVDBTranslation? {
|
||||||
|
guard let url = URL(string: "\(TheTVDBService.basePath)series/\(seriesID)/translations/\(language)"),
|
||||||
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBTranslation>.self)
|
||||||
|
else { return nil }
|
||||||
|
|
||||||
|
return result.data
|
||||||
|
}
|
||||||
|
|
||||||
|
private func episodesURL(seriesID: Int, season: Int?, episode: Int?, page: UInt) -> URL? {
|
||||||
switch (season, episode) {
|
switch (season, episode) {
|
||||||
case let (season?, episode?):
|
case let (season?, episode?):
|
||||||
return URL(string: "\(basePath)series/\(seriesID)/episodes/query?airedSeason=\(season)&airedEpisode=\(episode)")
|
return URL(string:
|
||||||
|
"\(TheTVDBService.basePath)series/\(seriesID)/episodes/default?page=\(page)&season=\(season)&episodeNumber=\(episode)")
|
||||||
case let (season?, _):
|
case let (season?, _):
|
||||||
return URL(string: "\(basePath)series/\(seriesID)/episodes/query?airedSeason=\(season)")
|
return URL(string:
|
||||||
|
"\(TheTVDBService.basePath)series/\(seriesID)/episodes/default?page=\(page)&season=\(season)")
|
||||||
default:
|
default:
|
||||||
return URL(string: "\(basePath)series/\(seriesID)/episodes")
|
return URL(string:
|
||||||
|
"\(TheTVDBService.basePath)series/\(seriesID)/episodes/default?page=\(page)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func fetch(episodeForSeriesID seriesID: Int, season: Int?, episode: Int?, language: String) -> [TVDBEpisode] {
|
public func fetch(episodesForSeriesID seriesID: Int, season: Int?, episode: Int?) -> [TVDBEpisodeBaseRecord] {
|
||||||
guard let url = episodesURL(seriesID: seriesID, season: season, episode: episode),
|
guard let url = episodesURL(seriesID: seriesID, season: season, episode: episode, page: 0),
|
||||||
let result = sendJSONRequest(url: url, language: language, type: Wrapper<[TVDBEpisode]>.self)
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBSeriesEpisodes>.self)
|
||||||
else { return [] }
|
else { return [] }
|
||||||
|
|
||||||
|
return result.data.episodes
|
||||||
|
}
|
||||||
|
|
||||||
|
public func fetch(translatedEpisodesForSeriesID seriesID: Int, season: Int?, episode: Int?, language: String) -> [TVDBEpisodeBaseRecord] {
|
||||||
|
var episodes: [TVDBEpisodeBaseRecord] = Array()
|
||||||
|
var url = URL(string: "\(TheTVDBService.basePath)series/\(seriesID)/episodes/default/\(language)?page=0")
|
||||||
|
|
||||||
|
while let requestURL = url {
|
||||||
|
let result = sendJSONRequest(url: requestURL, type: Wrapper<TVDBSeriesBaseRecord>.self)
|
||||||
|
|
||||||
|
episodes += result?.data.episodes ?? []
|
||||||
|
|
||||||
|
if let next = result?.links?.next {
|
||||||
|
url = URL(string: next)
|
||||||
|
} else {
|
||||||
|
url = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return episodes
|
||||||
|
}
|
||||||
|
|
||||||
|
public func fetch(episodeInfo episodeID: Int, language: String) -> TVDBEpisodeExtendedRecord? {
|
||||||
|
guard let url = URL(string: "\(TheTVDBService.basePath)episodes/\(episodeID)/extended"),
|
||||||
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBEpisodeExtendedRecord>.self)
|
||||||
|
else { return nil }
|
||||||
|
|
||||||
return result.data
|
return result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
public func fetch(episodeInfo episodeID: Int, language: String) -> TVDBEpisodeInfo? {
|
public func fetch(episodesTranslation episodeID: Int, language: String) -> TVDBTranslation? {
|
||||||
guard let url = URL(string: "\(basePath)episodes/\(episodeID)"),
|
guard let url = URL(string: "\(TheTVDBService.basePath)episodes/\(episodeID)/translations/\(language)"),
|
||||||
let result = sendJSONRequest(url: url, language: language, type: Wrapper<TVDBEpisodeInfo>.self)
|
let result = sendJSONRequest(url: url, type: Wrapper<TVDBTranslation>.self)
|
||||||
else { return nil }
|
else { return nil }
|
||||||
|
|
||||||
return result.data
|
return result.data
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
|||||||
}
|
}
|
||||||
else if tvSeriesName.stringValue.count > 3 {
|
else if tvSeriesName.stringValue.count > 3 {
|
||||||
if let task = nameSearchTask { task.cancel() }
|
if let task = nameSearchTask { task.cancel() }
|
||||||
let language = tvShowService.languageType.extendedTag(displayName: tvLanguage.titleOfSelectedItem ?? "en")
|
let language = tvShowService.languageType.tag(displayName: tvLanguage.titleOfSelectedItem ?? "en")
|
||||||
|
|
||||||
tvSeriesNameSearchArray = [NSLocalizedString("Searching…", comment: "")]
|
tvSeriesNameSearchArray = [NSLocalizedString("Searching…", comment: "")]
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
|||||||
|
|
||||||
private func searchMovie() {
|
private func searchMovie() {
|
||||||
let title = movieName.stringValue
|
let title = movieName.stringValue
|
||||||
let language = movieService.languageType.extendedTag(displayName: movieLanguage.titleOfSelectedItem ?? "en")
|
let language = movieService.languageType.tag(displayName: movieLanguage.titleOfSelectedItem ?? "en")
|
||||||
let searcher = MetadataSearch.movieSeach(service: movieService, movie: title, language: language)
|
let searcher = MetadataSearch.movieSeach(service: movieService, movie: title, language: language)
|
||||||
let task = searcher.search(completionHandler: { self.searchDone(search: searcher, results: $0) }).runAsync()
|
let task = searcher.search(completionHandler: { self.searchDone(search: searcher, results: $0) }).runAsync()
|
||||||
state = .searching(search: searcher, task: task)
|
state = .searching(search: searcher, task: task)
|
||||||
@@ -251,7 +251,7 @@ final class MetadataSearchController: NSViewController, NSTableViewDataSource, N
|
|||||||
|
|
||||||
private func searchTVShow() {
|
private func searchTVShow() {
|
||||||
let title = tvSeriesName.stringValue
|
let title = tvSeriesName.stringValue
|
||||||
let language = tvShowService.languageType.extendedTag(displayName: tvLanguage.titleOfSelectedItem ?? "en")
|
let language = tvShowService.languageType.tag(displayName: tvLanguage.titleOfSelectedItem ?? "en")
|
||||||
let season = Int(tvSeasonNum.stringValue)
|
let season = Int(tvSeasonNum.stringValue)
|
||||||
let episode = Int(tvEpisodeNum.stringValue)
|
let episode = Int(tvEpisodeNum.stringValue)
|
||||||
let searcher = MetadataSearch.tvSearch(service: tvShowService, tvShow: title, season: season, episode: episode, language: language)
|
let searcher = MetadataSearch.tvSearch(service: tvShowService, tvShow: title, season: season, episode: episode, language: language)
|
||||||
|
|||||||
@@ -1319,4 +1319,9 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func collectionViewCut(in collectionView: NSCollectionView) {
|
||||||
|
collectionViewCopy(in: collectionView)
|
||||||
|
collectionViewDelete(in: collectionView)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -28,15 +28,11 @@ class QueueToolbarDelegate: NSObject, NSToolbarDelegate {
|
|||||||
target: target,
|
target: target,
|
||||||
action: #selector(QueueController.open(_:)))
|
action: #selector(QueueController.open(_:)))
|
||||||
} else if itemIdentifier == .queueSettings {
|
} else if itemIdentifier == .queueSettings {
|
||||||
var symbolName = "ellipsis.circle"
|
|
||||||
if #available(macOS 26.0, *) {
|
|
||||||
symbolName = "ellipsis"
|
|
||||||
}
|
|
||||||
return ButtonToolbarItem(itemIdentifier: itemIdentifier,
|
return ButtonToolbarItem(itemIdentifier: itemIdentifier,
|
||||||
label: NSLocalizedString("Settings", comment: "Toolbar"),
|
label: NSLocalizedString("Settings", comment: "Toolbar"),
|
||||||
toolTip: NSLocalizedString("Show/Hide settings", comment: "Toolbar"),
|
toolTip: NSLocalizedString("Show/Hide settings", comment: "Toolbar"),
|
||||||
image: "NSActionTemplate",
|
image: "NSActionTemplate",
|
||||||
symbolName: symbolName,
|
symbolName: "gear",
|
||||||
target: target,
|
target: target,
|
||||||
action: #selector(QueueController.toggleOptions(_:)))
|
action: #selector(QueueController.toggleOptions(_:)))
|
||||||
} else if itemIdentifier == .queueStartStop {
|
} else if itemIdentifier == .queueStartStop {
|
||||||
|
|||||||
@@ -177,6 +177,8 @@
|
|||||||
<string>https://subler.org/appcast/appcast.xml</string>
|
<string>https://subler.org/appcast/appcast.xml</string>
|
||||||
<key>SUPublicEDKey</key>
|
<key>SUPublicEDKey</key>
|
||||||
<string>9M0JrgMq+5MrpLqTu7lT+ffThP8dRp78OQNTklwK/WE=</string>
|
<string>9M0JrgMq+5MrpLqTu7lT+ffThP8dRp78OQNTklwK/WE=</string>
|
||||||
|
<key>NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac</key>
|
||||||
|
<true/>
|
||||||
<key>UTImportedTypeDeclarations</key>
|
<key>UTImportedTypeDeclarations</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
+1
-1
Submodule MP42Foundation updated: c63253903d...ab939411c3.
@@ -1,11 +1,25 @@
|
|||||||
# Subler News
|
# Subler News
|
||||||
|
|
||||||
|
## Subler 1.9.2
|
||||||
|
|
||||||
|
- Updated the TVDB scraper to use the v4 API
|
||||||
|
- AppleTV artworks are retrieved at higher resolution
|
||||||
|
- Fixed the cut command to make it work on artworks
|
||||||
|
|
||||||
|
|
||||||
|
## Subler 1.9.1
|
||||||
|
|
||||||
|
- Fixed the queue AppleScript dictionary
|
||||||
|
- Added a work around for a macOS 26 issue that could cause a crash when editing the file name and metadata token fields in the preferences
|
||||||
|
|
||||||
|
|
||||||
## Subler 1.9.0
|
## Subler 1.9.0
|
||||||
|
|
||||||
- Updated UI for macOS 26
|
- Updated UI for macOS 26
|
||||||
- Preserves extended language tags from Matroska files
|
- Preserves extended language tags from Matroska files
|
||||||
- Fixed the services ids in the metadata map
|
- Fixed the services ids in the metadata map
|
||||||
|
|
||||||
|
|
||||||
## Subler 1.8.9
|
## Subler 1.8.9
|
||||||
|
|
||||||
- Expanded the AppleScript dictionary [Mock1]
|
- Expanded the AppleScript dictionary [Mock1]
|
||||||
|
|||||||
+6
-5
@@ -4,11 +4,6 @@
|
|||||||
|
|
||||||
<xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)" />
|
<xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)" />
|
||||||
|
|
||||||
<class-extension extends="application" description="Queue's top level scripting object.">
|
|
||||||
<element type="queue item" access="r" description="The queue items">
|
|
||||||
<cocoa key="queueItems"/>
|
|
||||||
</element>
|
|
||||||
</class-extension>
|
|
||||||
|
|
||||||
<suite name="Subler Automation Suite" code="Subl" description="Automation functions for Subler.">
|
<suite name="Subler Automation Suite" code="Subl" description="Automation functions for Subler.">
|
||||||
|
|
||||||
@@ -197,5 +192,11 @@
|
|||||||
|
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
|
<class-extension extends="application" description="Queue's top level scripting object.">
|
||||||
|
<element type="queue item" access="r" description="The queue items">
|
||||||
|
<cocoa key="queueItems"/>
|
||||||
|
</element>
|
||||||
|
</class-extension>
|
||||||
|
|
||||||
</suite>
|
</suite>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
@@ -767,7 +767,7 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
BuildIndependentTargetsInParallel = YES;
|
BuildIndependentTargetsInParallel = YES;
|
||||||
LastUpgradeCheck = 2600;
|
LastUpgradeCheck = 2630;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
8D15AC270486D014006FF6A4 = {
|
8D15AC270486D014006FF6A4 = {
|
||||||
LastSwiftMigration = 1020;
|
LastSwiftMigration = 1020;
|
||||||
@@ -1411,8 +1411,9 @@
|
|||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 1.9.0;
|
CURRENT_PROJECT_VERSION = 1.9.2;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
@@ -1430,7 +1431,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.9.0;
|
MARKETING_VERSION = 1.9.2;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
||||||
OTHER_SWIFT_FLAGS = "";
|
OTHER_SWIFT_FLAGS = "";
|
||||||
@@ -1456,8 +1457,9 @@
|
|||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1.9.0;
|
CURRENT_PROJECT_VERSION = 1.9.2;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
@@ -1474,7 +1476,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.9.0;
|
MARKETING_VERSION = 1.9.2;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
||||||
OTHER_SWIFT_FLAGS = "";
|
OTHER_SWIFT_FLAGS = "";
|
||||||
@@ -1691,7 +1693,7 @@
|
|||||||
repositoryURL = "https://github.com/sparkle-project/Sparkle";
|
repositoryURL = "https://github.com/sparkle-project/Sparkle";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 2.8.0;
|
version = 2.9.6;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/* End XCRemoteSwiftPackageReference section */
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
{"storeCode": 143460, "country3": "AUS", "country2": "AU", "language2": "EN", "language": "English", "season": "season", "country": "Australia", "cast": "Cast", "director": "Director", "producer": "Producers", "screenwriter": "Screenwriter", "studio": "Studio", "copyright": "Copyright"},
|
{"storeCode": 143460, "country3": "AUS", "country2": "AU", "language2": "EN", "language": "English", "season": "season", "country": "Australia", "cast": "Cast", "director": "Director", "producer": "Producers", "screenwriter": "Screenwriter", "studio": "Studio", "copyright": "Copyright"},
|
||||||
{"storeCode": 143446, "country3": "BEL", "country2": "BE", "language2": "NL", "language": "Nederlands", "season": "season", "country": "België", "cast": "Cast", "director": "Regisseur", "producer": "Producenten", "screenwriter": "Scenarioschrijver", "studio": "Studio", "copyright": "Copyright"},
|
{"storeCode": 143446, "country3": "BEL", "country2": "BE", "language2": "NL", "language": "Nederlands", "season": "season", "country": "België", "cast": "Cast", "director": "Regisseur", "producer": "Producenten", "screenwriter": "Scenarioschrijver", "studio": "Studio", "copyright": "Copyright"},
|
||||||
{"storeCode": 143446, "country3": "BEL", "country2": "BE", "language2": "FR", "language": "Français", "season": "saison", "country": "Belgique", "cast": "Cast", "director": "Réalisateur", "producer": "Producteurs", "screenwriter": "Scénariste", "studio": "Studio", "copyright": "Copyright"},
|
{"storeCode": 143446, "country3": "BEL", "country2": "BE", "language2": "FR", "language": "Français", "season": "saison", "country": "Belgique", "cast": "Cast", "director": "Réalisateur", "producer": "Producteurs", "screenwriter": "Scénariste", "studio": "Studio", "copyright": "Copyright"},
|
||||||
|
{"storeCode": 143513, "country3": "PRY", "country2": "PY", "language2": "ES", "language": "Español", "season": "Temporada", "country": "Paraguay", "cast": "Reparto", "director": "Dirección", "producer": "Producción", "screenwriter": "Guion", "studio": "Estudio", "copyright": "Copyright"},
|
||||||
{"storeCode": 143503, "country3": "BRA", "country2": "BR", "language2": "PT", "language": "Português", "season": "season", "country": "Brasil", "cast": "Elenco", "director": "Diretor", "producer": "Produtores", "screenwriter": "Roteirista", "studio": "Estúdio", "copyright": "Direitos autorais"},
|
{"storeCode": 143503, "country3": "BRA", "country2": "BR", "language2": "PT", "language": "Português", "season": "season", "country": "Brasil", "cast": "Elenco", "director": "Diretor", "producer": "Produtores", "screenwriter": "Roteirista", "studio": "Estúdio", "copyright": "Direitos autorais"},
|
||||||
{"storeCode": 143505, "country3": "ARG", "country2": "AR", "language2": "ES", "language": "Español", "season": "season", "country": "Argentina", "cast": "Reparto", "director": "Director", "producer": "Productores", "screenwriter": "Guionista", "studio": "Estudio", "copyright": "Copyright"},
|
{"storeCode": 143505, "country3": "ARG", "country2": "AR", "language2": "ES", "language": "Español", "season": "season", "country": "Argentina", "cast": "Reparto", "director": "Director", "producer": "Productores", "screenwriter": "Guionista", "studio": "Estudio", "copyright": "Copyright"},
|
||||||
{"storeCode": 143455, "country3": "CAN", "country2": "CA", "language2": "EN", "language": "English", "season": "season", "country": "Canada", "cast": "Cast", "director": "Director", "producer": "Producers", "screenwriter": "Screenwriter", "studio": "Studio", "copyright": "Copyright"},
|
{"storeCode": 143455, "country3": "CAN", "country2": "CA", "language2": "EN", "language": "English", "season": "season", "country": "Canada", "cast": "Cast", "director": "Director", "producer": "Producers", "screenwriter": "Screenwriter", "studio": "Studio", "copyright": "Copyright"},
|
||||||
|
|||||||
Reference in new issue
Block a user