summaryrefslogtreecommitdiffstats
path: root/macosx/HBRemoteCore.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-11 13:16:44 +0200
committerDamiano Galassi <[email protected]>2019-08-11 13:16:44 +0200
commitae8703461f0d248352b71f4518f1a6bfef31acb9 (patch)
treead230c2134b1da3b8de3611de440415217323ee2 /macosx/HBRemoteCore.m
parent0269063fae2c1f23c36196df9741a846911217a4 (diff)
MacGui: improve xpc crash recovery, set dvdnav option in the xpc service.
Diffstat (limited to 'macosx/HBRemoteCore.m')
-rw-r--r--macosx/HBRemoteCore.m18
1 files changed, 13 insertions, 5 deletions
diff --git a/macosx/HBRemoteCore.m b/macosx/HBRemoteCore.m
index b239cbaab..a66879e1b 100644
--- a/macosx/HBRemoteCore.m
+++ b/macosx/HBRemoteCore.m
@@ -4,6 +4,7 @@
#import "HBRemoteCore.h"
#import "HBRemoteCoreProtocol.h"
+#import "HBPreferencesKeys.h"
@import HandBrakeKit;
@@ -68,18 +69,24 @@
- (void)handleInterruption
{
+ [_proxy setUpWithLogLevel:self.level name:self.name];
+
if (self.state != HBStateIdle)
{
[self forwardError:@"XPC Service did crash"];
+
+ HBCoreCompletionHandler handler = self.completionHandler;
+
self.progressHandler = nil;
- if (self.completionHandler)
- {
- self.completionHandler(HBCoreResultFailed);
- }
self.completionHandler = nil;
+
self.state = HBStateIdle;
+
+ if (handler)
+ {
+ handler(HBCoreResultFailed);
+ }
}
- [_proxy setUpWithLogLevel:self.level name:self.name];
}
- (instancetype)initWithLogLevel:(NSInteger)level name:(NSString *)name
@@ -89,6 +96,7 @@
{
_level = level;
_name = name;
+ [_proxy setDVDNav:[NSUserDefaults.standardUserDefaults boolForKey:HBUseDvdNav]];
[_proxy setUpWithLogLevel:level name:name];
}
return self;