Don't trigger any audio job if audio thumbnails are disabled.

Related to #102
parent ecaefd93
......@@ -3954,7 +3954,9 @@ void Bin::reloadAllProducers(bool reloadThumbs)
ThumbnailCache::get()->invalidateThumbsForClip(clip->clipId(), true);
}
pCore->jobManager()->startJob<ThumbJob>({clip->clipId()}, jobId, QString(), -1, true, true);
pCore->jobManager()->startJob<AudioThumbJob>({clip->clipId()}, jobId, QString());
if (KdenliveSettings::audiothumbnails()) {
pCore->jobManager()->startJob<AudioThumbJob>({clip->clipId()}, jobId, QString());
}
}
}
}
......
......@@ -361,7 +361,9 @@ void ProjectClip::reloadProducer(bool refreshOnly, bool audioStreamChanged, bool
// refresh bin/monitor mini thumb only
discardAudioThumb(true);
}
pCore->jobManager()->startJob<AudioThumbJob>({clipId()}, loadjobId, QString());
if (KdenliveSettings::audiothumbnails()) {
pCore->jobManager()->startJob<AudioThumbJob>({clipId()}, loadjobId, QString());
}
}
}
}
......
......@@ -709,8 +709,10 @@ bool ProjectItemModel::requestAddBinClip(QString &id, const QDomElement &descrip
int loadJob = pCore->jobManager()->startJob<LoadJob>({id}, -1, QString(), description, std::bind(readyCallBack, id));
pCore->jobManager()->startJob<ThumbJob>({id}, loadJob, QString(), 0, true);
ClipType::ProducerType type = new_clip->clipType();
if (type == ClipType::AV || type == ClipType::Audio || type == ClipType::Playlist || type == ClipType::Unknown) {
pCore->jobManager()->startJob<AudioThumbJob>({id}, loadJob, QString());
if (KdenliveSettings::audiothumbnails()) {
if (type == ClipType::AV || type == ClipType::Audio || type == ClipType::Playlist || type == ClipType::Unknown) {
pCore->jobManager()->startJob<AudioThumbJob>({id}, loadJob, QString());
}
}
}
return res;
......@@ -745,7 +747,9 @@ bool ProjectItemModel::requestAddBinClip(QString &id, const std::shared_ptr<Mlt:
if (new_clip->isReady() || new_clip->sourceExists()) {
int blocking = pCore->jobManager()->getBlockingJobId(id, AbstractClipJob::LOADJOB);
pCore->jobManager()->startJob<ThumbJob>({id}, blocking, QString(), -1, true);
pCore->jobManager()->startJob<AudioThumbJob>({id}, blocking, QString());
if (KdenliveSettings::audiothumbnails()) {
pCore->jobManager()->startJob<AudioThumbJob>({id}, blocking, QString());
}
}
}
return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment