diff options
author | Damiano Galassi <[email protected]> | 2017-01-25 10:43:59 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2017-01-25 10:43:59 +0100 |
commit | 79c33c0ca996311224bbd3719c85238a3358cb5e (patch) | |
tree | 532256b5d06259f82648fe5f7922ae7c63b36299 /macosx | |
parent | 4334419b4adbc78648608ad4076de8005f4c4f27 (diff) |
MacGui: select the right title when editing a queue job, libhb avoids rescanning if the same file/folder is loaded.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBController.m | 18 |
1 files changed, 17 insertions, 1 deletions
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<HBTitle *> *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; }]; |