diff --git a/client/osx-ui/DJRandomUploader/ProcessController.m b/client/osx-ui/DJRandomUploader/ProcessController.m index cb3f78ad2ad98e36245f7e933e8b2934f4a28f59..32e3408ac49c8e3ac367f5d8504b16ef607de503 100644 --- a/client/osx-ui/DJRandomUploader/ProcessController.m +++ b/client/osx-ui/DJRandomUploader/ProcessController.m @@ -18,8 +18,8 @@ // Initialization code here. curMusicFolder = @""; curApiKey = @""; - curBwLimit = [NSNumber numberWithInt:0]; - task = [[NSTask alloc] init]; + curBwLimit = [[NSNumber numberWithInt:0] retain]; + task = nil; NSBundle *bundle = [NSBundle bundleForClass:[self class]]; path = [bundle pathForAuxiliaryExecutable:@"djrandom-client"]; if (path == nil) { @@ -54,6 +54,7 @@ NSArray *args = [NSArray arrayWithObjects:@"--api_key", curApiKey, @"--music_dir", curMusicFolder, @"--debug", @"--foreground", + @"--no_realtime_watch", nil]; if ([curBwLimit intValue] > 0) { args = [args arrayByAddingObjectsFromArray:[NSArray @@ -61,7 +62,7 @@ [curBwLimit stringValue], nil]]; } NSLog(@"Starting subprocess with args: %@", args); - task = [NSTask launchedTaskWithLaunchPath:path arguments:args]; + task = [[NSTask launchedTaskWithLaunchPath:path arguments:args] retain]; } } @@ -71,7 +72,7 @@ ![bwLimit isEqualToNumber:curBwLimit]) { curMusicFolder = musicDir; curApiKey = apiKey; - curBwLimit = [bwLimit copy]; + curBwLimit = [bwLimit retain]; [self reloadProcess]; } }