From 79c33c0ca996311224bbd3719c85238a3358cb5e Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 25 Jan 2017 10:43:59 +0100 Subject: MacGui: select the right title when editing a queue job, libhb avoids rescanning if the same file/folder is loaded. --- macosx/HBController.m | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'macosx') 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; }]; -- cgit v1.2.3