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

Commit

Permalink
Revert "ITV: Force use of alternate indexing (no quick caching)"
Browse files Browse the repository at this point in the history
This reverts commit f7e4259.
  • Loading branch information
dinkypumpkin committed Apr 25, 2017
1 parent 871cf4b commit 5c48cb1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
12 changes: 8 additions & 4 deletions AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ - (id)init {
defaultValues[@"ShowITV"] = @YES;
defaultValues[@"TestProxy"] = @YES;
defaultValues[@"ShowDownloadedInSearch"] = @YES;
defaultValues[@"AltCacheITV_TV"] = @YES;
defaultValues[@"AltCacheITV_TV"] = @NO;
defaultValues[@"AudioDescribedNew"] = @NO;
defaultValues[@"SignedNew"] = @NO;

Expand Down Expand Up @@ -503,7 +503,9 @@ - (void)updateCache:(id)sender proxyDict:(NSDictionary *)proxyDict
proxy = proxyDict[@"proxy"];
}

if ( [[[NSUserDefaults standardUserDefaults] valueForKey:@"CacheITV_TV"] isEqualTo:@YES] )
BOOL altITV = [[[NSUserDefaults standardUserDefaults] valueForKey:@"AltCacheITV_TV"] isEqualTo:@YES];

if ( altITV && [[[NSUserDefaults standardUserDefaults] valueForKey:@"CacheITV_TV"] isEqualTo:@YES] )
{
updatingITVIndex = true;
[[self itvProgressIndicator] startAnimation:self];
Expand All @@ -530,7 +532,7 @@ - (void)updateCache:(id)sender proxyDict:(NSDictionary *)proxyDict
cacheExpiryArg = [[NSString alloc] initWithFormat:@"-e%d", ([[[NSUserDefaults standardUserDefaults] objectForKey:@"CacheExpiryTime"] intValue]*3600)];
}

NSString *typeArgument = [[GetiPlayerArguments sharedController] typeArgumentForCacheUpdate:YES andIncludeITV:NO];
NSString *typeArgument = [[GetiPlayerArguments sharedController] typeArgumentForCacheUpdate:YES andIncludeITV:!altITV];

if (![typeArgument isEqualToString:@"--type"]) {

Expand Down Expand Up @@ -584,10 +586,12 @@ - (void)updateCache:(id)sender proxyDict:(NSDictionary *)proxyDict
{
typesToCache = [[NSMutableArray alloc] initWithCapacity:4];
if ([[defaults objectForKey:@"CacheBBC_TV"] boolValue]) [typesToCache addObject:@"tv"];
if (!altITV && [[defaults objectForKey:@"CacheITV_TV"] boolValue]) [typesToCache addObject:@"itv"];
if ([[defaults objectForKey:@"CacheBBC_Radio"] boolValue]) [typesToCache addObject:@"radio"];

NSArray *urlKeys = @[@"tv",@"radio"];
NSArray *urlKeys = @[@"tv",@"itv",@"radio"];
NSArray *urlObjects = @[@"http://tom-tech.com/get_iplayer/cache/tv.cache",
@"http://tom-tech.com/get_iplayer/cache/itv.cache",
@"http://tom-tech.com/get_iplayer/cache/radio.cache"];
updateURLDic = [[NSDictionary alloc] initWithObjects:urlObjects forKeys:urlKeys];

Expand Down
32 changes: 16 additions & 16 deletions English.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -1842,15 +1842,26 @@
<binding destination="668" name="value" keyPath="values.SignedNew" id="klz-kq-uMx"/>
</connections>
</button>
<textField verticalHuggingPriority="750" misplaced="YES" id="1479">
<rect key="frame" x="14" y="76" width="166" height="17"/>
<textField verticalHuggingPriority="750" id="1479">
<rect key="frame" x="14" y="76" width="100" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Quick Caching (BBC Only):" id="1480">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Quick Caching:" id="1480">
<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="1481">
<rect key="frame" x="117" y="75" width="22" 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="1482">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="668" name="value" keyPath="values.QuickCache" id="1483"/>
</connections>
</button>
<textField verticalHuggingPriority="750" id="1484">
<rect key="frame" x="14" y="51" width="291" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
Expand Down Expand Up @@ -1894,17 +1905,6 @@
<binding destination="668" name="value" keyPath="values.CacheITV_TV" id="jRb-OC-Zbd"/>
</connections>
</button>
<button misplaced="YES" id="1481">
<rect key="frame" x="183" y="74" width="22" 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="1482">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="668" name="value" keyPath="values.QuickCache" id="1483"/>
</connections>
</button>
</subviews>
</view>
</tabViewItem>
Expand Down Expand Up @@ -2571,10 +2571,10 @@
<binding destination="668" name="value" keyPath="values.TestProxy" id="1538"/>
</connections>
</button>
<button hidden="YES" misplaced="YES" id="Ub7-bz-5JJ">
<button misplaced="YES" id="Ub7-bz-5JJ">
<rect key="frame" x="15" y="436" width="225" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Use Alternate ITV Cache Refresh:" bezelStyle="regularSquare" imagePosition="right" alignment="left" state="on" inset="2" id="Q4c-MN-xPg" userLabel="Use Alternate ITV Cache Refresh:">
<buttonCell key="cell" type="check" title="Use Alternate ITV Cache Refresh:" bezelStyle="regularSquare" imagePosition="right" alignment="left" inset="2" id="Q4c-MN-xPg" userLabel="Use Alternate ITV Cache Refresh:">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
Expand Down

0 comments on commit 5c48cb1

Please sign in to comment.