From: Damiano Galassi Date: Wed, 25 Jan 2017 09:43:59 +0000 (+0100) Subject: MacGui: select the right title when editing a queue job, libhb avoids rescanning... X-Git-Tag: 1.1.0~757 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79c33c0ca996311224bbd3719c85238a3358cb5e;p=handbrake MacGui: select the right title when editing a queue job, libhb avoids rescanning if the same file/folder is loaded. --- diff --git a/macosx/HBController.m b/macosx/HBController.m index 2b44aa945..5859f0c6a 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -673,7 +673,23 @@ { [self scanURL:job.fileURL titleIndex:job.titleIdx completionHandler:^(NSArray *titles) { - job.title = titles.firstObject; + // If the scan was cached, reselect + // the original title + for (HBTitle *title in titles) + { + if (title.index == job.titleIdx) + { + job.title = title; + break; + } + } + + // Else just one title or a title specific rescan + // select the first title + if (!job.title) + { + job.title = titles.firstObject; + } self.job = job; }];