Allow re-start of cancelled subtitle analysis jobs.
authorCarl Hetherington <cth@carlh.net>
Thu, 16 Mar 2023 01:03:21 +0000 (02:03 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 16 Mar 2023 21:45:19 +0000 (22:45 +0100)
src/lib/job_manager.cc

index 9fcd86f2d38b7c034a332740a74457f672bd1b9b..86230db2b77a7653f86e46bf7165a51ccad84c82 100644 (file)
@@ -272,7 +272,7 @@ JobManager::analyse_subtitles (
 
                for (auto i: _jobs) {
                        auto a = dynamic_pointer_cast<AnalyseSubtitlesJob> (i);
-                       if (a && a->path() == film->subtitle_analysis_path(content)) {
+                       if (a && a->path() == film->subtitle_analysis_path(content) && !i->finished_cancelled()) {
                                i->when_finished (connection, ready);
                                return;
                        }