Fix presets in the Queue.

This commit is contained in:
Damiano Galassi committed 2017-08-28 16:25:37 +02:00
1 parent f8c861df15
commit 107c9273fd
7 files changed
+45 -29

No files matched your search

+7 -7
View File
@@ -89,27 +89,27 @@
@end
@implementation SBQueueSetAction {
MP42Metadata *_set;
SBMetadataPreset *_set;
}
- (instancetype)initWithSet:(MP42Metadata *)set {
- (instancetype)initWithPreset:(SBMetadataPreset *)preset {
self = [super init];
if (self) {
_set = [set copy];
_set = [preset copy];
}
return self;
}
- (void)runAction:(SBQueueItem *)item {
[item.mp4File.metadata mergeMetadata:_set];
[item.mp4File.metadata mergeMetadata:_set.metadata];
}
- (NSString *)description {
return [NSString stringWithFormat:NSLocalizedString(@"Apply %@ Set", @""), _set.presetName];
return [NSString stringWithFormat:NSLocalizedString(@"Apply %@ Set", @""), _set.title];
}
- (NSString *)localizedDescription {
return [NSString stringWithFormat:NSLocalizedString(@"Applying %@ set", @""), _set.presetName];
return [NSString stringWithFormat:NSLocalizedString(@"Applying %@ set", @""), _set.title];
}
+ (BOOL)supportsSecureCoding {
@@ -119,7 +119,7 @@
- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super init];
if (self) {
_set = [coder decodeObjectOfClass:[MP42Metadata class] forKey:@"SBQueueActionSet"];
_set = [coder decodeObjectOfClass:[SBMetadataPreset class] forKey:@"SBQueueActionSet"];
}
return self;
}