Dictionary merge: Correctly drop empty data tags
This allows for TagLib to handle artwork reading where the file built-in readers fail, such as the FFmpeg reader, which would require parsing the stream data for artwork packets, a really wacky convention to have. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
007ec3696d
commit
2a27435f7e
|
@ -20,6 +20,9 @@
|
||||||
} else if([objTarget isKindOfClass:[NSNumber class]]) {
|
} else if([objTarget isKindOfClass:[NSNumber class]]) {
|
||||||
NSNumber *val = (NSNumber *)objTarget;
|
NSNumber *val = (NSNumber *)objTarget;
|
||||||
isEmpty = [val isEqualTo:@(0)];
|
isEmpty = [val isEqualTo:@(0)];
|
||||||
|
} else if([objTarget isKindOfClass:[NSData class]]) {
|
||||||
|
NSData *val = (NSData *)objTarget;
|
||||||
|
isEmpty = [val length] == 0;
|
||||||
}
|
}
|
||||||
if(isEmpty) {
|
if(isEmpty) {
|
||||||
[result setObject:obj forKey:key];
|
[result setObject:obj forKey:key];
|
||||||
|
|
Loading…
Reference in New Issue