Rename id to iTunesID to avoid ambiguous code highlight in Xcode.
This commit is contained in:
1 parent
9f5d0f6072
commit
408e679324
1 file changed
+4
-4
@@ -146,20 +146,20 @@ NSInteger sortSBMetadataResult(id ep1, id ep2, void *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NSData *jsonData = [SBMetadataHelper downloadDataFromURL:url withCachePolicy:SBDefaultPolicy];
|
NSData *jsonData = [SBMetadataHelper downloadDataFromURL:url withCachePolicy:SBDefaultPolicy];
|
||||||
NSInteger id;
|
NSInteger iTunesID = 0;
|
||||||
|
|
||||||
if (jsonData) {
|
if (jsonData) {
|
||||||
NSDictionary *d = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil];
|
NSDictionary *d = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil];
|
||||||
|
|
||||||
if ([d isKindOfClass:[NSDictionary class]]) {
|
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 we have an ID, use the lookup API to get episodes for that show/season
|
||||||
if (id != 0) {
|
if (iTunesID != 0) {
|
||||||
NSURL *lookupUrl;
|
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];
|
jsonData = [SBMetadataHelper downloadDataFromURL:lookupUrl withCachePolicy:SBDefaultPolicy];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user