From f7e4259e18cca5bd1322fb1c100499fcd7b19bf1 Mon Sep 17 00:00:00 2001 From: dinkypumpkin Date: Sat, 7 Jan 2017 18:34:37 +0000 Subject: [PATCH] ITV: Force use of alternate indexing (no quick caching) ITV quick caching has been dead for months, and there is no point in using the slow get_iplayer plugin for local indexing when alternate works as well or better, and can perform incremental updates. --- AppController.m | 12 ++++-------- English.lproj/MainMenu.xib | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/AppController.m b/AppController.m index 75965950..ac133517 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"] = @NO; + defaultValues[@"AltCacheITV_TV"] = @YES; defaultValues[@"AudioDescribedNew"] = @NO; defaultValues[@"SignedNew"] = @NO; @@ -503,9 +503,7 @@ - (void)updateCache:(id)sender proxyDict:(NSDictionary *)proxyDict proxy = proxyDict[@"proxy"]; } - BOOL altITV = [[[NSUserDefaults standardUserDefaults] valueForKey:@"AltCacheITV_TV"] isEqualTo:@YES]; - - if ( altITV && [[[NSUserDefaults standardUserDefaults] valueForKey:@"CacheITV_TV"] isEqualTo:@YES] ) + if ( [[[NSUserDefaults standardUserDefaults] valueForKey:@"CacheITV_TV"] isEqualTo:@YES] ) { updatingITVIndex = true; [[self itvProgressIndicator] startAnimation:self]; @@ -532,7 +530,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:!altITV]; + NSString *typeArgument = [[GetiPlayerArguments sharedController] typeArgumentForCacheUpdate:YES andIncludeITV:NO]; if (![typeArgument isEqualToString:@"--type"]) { @@ -586,12 +584,10 @@ - (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",@"itv",@"radio"]; + NSArray *urlKeys = @[@"tv",@"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 316ab251..8ca22f03 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -1842,26 +1842,15 @@ - - + + - + - @@ -1905,6 +1894,17 @@ + @@ -2571,10 +2571,10 @@ -