Do not load sets with a newer file version than the one supported.

This commit is contained in:
Damiano Galassi committed 2016-12-07 10:08:53 +01:00
1 parent f44c24ecc5
commit 1fb07668f3
2 files changed
+10 -4

No files matched your search

+3 -3
View File
@@ -66,7 +66,7 @@ static NSDictionary<NSString *, NSNumber *> *_defaultTypes;
if (dataType == MP42MetadataItemDataTypeUnspecified) {
_dataType = [MP42MetadataItem defaultDataTypeForIdentifier:identifier];
[self convertToNativeValue];
[self convertToType:_dataType];
}
else {
_dataType = dataType;
@@ -89,13 +89,13 @@ static NSDictionary<NSString *, NSNumber *> *_defaultTypes;
return dataType == 0 ? MP42MetadataItemDataTypeString : dataType;
}
- (void)convertToNativeValue
- (void)convertToType:(MP42MetadataItemDataType)dataType
{
if ([_value isKindOfClass:[NSString class]]) {
[self convertStringToNativeValue];
}
else if ([_value isKindOfClass:[NSNumber class]]) {
[self convertStringToNativeValue];
[self convertNumberToNativeValue];
}
else if ([_value isKindOfClass:[NSData class]]) {
[self convertDataToNativeValue];