Check the class type in the initialize method
This commit is contained in:
1 parent
4c63819987
commit
40a57a3fe6
1 file changed
+2
@@ -22,6 +22,7 @@ static NSArray *TVDBlanguages;
|
||||
@implementation TheTVDB
|
||||
|
||||
+ (void)initialize {
|
||||
if (self == [TheTVDB class]) {
|
||||
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://thetvdb.com/api/%@/languages.xml", API_KEY]];
|
||||
NSData *languagesXML = [MetadataImporter downloadDataFromURL:url withCachePolicy:SBReturnCacheElseLoad];
|
||||
NSDictionary *languages = [XMLReader dictionaryForXMLData:languagesXML error:NULL];
|
||||
@@ -42,6 +43,7 @@ static NSArray *TVDBlanguages;
|
||||
|
||||
TVDBlanguages = [[NSArray arrayWithArray:languagesResult] retain];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray *) languages {
|
||||
|
||||
Reference in new issue
Block a user