Various clean ups.
This commit is contained in:
1 parent
7a23fcd29f
commit
a8c11702ce
8 files changed
+107
-67
No files matched your search
@@ -50,7 +50,7 @@ typedef enum SBCachePolicy : NSUInteger {
|
|||||||
|
|
||||||
- (void) cancel;
|
- (void) cancel;
|
||||||
|
|
||||||
#pragma Methods to be overridden
|
#pragma mark Methods to be overridden
|
||||||
- (NSArray<NSString *> *) languages;
|
- (NSArray<NSString *> *) languages;
|
||||||
|
|
||||||
- (NSArray<MP42Metadata *> * _Nullable) searchTVSeries:(NSString *)aSeriesName language:(NSString *)aLanguage;
|
- (NSArray<MP42Metadata *> * _Nullable) searchTVSeries:(NSString *)aSeriesName language:(NSString *)aLanguage;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@interface iTunesStore : MetadataImporter
|
@interface iTunesStore : MetadataImporter
|
||||||
|
|
||||||
#pragma mark iTunes stores
|
#pragma mark iTunes stores
|
||||||
+ (NSDictionary * __nullable) getStoreFor:(NSString *)aLanguageString;
|
+ (nullable NSDictionary *) getStoreFor:(NSString *)aLanguageString;
|
||||||
|
|
||||||
#pragma mark Quick iTunes search for metadata
|
#pragma mark Quick iTunes search for metadata
|
||||||
+ (MP42Metadata *) quickiTunesSearchTV:(NSString *)aSeriesName episodeTitle:(NSString *)aEpisodeTitle;
|
+ (MP42Metadata *) quickiTunesSearchTV:(NSString *)aSeriesName episodeTitle:(NSString *)aEpisodeTitle;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8173.3" systemVersion="15A262e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
|
<development version="6300" identifier="xcode"/>
|
||||||
<plugIn identifier="com.apple.imagekit.ibplugin" version="6250"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8173.3"/>
|
||||||
|
<plugIn identifier="com.apple.imagekit.ibplugin" version="8173.3"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="SBMovieViewController">
|
<customObject id="-2" userLabel="File's Owner" customClass="SBMovieViewController">
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
<tabView controlSize="small" id="10">
|
<tabView controlSize="small" id="10">
|
||||||
<rect key="frame" x="-11" y="-12" width="502" height="279"/>
|
<rect key="frame" x="-11" y="-12" width="502" height="279"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<animations/>
|
||||||
<tabViewItems>
|
<tabViewItems>
|
||||||
<tabViewItem label="Metadata" identifier="1" id="11">
|
<tabViewItem label="Metadata" identifier="1" id="11">
|
||||||
<view key="view" id="12">
|
<view key="view" id="12">
|
||||||
@@ -48,10 +50,11 @@
|
|||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnSelection="YES" autosaveColumns="NO" rowHeight="14" headerView="23" id="22" customClass="SBTableView">
|
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnSelection="YES" autosaveColumns="NO" rowHeight="14" headerView="23" id="22" customClass="SBTableView">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="446" height="16"/>
|
<rect key="frame" x="0.0" y="0.0" width="446" height="177"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<animations/>
|
||||||
<size key="intercellSpacing" width="3" height="2"/>
|
<size key="intercellSpacing" width="3" height="2"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableViewGridLines key="gridStyleMask" vertical="YES"/>
|
<tableViewGridLines key="gridStyleMask" vertical="YES"/>
|
||||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableColumns>
|
<tableColumns>
|
||||||
@@ -315,7 +318,7 @@
|
|||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||||
</tableColumn>
|
</tableColumn>
|
||||||
<tableColumn identifier="value" width="333" minWidth="40" maxWidth="2000" id="25">
|
<tableColumn identifier="value" width="333" minWidth="40" maxWidth="4000" id="25">
|
||||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Value">
|
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Value">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -335,24 +338,30 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</tableView>
|
</tableView>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
</clipView>
|
</clipView>
|
||||||
|
<animations/>
|
||||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" controlSize="small" horizontal="YES" id="21">
|
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" controlSize="small" horizontal="YES" id="21">
|
||||||
<rect key="frame" x="1" y="184" width="446" height="14"/>
|
<rect key="frame" x="1" y="184" width="446" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<animations/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" controlSize="small" horizontal="NO" id="20">
|
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" controlSize="small" horizontal="NO" id="20">
|
||||||
<rect key="frame" x="412" y="17" width="11" height="152"/>
|
<rect key="frame" x="412" y="17" width="11" height="152"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<animations/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<tableHeaderView key="headerView" id="23">
|
<tableHeaderView key="headerView" id="23">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="446" height="17"/>
|
<rect key="frame" x="0.0" y="0.0" width="446" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<animations/>
|
||||||
</tableHeaderView>
|
</tableHeaderView>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
<popUpButton verticalHuggingPriority="750" id="30">
|
<popUpButton verticalHuggingPriority="750" id="30">
|
||||||
<rect key="frame" x="17" y="7" width="32" height="22"/>
|
<rect key="frame" x="17" y="7" width="32" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<popUpButtonCell key="cell" type="smallSquare" bezelStyle="smallSquare" alignment="center" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" pullsDown="YES" selectedItem="33" id="31">
|
<popUpButtonCell key="cell" type="smallSquare" bezelStyle="smallSquare" alignment="center" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" pullsDown="YES" selectedItem="33" id="31">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -371,6 +380,7 @@
|
|||||||
<button verticalHuggingPriority="750" id="53">
|
<button verticalHuggingPriority="750" id="53">
|
||||||
<rect key="frame" x="48" y="7" width="24" height="22"/>
|
<rect key="frame" x="48" y="7" width="24" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="54">
|
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="54">
|
||||||
<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"/>
|
||||||
@@ -382,6 +392,7 @@
|
|||||||
<popUpButton verticalHuggingPriority="750" id="179">
|
<popUpButton verticalHuggingPriority="750" id="179">
|
||||||
<rect key="frame" x="80" y="7" width="33" height="22"/>
|
<rect key="frame" x="80" y="7" width="33" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<popUpButtonCell key="cell" type="smallSquare" bezelStyle="smallSquare" alignment="center" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" pullsDown="YES" selectedItem="184" id="180">
|
<popUpButtonCell key="cell" type="smallSquare" bezelStyle="smallSquare" alignment="center" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" pullsDown="YES" selectedItem="184" id="180">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -395,6 +406,7 @@
|
|||||||
</popUpButtonCell>
|
</popUpButtonCell>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
</view>
|
</view>
|
||||||
</tabViewItem>
|
</tabViewItem>
|
||||||
<tabViewItem label="Artwork" identifier="Item 1" id="15">
|
<tabViewItem label="Artwork" identifier="Item 1" id="15">
|
||||||
@@ -412,6 +424,7 @@
|
|||||||
<ikImageBrowserView autoresizesSubviews="NO" zoomValue="1" allowsReordering="YES" animates="YES" id="217" customClass="SBImageBrowserView">
|
<ikImageBrowserView autoresizesSubviews="NO" zoomValue="1" allowsReordering="YES" animates="YES" id="217" customClass="SBImageBrowserView">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="446" height="197"/>
|
<rect key="frame" x="0.0" y="0.0" width="446" height="197"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<animations/>
|
||||||
<autoresizingMask key="contentResizingMask" heightSizable="YES"/>
|
<autoresizingMask key="contentResizingMask" heightSizable="YES"/>
|
||||||
<size key="cellSize" width="177" height="177"/>
|
<size key="cellSize" width="177" height="177"/>
|
||||||
<connections>
|
<connections>
|
||||||
@@ -424,19 +437,24 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</ikImageBrowserView>
|
</ikImageBrowserView>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
</clipView>
|
</clipView>
|
||||||
|
<animations/>
|
||||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="216">
|
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="216">
|
||||||
<rect key="frame" x="-100" y="-100" width="438" height="15"/>
|
<rect key="frame" x="-100" y="-100" width="438" height="15"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<animations/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="215">
|
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="215">
|
||||||
<rect key="frame" x="424" y="1" width="15" height="250"/>
|
<rect key="frame" x="424" y="1" width="15" height="250"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<animations/>
|
||||||
</scroller>
|
</scroller>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
<button verticalHuggingPriority="750" id="223">
|
<button verticalHuggingPriority="750" id="223">
|
||||||
<rect key="frame" x="17" y="7" width="24" height="22"/>
|
<rect key="frame" x="17" y="7" width="24" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSAddTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="224">
|
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSAddTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="224">
|
||||||
<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"/>
|
||||||
@@ -448,6 +466,7 @@
|
|||||||
<button verticalHuggingPriority="750" id="226">
|
<button verticalHuggingPriority="750" id="226">
|
||||||
<rect key="frame" x="40" y="7" width="24" height="22"/>
|
<rect key="frame" x="40" y="7" width="24" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="227">
|
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="227">
|
||||||
<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"/>
|
||||||
@@ -459,12 +478,14 @@
|
|||||||
<slider verticalHuggingPriority="750" id="235">
|
<slider verticalHuggingPriority="750" id="235">
|
||||||
<rect key="frame" x="350" y="11" width="115" height="15"/>
|
<rect key="frame" x="350" y="11" width="115" height="15"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="236"/>
|
<sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="236"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="zoomSliderDidChange:" target="-2" id="237"/>
|
<action selector="zoomSliderDidChange:" target="-2" id="237"/>
|
||||||
</connections>
|
</connections>
|
||||||
</slider>
|
</slider>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
</view>
|
</view>
|
||||||
</tabViewItem>
|
</tabViewItem>
|
||||||
<tabViewItem label="Other Settings" identifier="Item 2" id="40">
|
<tabViewItem label="Other Settings" identifier="Item 2" id="40">
|
||||||
@@ -482,6 +503,7 @@
|
|||||||
<button id="57">
|
<button id="57">
|
||||||
<rect key="frame" x="122" y="53" width="71" height="18"/>
|
<rect key="frame" x="122" y="53" width="71" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="check" title="Gapless" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="58">
|
<buttonCell key="cell" type="check" title="Gapless" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="58">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -493,6 +515,7 @@
|
|||||||
<button id="194">
|
<button id="194">
|
||||||
<rect key="frame" x="122" y="33" width="71" height="18"/>
|
<rect key="frame" x="122" y="33" width="71" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="check" title="Podcast" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="195">
|
<buttonCell key="cell" type="check" title="Podcast" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="195">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -504,6 +527,7 @@
|
|||||||
<popUpButton verticalHuggingPriority="750" id="59">
|
<popUpButton verticalHuggingPriority="750" id="59">
|
||||||
<rect key="frame" x="122" y="139" width="143" height="22"/>
|
<rect key="frame" x="122" y="139" width="143" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<popUpButtonCell key="cell" type="push" title="Normal (Music)" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="212" id="60">
|
<popUpButtonCell key="cell" type="push" title="Normal (Music)" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="212" id="60">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -538,6 +562,7 @@
|
|||||||
<textField verticalHuggingPriority="750" id="72">
|
<textField verticalHuggingPriority="750" id="72">
|
||||||
<rect key="frame" x="52" y="143" width="67" height="14"/>
|
<rect key="frame" x="52" y="143" width="67" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Media Kind:" id="73">
|
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Media Kind:" id="73">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -547,6 +572,7 @@
|
|||||||
<popUpButton verticalHuggingPriority="750" id="74">
|
<popUpButton verticalHuggingPriority="750" id="74">
|
||||||
<rect key="frame" x="122" y="112" width="143" height="22"/>
|
<rect key="frame" x="122" y="112" width="143" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="86" id="77">
|
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="86" id="77">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -565,6 +591,7 @@
|
|||||||
<textField verticalHuggingPriority="750" id="75">
|
<textField verticalHuggingPriority="750" id="75">
|
||||||
<rect key="frame" x="32" y="117" width="88" height="14"/>
|
<rect key="frame" x="32" y="117" width="88" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Content Rating:" id="76">
|
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Content Rating:" id="76">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -574,6 +601,7 @@
|
|||||||
<popUpButton verticalHuggingPriority="750" id="199">
|
<popUpButton verticalHuggingPriority="750" id="199">
|
||||||
<rect key="frame" x="121" y="85" width="143" height="22"/>
|
<rect key="frame" x="121" y="85" width="143" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<popUpButtonCell key="cell" type="push" title="No" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="206" id="202">
|
<popUpButtonCell key="cell" type="push" title="No" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="206" id="202">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
@@ -592,6 +620,7 @@
|
|||||||
<textField verticalHuggingPriority="750" id="200">
|
<textField verticalHuggingPriority="750" id="200">
|
||||||
<rect key="frame" x="95" y="90" width="24" height="14"/>
|
<rect key="frame" x="95" y="90" width="24" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="HD:" id="201">
|
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="HD:" id="201">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -601,6 +630,7 @@
|
|||||||
<textField verticalHuggingPriority="750" id="139">
|
<textField verticalHuggingPriority="750" id="139">
|
||||||
<rect key="frame" x="70" y="55" width="50" height="14"/>
|
<rect key="frame" x="70" y="55" width="50" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Options:" id="140">
|
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Options:" id="140">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -608,17 +638,22 @@
|
|||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
</view>
|
</view>
|
||||||
|
<animations/>
|
||||||
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
||||||
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
<font key="titleFont" size="11" name="LucidaGrande"/>
|
<font key="titleFont" size="11" name="LucidaGrande"/>
|
||||||
</box>
|
</box>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
</view>
|
</view>
|
||||||
</tabViewItem>
|
</tabViewItem>
|
||||||
</tabViewItems>
|
</tabViewItems>
|
||||||
</tabView>
|
</tabView>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
|
<point key="canvasLocation" x="422" y="477"/>
|
||||||
</customView>
|
</customView>
|
||||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="167" userLabel="Preset Save">
|
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="167" userLabel="Preset Save">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||||
@@ -632,6 +667,7 @@
|
|||||||
<textField verticalHuggingPriority="750" id="173">
|
<textField verticalHuggingPriority="750" id="173">
|
||||||
<rect key="frame" x="17" y="90" width="87" height="17"/>
|
<rect key="frame" x="17" y="90" width="87" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<animations/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Preset Name:" id="174">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Preset Name:" id="174">
|
||||||
<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"/>
|
||||||
@@ -641,6 +677,7 @@
|
|||||||
<textField verticalHuggingPriority="750" id="171">
|
<textField verticalHuggingPriority="750" id="171">
|
||||||
<rect key="frame" x="20" y="60" width="306" height="22"/>
|
<rect key="frame" x="20" y="60" width="306" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<animations/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="176">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="176">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -650,6 +687,7 @@
|
|||||||
<button verticalHuggingPriority="750" id="170">
|
<button verticalHuggingPriority="750" id="170">
|
||||||
<rect key="frame" x="236" y="12" width="96" height="32"/>
|
<rect key="frame" x="236" y="12" width="96" height="32"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="push" title="Save" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="177">
|
<buttonCell key="cell" type="push" title="Save" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="177">
|
||||||
<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"/>
|
||||||
@@ -664,6 +702,7 @@ DQ
|
|||||||
<button verticalHuggingPriority="750" id="169">
|
<button verticalHuggingPriority="750" id="169">
|
||||||
<rect key="frame" x="140" y="12" width="96" height="32"/>
|
<rect key="frame" x="140" y="12" width="96" height="32"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
|
<animations/>
|
||||||
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="178">
|
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="178">
|
||||||
<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"/>
|
||||||
@@ -676,6 +715,7 @@ Gw
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
<animations/>
|
||||||
</view>
|
</view>
|
||||||
</window>
|
</window>
|
||||||
</objects>
|
</objects>
|
||||||
|
|||||||
@@ -204,7 +204,7 @@
|
|||||||
CFRetain(completionHandler);
|
CFRetain(completionHandler);
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
NSError *outError;
|
NSError *outError = nil;
|
||||||
|
|
||||||
SBDocument *doc = [[self openUntitledDocumentAndDisplay:displayDocument error:&outError] retain];
|
SBDocument *doc = [[self openUntitledDocumentAndDisplay:displayDocument error:&outError] retain];
|
||||||
completionHandler(doc, NO, outError);
|
completionHandler(doc, NO, outError);
|
||||||
|
|||||||
@@ -20,9 +20,10 @@
|
|||||||
IBOutlet NSSlider *slider;
|
IBOutlet NSSlider *slider;
|
||||||
IBOutlet NSButton *addArtworkButton;
|
IBOutlet NSButton *addArtworkButton;
|
||||||
IBOutlet NSButton *loadMoreArtworkButton;
|
IBOutlet NSButton *loadMoreArtworkButton;
|
||||||
|
|
||||||
NSMutableArray<NSURL *> *imageURLsUnloaded;
|
NSMutableArray<NSURL *> *imageURLsUnloaded;
|
||||||
NSMutableArray *images;
|
NSMutableArray *images;
|
||||||
NSArray<NSString *> *artworkProviderNames;
|
NSArray<NSString *> *artworkProviderNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark Initialization
|
#pragma mark Initialization
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
IBOutlet NSToolbarItem *searchMetadata;
|
IBOutlet NSToolbarItem *searchMetadata;
|
||||||
IBOutlet NSToolbarItem *sendToQueue;
|
IBOutlet NSToolbarItem *sendToQueue;
|
||||||
|
|
||||||
NSArray *languages;
|
NSArray<NSString *> *languages;
|
||||||
|
|
||||||
NSViewController *propertyView;
|
NSViewController *propertyView;
|
||||||
IBOutlet NSView *targetView;
|
IBOutlet NSView *targetView;
|
||||||
@@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (IBAction)setTrackOffset:(id)sender;
|
- (IBAction)setTrackOffset:(id)sender;
|
||||||
- (IBAction)closeOffsetSheet:(id)sender;
|
- (IBAction)closeOffsetSheet:(id)sender;
|
||||||
|
|
||||||
- (IBAction)setSaveFormat:(id)sender;
|
- (IBAction)setSaveFormat:(NSPopUpButton *)sender;
|
||||||
- (IBAction)cancelSaveOperation:(id)sender;
|
- (IBAction)cancelSaveOperation:(id)sender;
|
||||||
- (IBAction)sendToExternalApp:(id)sender;
|
- (IBAction)sendToExternalApp:(id)sender;
|
||||||
|
|
||||||
|
|||||||
+50
-51
@@ -149,39 +149,8 @@
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)saveDidComplete:(NSError *)outError URL:(NSURL *)absoluteURL
|
|
||||||
{
|
|
||||||
[NSApp endSheet:savingWindow];
|
|
||||||
[savingWindow orderOut:self];
|
|
||||||
[optBar stopAnimation:self];
|
|
||||||
|
|
||||||
if (outError && [outError code] == 101) {
|
|
||||||
// Write permission error, don't reload the file
|
|
||||||
} else {
|
|
||||||
[self reloadFile:absoluteURL];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (outError) {
|
|
||||||
[self presentError:outError
|
|
||||||
modalForWindow:documentWindow
|
|
||||||
delegate:nil
|
|
||||||
didPresentSelector:NULL
|
|
||||||
contextInfo:NULL];
|
|
||||||
|
|
||||||
[outError release];
|
|
||||||
}
|
|
||||||
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)writeSafelyToURL:(NSURL *)url ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation error:(NSError * _Nullable *)outError
|
- (BOOL)writeSafelyToURL:(NSURL *)url ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation error:(NSError * _Nullable *)outError
|
||||||
{
|
{
|
||||||
NSMutableDictionary * attributes = [[NSMutableDictionary alloc] init];
|
|
||||||
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"chaptersPreviewTrack"] boolValue])
|
|
||||||
[attributes setObject:@YES forKey:MP42GenerateChaptersPreviewTrack];
|
|
||||||
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"SBOrganizeAlternateGroups"] boolValue])
|
|
||||||
[attributes setObject:@YES forKey:MP42OrganizeAlternateGroups];
|
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[optBar setIndeterminate:YES];
|
[optBar setIndeterminate:YES];
|
||||||
[optBar startAnimation:self];
|
[optBar startAnimation:self];
|
||||||
@@ -197,20 +166,32 @@
|
|||||||
CFStringRef reasonForActivity= CFSTR("Subler Save Operation");
|
CFStringRef reasonForActivity= CFSTR("Subler Save Operation");
|
||||||
IOReturn io_success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep,
|
IOReturn io_success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep,
|
||||||
kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
|
kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
|
||||||
BOOL success = NO;
|
BOOL result = NO;
|
||||||
NSError *inError = nil;
|
NSError *inError = nil;
|
||||||
|
|
||||||
|
NSMutableDictionary<NSString *, NSNumber *> * attributes = [[NSMutableDictionary alloc] init];
|
||||||
|
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"chaptersPreviewTrack"] boolValue]) {
|
||||||
|
attributes[MP42GenerateChaptersPreviewTrack] = @YES;
|
||||||
|
}
|
||||||
|
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"SBOrganizeAlternateGroups"] boolValue]) {
|
||||||
|
attributes[MP42OrganizeAlternateGroups] = @YES;
|
||||||
|
}
|
||||||
|
|
||||||
switch (saveOperation) {
|
switch (saveOperation) {
|
||||||
case NSSaveOperation:
|
case NSSaveOperation:
|
||||||
// movie file already exists, so we'll just update
|
// movie file already exists, so we'll just update
|
||||||
// the movie resource
|
// the movie resource.
|
||||||
success = [self.mp4 updateMP4FileWithAttributes:attributes error:&inError];
|
result = [self.mp4 updateMP4FileWithAttributes:attributes error:&inError];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSSaveAsOperation:
|
case NSSaveAsOperation:
|
||||||
if ([_64bit_data state]) [attributes setObject:@YES forKey:MP4264BitData];
|
// movie doesn not exist, create a new one from scratch.
|
||||||
if ([_64bit_time state]) [attributes setObject:@YES forKey:MP4264BitTime];
|
if ([_64bit_data state]) { attributes[MP4264BitData] = @YES; }
|
||||||
success = [self.mp4 writeToUrl:url withAttributes:attributes error:&inError];
|
if ([_64bit_time state]) { attributes[MP4264BitTime] = @YES; }
|
||||||
|
|
||||||
|
result = [self.mp4 writeToUrl:url withAttributes:attributes error:&inError];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
NSAssert(NO, @"Unhandled save operation");
|
NSAssert(NO, @"Unhandled save operation");
|
||||||
break;
|
break;
|
||||||
@@ -218,11 +199,11 @@
|
|||||||
|
|
||||||
[attributes release];
|
[attributes release];
|
||||||
|
|
||||||
if (success && _optimize) {
|
if (result && _optimize) {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[saveOperationName setStringValue:@"Optimizing…"];
|
[saveOperationName setStringValue:@"Optimizing…"];
|
||||||
});
|
});
|
||||||
success = [self.mp4 optimize];
|
result = [self.mp4 optimize];
|
||||||
_optimize = NO;
|
_optimize = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,17 +212,33 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self saveDidComplete:inError URL:url];
|
[NSApp endSheet:savingWindow];
|
||||||
|
[savingWindow orderOut:self];
|
||||||
|
[optBar stopAnimation:self];
|
||||||
|
|
||||||
|
if (inError && inError.code == 101) {
|
||||||
|
// Write permission error, don't reload the file
|
||||||
|
} else {
|
||||||
|
[self reloadFile:url];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inError) {
|
||||||
|
[self presentError:inError
|
||||||
|
modalForWindow:documentWindow
|
||||||
|
delegate:nil
|
||||||
|
didPresentSelector:NULL
|
||||||
|
contextInfo:NULL];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return success;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)prepareSavePanel:(NSSavePanel *)savePanel
|
- (BOOL)prepareSavePanel:(NSSavePanel *)savePanel
|
||||||
{
|
{
|
||||||
_currentSavePanel = savePanel;
|
_currentSavePanel = savePanel;
|
||||||
[savePanel setExtensionHidden:NO];
|
savePanel.extensionHidden = NO;
|
||||||
[savePanel setAccessoryView:saveView];
|
savePanel.accessoryView = saveView;
|
||||||
|
|
||||||
NSArray<NSString *> *formats = [self writableTypesForSaveOperation:NSSaveAsOperation];
|
NSArray<NSString *> *formats = [self writableTypesForSaveOperation:NSSaveAsOperation];
|
||||||
|
|
||||||
@@ -251,6 +248,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
[fileFormat selectItemAtIndex:[[[NSUserDefaults standardUserDefaults] valueForKey:@"defaultSaveFormat"] integerValue]];
|
[fileFormat selectItemAtIndex:[[[NSUserDefaults standardUserDefaults] valueForKey:@"defaultSaveFormat"] integerValue]];
|
||||||
|
|
||||||
if ([[NSUserDefaults standardUserDefaults] valueForKey:@"SBSaveFormat"]) {
|
if ([[NSUserDefaults standardUserDefaults] valueForKey:@"SBSaveFormat"]) {
|
||||||
_currentSavePanel.allowedFileTypes = @[[[NSUserDefaults standardUserDefaults] valueForKey:@"SBSaveFormat"]];
|
_currentSavePanel.allowedFileTypes = @[[[NSUserDefaults standardUserDefaults] valueForKey:@"SBSaveFormat"]];
|
||||||
}
|
}
|
||||||
@@ -258,13 +256,13 @@
|
|||||||
NSString *filename = nil;
|
NSString *filename = nil;
|
||||||
for (MP42Track *track in self.mp4.tracks) {
|
for (MP42Track *track in self.mp4.tracks) {
|
||||||
if (track.sourceURL) {
|
if (track.sourceURL) {
|
||||||
filename = [[track.sourceURL lastPathComponent] stringByDeletingPathExtension];
|
filename = track.sourceURL.lastPathComponent.stringByDeletingPathExtension;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename) {
|
if (filename) {
|
||||||
[savePanel performSelector:@selector(setNameFieldStringValue:) withObject:filename];
|
savePanel.nameFieldStringValue = filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.mp4.dataSize > 4200000000) {
|
if (self.mp4.dataSize > 4200000000) {
|
||||||
@@ -274,7 +272,7 @@
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)setSaveFormat:(id)sender
|
- (IBAction)setSaveFormat:(NSPopUpButton *)sender
|
||||||
{
|
{
|
||||||
NSString *requiredFileType = nil;
|
NSString *requiredFileType = nil;
|
||||||
NSInteger index = [sender indexOfSelectedItem];
|
NSInteger index = [sender indexOfSelectedItem];
|
||||||
@@ -317,12 +315,13 @@
|
|||||||
|
|
||||||
- (IBAction)sendToExternalApp:(id)sender
|
- (IBAction)sendToExternalApp:(id)sender
|
||||||
{
|
{
|
||||||
/* send to itunes after save */
|
// Send to itunes after save.
|
||||||
NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource:
|
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
|
||||||
[NSString stringWithFormat:@"%@%@%@", @"tell application \"iTunes\" to open (POSIX file \"", [[self fileURL] path], @"\")"]];
|
NSString *appPath = [workspace fullPathForApplication:@"iTunes"];
|
||||||
|
|
||||||
[myScript executeAndReturnError: nil];
|
if (appPath) {
|
||||||
[myScript release];
|
[workspace openFile:self.fileURL.path withApplication:appPath];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark Interface validation
|
#pragma mark Interface validation
|
||||||
|
|||||||
+3
-3
@@ -175,11 +175,11 @@ NSString *SBQueueCancelledNotification = @"SBQueueCancelledNotification";
|
|||||||
[self disableSleep];
|
[self disableSleep];
|
||||||
|
|
||||||
dispatch_async(self.workQueue, ^{
|
dispatch_async(self.workQueue, ^{
|
||||||
NSError *outError = nil;
|
|
||||||
BOOL noErr = NO;
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
|
NSError *outError = nil;
|
||||||
|
BOOL noErr = NO;
|
||||||
|
|
||||||
// Save the queue
|
// Save the queue
|
||||||
[self saveQueueToDisk];
|
[self saveQueueToDisk];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user