diff options
Diffstat (limited to 'macosx/HBJob.m')
-rw-r--r-- | macosx/HBJob.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/macosx/HBJob.m b/macosx/HBJob.m index 23af79b7a..dccd9434c 100644 --- a/macosx/HBJob.m +++ b/macosx/HBJob.m @@ -64,6 +64,15 @@ NSString *keyContainerTag = @"keyContainerTag"; - (void)applyPreset:(HBPreset *)preset { + if (preset.isDefault) + { + self.presetName = [NSString stringWithFormat:@"%@ (Default)", preset.name]; + } + else + { + self.presetName = preset.name; + } + NSDictionary *content = preset.content; self.container = hb_container_get_from_name(hb_container_sanitize_name([content[@"FileFormat"] UTF8String])); @@ -648,6 +657,7 @@ NSString *keyContainerTag = @"keyContainerTag"; if (copy) { copy->_state = HBJobStateReady; + copy->_presetName = [_presetName copy]; copy->_titleIdx = _titleIdx; copy->_pidId = _pidId; @@ -664,6 +674,8 @@ NSString *keyContainerTag = @"keyContainerTag"; copy->_picture = [_picture copy]; copy->_filters = [_filters copy]; + copy->_video.job = copy; + // Copy the tracks, but not the last one because it's empty. copy->_audioTracks = [[NSMutableArray alloc] init]; [_audioTracks enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { @@ -696,6 +708,7 @@ NSString *keyContainerTag = @"keyContainerTag"; [coder encodeInt:1 forKey:@"HBVideoVersion"]; encodeInt(_state); + encodeObject(_presetName); encodeInt(_titleIdx); encodeInt(_pidId); @@ -727,6 +740,7 @@ NSString *keyContainerTag = @"keyContainerTag"; self = [super init]; decodeInt(_state); + decodeObject(_presetName); decodeInt(_titleIdx); decodeInt(_pidId); |