summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob+HBJobConversion.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-10-29 13:24:01 +0200
committerDamiano Galassi <[email protected]>2016-10-29 14:08:19 +0200
commit185a922d275ef95db2fa73ee31e07bcafbdecaae (patch)
tree8ae73547d8acaf987091d5ab29bf3a3db279bf4a /macosx/HBJob+HBJobConversion.m
parent2e48a329ffa5123439cf82b5163176713eb64432 (diff)
MacGui: use hb_preset_job_init instead of custom logic for audio, subtitles and picture job settings.
Diffstat (limited to 'macosx/HBJob+HBJobConversion.m')
-rw-r--r--macosx/HBJob+HBJobConversion.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m
index e90ccfd6c..5c6d9126b 100644
--- a/macosx/HBJob+HBJobConversion.m
+++ b/macosx/HBJob+HBJobConversion.m
@@ -13,10 +13,21 @@
#import "HBChapter.h"
-#import "HBTitlePrivate.h"
+#import "HBTitle+Private.h"
+#import "HBMutablePreset.h"
@implementation HBJob (HBJobConversion)
+- (NSDictionary *)jobDict
+{
+ NSAssert(self.title, @"HBJob: calling jobDict without a valid title loaded");
+
+ HBMutablePreset *preset = [[HBMutablePreset alloc] init];
+ [self writeToPreset:preset];
+
+ return [self.title jobSettingsWithPreset:preset];
+}
+
/**
* Prepares a hb_job_t
*/