CUE Reader: Fix enumerating sheets and tag reading
The reader should have been skipping the properties of CUE sheets when reading the referenced data for the inner files. Fixes #235 Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
7ef583340d
commit
cad09b8912
|
@ -12,5 +12,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSDictionary *)propertiesForURL:(NSURL *)url;
|
+ (NSDictionary *)propertiesForURL:(NSURL *)url;
|
||||||
|
+ (NSDictionary *)propertiesForURL:(NSURL *)url skipCue:(BOOL)skip;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -15,7 +15,13 @@
|
||||||
|
|
||||||
+ (NSDictionary *)propertiesForURL:(NSURL *)url {
|
+ (NSDictionary *)propertiesForURL:(NSURL *)url {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
return [[PluginController sharedPluginController] propertiesForURL:url];
|
return [[PluginController sharedPluginController] propertiesForURL:url skipCue:NO];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (NSDictionary *)propertiesForURL:(NSURL *)url skipCue:(BOOL)skip {
|
||||||
|
@autoreleasepool {
|
||||||
|
return [[PluginController sharedPluginController] propertiesForURL:url skipCue:skip];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
- (id<CogSource>)audioSourceForURL:(NSURL *)url;
|
- (id<CogSource>)audioSourceForURL:(NSURL *)url;
|
||||||
- (NSArray *)urlsForContainerURL:(NSURL *)url;
|
- (NSArray *)urlsForContainerURL:(NSURL *)url;
|
||||||
- (NSDictionary *)metadataForURL:(NSURL *)url skipCue:(BOOL)skip;
|
- (NSDictionary *)metadataForURL:(NSURL *)url skipCue:(BOOL)skip;
|
||||||
- (NSDictionary *)propertiesForURL:(NSURL *)url;
|
- (NSDictionary *)propertiesForURL:(NSURL *)url skipCue:(BOOL)skip;
|
||||||
- (id<CogDecoder>)audioDecoderForSource:(id<CogSource>)source skipCue:(BOOL)skip;
|
- (id<CogDecoder>)audioDecoderForSource:(id<CogSource>)source skipCue:(BOOL)skip;
|
||||||
|
|
||||||
- (int)putMetadataInURL:(NSURL *)url;
|
- (int)putMetadataInURL:(NSURL *)url;
|
||||||
|
|
|
@ -486,7 +486,7 @@ static PluginController *sharedPluginController = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no properties reader is defined, use the decoder's properties.
|
// If no properties reader is defined, use the decoder's properties.
|
||||||
- (NSDictionary *)propertiesForURL:(NSURL *)url {
|
- (NSDictionary *)propertiesForURL:(NSURL *)url skipCue:(BOOL)skip {
|
||||||
NSString *urlScheme = [url scheme];
|
NSString *urlScheme = [url scheme];
|
||||||
if([urlScheme isEqualToString:@"http"] ||
|
if([urlScheme isEqualToString:@"http"] ||
|
||||||
[urlScheme isEqualToString:@"https"])
|
[urlScheme isEqualToString:@"https"])
|
||||||
|
@ -531,7 +531,7 @@ static PluginController *sharedPluginController = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
id<CogDecoder> decoder = [self audioDecoderForSource:source skipCue:NO];
|
id<CogDecoder> decoder = [self audioDecoderForSource:source skipCue:skip];
|
||||||
if(![decoder open:source]) {
|
if(![decoder open:source]) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
// Embedded cuesheet check
|
// Embedded cuesheet check
|
||||||
fileMetadata = [NSClassFromString(@"AudioMetadataReader") metadataForURL:url skipCue:YES];
|
fileMetadata = [NSClassFromString(@"AudioMetadataReader") metadataForURL:url skipCue:YES];
|
||||||
|
|
||||||
NSDictionary *alsoMetadata = [NSClassFromString(@"AudioPropertiesReader") propertiesForURL:url];
|
NSDictionary *alsoMetadata = [NSClassFromString(@"AudioPropertiesReader") propertiesForURL:url skipCue:YES];
|
||||||
|
|
||||||
NSString *sheet = [fileMetadata objectForKey:@"cuesheet"];
|
NSString *sheet = [fileMetadata objectForKey:@"cuesheet"];
|
||||||
if(!sheet || ![sheet length]) sheet = [alsoMetadata objectForKey:@"cuesheet"];
|
if(!sheet || ![sheet length]) sheet = [alsoMetadata objectForKey:@"cuesheet"];
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
// Embedded cuesheet check
|
// Embedded cuesheet check
|
||||||
fileMetadata = [audioMetadataReader metadataForURL:url skipCue:YES];
|
fileMetadata = [audioMetadataReader metadataForURL:url skipCue:YES];
|
||||||
|
|
||||||
NSDictionary *alsoMetadata = [NSClassFromString(@"AudioPropertiesReader") propertiesForURL:url];
|
NSDictionary *alsoMetadata = [NSClassFromString(@"AudioPropertiesReader") propertiesForURL:url skipCue:YES];
|
||||||
|
|
||||||
NSString *sheet = [fileMetadata objectForKey:@"cuesheet"];
|
NSString *sheet = [fileMetadata objectForKey:@"cuesheet"];
|
||||||
if(!sheet || ![sheet length]) sheet = [alsoMetadata objectForKey:@"cuesheet"];
|
if(!sheet || ![sheet length]) sheet = [alsoMetadata objectForKey:@"cuesheet"];
|
||||||
|
|
Loading…
Reference in New Issue