Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Improve AudioDescribed and Signed options by allowing them to be enab…
Browse files Browse the repository at this point in the history
…led individually.
  • Loading branch information
willson556 committed Aug 17, 2014
1 parent 4763e95 commit e5d18c1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 16 deletions.
11 changes: 10 additions & 1 deletion AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,26 @@ - (id)init {
defaultValues[@"XBMC_naming"] = @NO;
defaultValues[@"KeepSeriesFor"] = @"30";
defaultValues[@"RemoveOldSeries"] = @NO;
defaultValues[@"AudioDescribed"] = @NO;
defaultValues[@"QuickCache"] = @YES;
defaultValues[@"TagShows"] = @YES;
// TODO: remove 4oD
// set 4oD off by default
defaultValues[@"Cache4oD_TV"] = @NO;
defaultValues[@"TestProxy"] = @YES;
defaultValues[@"ShowDownloadedInSearch"] = @YES;

defaultValues[@"AudioDescribedNew"] = @NO;
defaultValues[@"SignedNew"] = @NO;

[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
defaultValues = nil;

//Migrate old AudioDescribed option
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"AudioDescribed"]) {
[[NSUserDefaults standardUserDefaults] setObject:@YES forKey:@"AudioDescribedNew"];
[[NSUserDefaults standardUserDefaults] setObject:@YES forKey:@"SignedNew"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AudioDescribed"];
}

//Make sure Application Support folder exists
NSString *folder = @"~/Library/Application Support/Get iPlayer Automator/";
Expand Down
13 changes: 7 additions & 6 deletions BBCDownload.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ - (id)initWithProgramme:(Programme *)tempShow tvFormats:(NSArray *)tvFormatList
getArg = @"--pid";
NSString *searchArg = [[NSString alloc] initWithFormat:@"%@", [show pid]];

//AudioDescribed
NSString *versionArg;
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"AudioDescribed"] boolValue])
versionArg = @"--versions=audiodescribed,signed,default";
else
versionArg = @"--versions=default";
//AudioDescribed & Signed
NSMutableString *versionArg = [NSMutableString stringWithString:@"--versions="];
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"AudioDescribedNew"] boolValue])
[versionArg appendString:@"audiodescribed,"];
if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"SignedNew"] boolValue])
[versionArg appendString:@"signed,"];
[versionArg appendString:@"default"];

//We don't want this to refresh now!
NSString *cacheExpiryArg = @"-e604800000000";
Expand Down
29 changes: 20 additions & 9 deletions English.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,11 @@ AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
<rect key="frame" x="21" y="84" width="770" height="187"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<clipView key="contentView" copiesOnScroll="NO" id="qBj-Iv-0lY">
<rect key="frame" x="0.0" y="17" width="770" height="170"/>
<rect key="frame" x="0.0" y="17" width="754" height="170"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" autosaveColumns="NO" headerView="470" id="469">
<rect key="frame" x="0.0" y="0.0" width="770" height="170"/>
<rect key="frame" x="0.0" y="0.0" width="754" height="170"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
Expand Down Expand Up @@ -568,7 +568,7 @@ AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</binding>
</connections>
</tableColumn>
<tableColumn width="489" minWidth="10" maxWidth="3.4028229999999999e+38" id="503">
<tableColumn width="473" minWidth="10" maxWidth="3.4028229999999999e+38" id="503">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Show Name - Episode Name">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -606,7 +606,7 @@ AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="470">
<rect key="frame" x="0.0" y="0.0" width="770" height="17"/>
<rect key="frame" x="0.0" y="0.0" width="754" height="17"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
Expand Down Expand Up @@ -711,7 +711,7 @@ AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="491">
<rect key="frame" x="753" y="17" width="16" height="129"/>
<rect key="frame" x="754" y="17" width="15" height="129"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="494">
Expand Down Expand Up @@ -1621,21 +1621,21 @@ AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
<textField verticalHuggingPriority="750" id="1472">
<rect key="frame" x="14" y="95" width="312" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Download Audio Described and Signed Versions:" id="1473">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Audio Described and Signed Versions:" id="1473">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button id="1474">
<rect key="frame" x="328" y="94" width="22" height="18"/>
<rect key="frame" x="255" y="94" width="72" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="1475">
<buttonCell key="cell" type="check" title="Signed" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="1475">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="668" name="value" keyPath="values.AudioDescribed" id="1478"/>
<binding destination="668" name="value" keyPath="values.SignedNew" id="klz-kq-uMx"/>
</connections>
</button>
<textField verticalHuggingPriority="750" id="1479">
Expand Down Expand Up @@ -1678,6 +1678,17 @@ AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
<binding destination="668" name="value" keyPath="values.TagShows" id="1490"/>
</connections>
</button>
<button id="bjS-0F-vwY">
<rect key="frame" x="325" y="94" width="126" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Audio Described" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="BqQ-Cj-hgl">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="668" name="value" keyPath="values.AudioDescribedNew" id="JbU-6S-ZFJ"/>
</connections>
</button>
</subviews>
</view>
</tabViewItem>
Expand Down

0 comments on commit e5d18c1

Please sign in to comment.