From 9f5d0f60726feddb0951e0587d0748fbc544c8a8 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 10 Mar 2017 08:03:03 +0100 Subject: [PATCH 1/3] Update submodule --- MP42Foundation | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP42Foundation b/MP42Foundation index 2d67e1b..45619d6 160000 --- a/MP42Foundation +++ b/MP42Foundation @@ -1 +1 @@ -Subproject commit 2d67e1b718820a422531214a7b2a70ea8644e769 +Subproject commit 45619d646a237cb8b9f374eb5676af4002464ec6 From 408e679324e783442616d9686f89818d1afba416 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 10 Mar 2017 08:05:40 +0100 Subject: [PATCH 2/3] Rename id to iTunesID to avoid ambiguous code highlight in Xcode. --- Classes/MetadataImporters/SBiTunesStore.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/MetadataImporters/SBiTunesStore.m b/Classes/MetadataImporters/SBiTunesStore.m index 4d2d460..8e7fb76 100755 --- a/Classes/MetadataImporters/SBiTunesStore.m +++ b/Classes/MetadataImporters/SBiTunesStore.m @@ -146,20 +146,20 @@ NSInteger sortSBMetadataResult(id ep1, id ep2, void *context) } NSData *jsonData = [SBMetadataHelper downloadDataFromURL:url withCachePolicy:SBDefaultPolicy]; - NSInteger id; + NSInteger iTunesID = 0; if (jsonData) { NSDictionary *d = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; if ([d isKindOfClass:[NSDictionary class]]) { - id = [SBiTunesStore showOrSeasonIdFromResults:d forShow:aSeriesName andSeason:aSeasonNum andSeasonString:season]; + iTunesID = [SBiTunesStore showOrSeasonIdFromResults:d forShow:aSeriesName andSeason:aSeasonNum andSeasonString:season]; } } // If we have an ID, use the lookup API to get episodes for that show/season - if (id != 0) { + if (iTunesID != 0) { NSURL *lookupUrl; - lookupUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://itunes.apple.com/lookup?id=%ld&entity=tvEpisode&limit=200", (long)id]]; + lookupUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://itunes.apple.com/lookup?id=%ld&entity=tvEpisode&limit=200", (long)iTunesID]]; jsonData = [SBMetadataHelper downloadDataFromURL:lookupUrl withCachePolicy:SBDefaultPolicy]; From d6b340cae7e22f87d4a64246acfe3ccee61a42ce Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 10 Mar 2017 08:07:06 +0100 Subject: [PATCH 3/3] Use https instead of http. --- Classes/MetadataImporters/SBiTunesStore.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/MetadataImporters/SBiTunesStore.m b/Classes/MetadataImporters/SBiTunesStore.m index 8e7fb76..bd99885 100755 --- a/Classes/MetadataImporters/SBiTunesStore.m +++ b/Classes/MetadataImporters/SBiTunesStore.m @@ -159,7 +159,7 @@ NSInteger sortSBMetadataResult(id ep1, id ep2, void *context) // If we have an ID, use the lookup API to get episodes for that show/season if (iTunesID != 0) { NSURL *lookupUrl; - lookupUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://itunes.apple.com/lookup?id=%ld&entity=tvEpisode&limit=200", (long)iTunesID]]; + lookupUrl = [NSURL URLWithString:[NSString stringWithFormat:@"https://itunes.apple.com/lookup?id=%ld&entity=tvEpisode&limit=200", (long)iTunesID]]; jsonData = [SBMetadataHelper downloadDataFromURL:lookupUrl withCachePolicy:SBDefaultPolicy];