[Plugin Controller] Add Cue sheet safety check

If somehow a plugin doesn't load, skip cuesheet should skip it anyway,
as we don't want any recursive loops.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
lastfm
Christopher Snowhill 2022-07-01 13:38:49 -07:00
parent 99f15679a6
commit 70b01a7cf1
1 changed files with 8 additions and 0 deletions

View File

@ -630,6 +630,10 @@ static NSString *xmlEscapeString(NSString * string) {
} }
} }
if(skip && [classString isEqualToString:@"CueSheetDecoder"]) {
classString = @"SilenceDecoder";
}
Class decoder = NSClassFromString(classString); Class decoder = NSClassFromString(classString);
return [[decoder alloc] init]; return [[decoder alloc] init];
@ -671,6 +675,10 @@ static NSString *xmlEscapeString(NSString * string) {
return nil; return nil;
} }
if(skip && [classString isEqualToString:@"CueSheetMetadataReader"]) {
return nil;
}
Class metadataReader = NSClassFromString(classString); Class metadataReader = NSClassFromString(classString);
cacheData = [metadataReader metadataForURL:url]; cacheData = [metadataReader metadataForURL:url];