Commit 7ca50348 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix issues with slideshow proxy

BUG: 374469
parent 7c322b1f
......@@ -365,7 +365,7 @@ bool ProjectClip::setProducer(ClipController *controller, bool replaceProducer)
if (!hasProxy()) bin()->emitRefreshPanel(m_id);
bin()->emitItemUpdated(this);
// Make sure we have a hash for this clip
hash();
getFileHash();
createAudioThumbs();
return isNewProducer;
}
......
......@@ -190,6 +190,11 @@ bool DocumentChecker::hasErrorInClips()
if (QFileInfo(original).isRelative()) {
original.prepend(root);
}
// Check for slideshows
bool slideshow = original.contains(QStringLiteral("/.all.")) || original.contains(QStringLiteral("?")) || original.contains(QStringLiteral("%"));
if (slideshow && !EffectsList::property(e, QStringLiteral("ttl")).isEmpty()) {
original = QFileInfo(original).absolutePath();
}
if (!QFile::exists(original)) {
// clip has proxy but original clip is missing
missingSources.append(e);
......@@ -202,7 +207,6 @@ bool DocumentChecker::hasErrorInClips()
if ((service == QLatin1String("qimage") || service == QLatin1String("pixbuf")) && slideshow) {
resource = QFileInfo(resource).absolutePath();
}
qDebug()<<" * * *Checking resource: "<<resource;
if (!QFile::exists(resource)) {
// Missing clip found
m_missingClips.append(e);
......
......@@ -387,7 +387,10 @@ QList <ItemInfo> Track::replaceAll(const QString &id, Mlt::Producer *original, M
// No duplication required
cut = original->cut(p->get_in(), p->get_out());
}
else {
else if (!idForTrack.contains(QStringLiteral("_")) && idForTrack == current.section(QStringLiteral("_"), 0, 0)) {
// Unproxying a slideshow
cut = original->cut(p->get_in(), p->get_out());
} else {
continue;
}
}
......@@ -395,11 +398,13 @@ QList <ItemInfo> Track::replaceAll(const QString &id, Mlt::Producer *original, M
// No audio - no duplication required
cut = original->cut(p->get_in(), p->get_out());
}
else if (!cut && current == idForTrack) {
else if (!cut && ((current == idForTrack) || (!current.contains(QStringLiteral("_")) && current == idForTrack.section(QStringLiteral("_"), 0, 0)))) {
// Use duplicate
if (trackProducer == NULL) {
trackProducer = Clip(*original).clone();
trackProducer->set("id", idForTrack.toUtf8().constData());
if (idForTrack.contains(QStringLiteral("_"))) {
trackProducer = Clip(*original).clone();
trackProducer->set("id", idForTrack.toUtf8().constData());
}
}
cut = trackProducer->cut(p->get_in(), p->get_out());
}
......
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