From 5c48cb1e216f61a7cbec076b04a7fff07f43e5d9 Mon Sep 17 00:00:00 2001 From: dinkypumpkin Date: Mon, 24 Apr 2017 19:29:20 +0100 Subject: [PATCH] Revert "ITV: Force use of alternate indexing (no quick caching)" This reverts commit f7e4259e18cca5bd1322fb1c100499fcd7b19bf1. --- AppController.m | 12 ++++++++---- English.lproj/MainMenu.xib | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/AppController.m b/AppController.m index ac133517..75965950 100644 --- a/AppController.m +++ b/AppController.m @@ -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; @@ -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]; @@ -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"]) { @@ -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]; diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 8ca22f03..316ab251 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -1842,15 +1842,26 @@ - - + + - + + @@ -1894,17 +1905,6 @@ - @@ -2571,10 +2571,10 @@ -