From 3ec374b8d07a5faf7eea1945ab5aeaead78d8c71 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 15 Sep 2015 15:08:36 +0100 Subject: [PATCH] Fix failure to display audio analysis in some cases. Before we were checking existing AnalyseAudioJobs by their audio analysis path, which may change after they have been run since they use up-to-date info such as the Film's processor. e.g. Run audio analysis for content. Enable processor. Re-run analysis for film; now before it would think that the existing job has done the *new* analysis because its path would be the same as the one we now want. --- ChangeLog | 5 +++++ src/lib/job_manager.cc | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80e48ac87..569ea9e8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-09-15 c.hetherington + + * Fix failure to display audio analysis + in some cases. + 2015-09-15 Carl Hetherington * Version 2.3.2 released. diff --git a/src/lib/job_manager.cc b/src/lib/job_manager.cc index 0597983db..545fd956c 100644 --- a/src/lib/job_manager.cc +++ b/src/lib/job_manager.cc @@ -180,18 +180,22 @@ JobManager::analyse_audio ( function ready ) { - shared_ptr job; - { boost::mutex::scoped_lock lm (_mutex); BOOST_FOREACH (shared_ptr i, _jobs) { shared_ptr a = dynamic_pointer_cast (i); - if (a && film->audio_analysis_path (a->playlist ()) == film->audio_analysis_path (playlist)) { + if (a && a->playlist () == playlist) { i->when_finished (connection, ready); return; } } + } + + shared_ptr job; + + { + boost::mutex::scoped_lock lm (_mutex); job.reset (new AnalyseAudioJob (film, playlist)); connection = job->Finished.connect (ready); -- 2.30.2