summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-09-15 15:08:36 +0100
committerCarl Hetherington <cth@carlh.net>2015-09-15 15:08:36 +0100
commit3ec374b8d07a5faf7eea1945ab5aeaead78d8c71 (patch)
tree589ba60d19542341d5f2946df00ba02dd1d593b5 /src/lib
parent9b5386eaf317f2c8091781a3ff015aefaa75fc92 (diff)
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.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/job_manager.cc10
1 files changed, 7 insertions, 3 deletions
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<void()> ready
)
{
- shared_ptr<AnalyseAudioJob> job;
-
{
boost::mutex::scoped_lock lm (_mutex);
BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
shared_ptr<AnalyseAudioJob> a = dynamic_pointer_cast<AnalyseAudioJob> (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<AnalyseAudioJob> job;
+
+ {
+ boost::mutex::scoped_lock lm (_mutex);
job.reset (new AnalyseAudioJob (film, playlist));
connection = job->Finished.connect (ready);