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

Fix proxy extension not changed when setting changed, fix proxies not rebuilt on param change.

Related to #1496
parent 38f68854
Pipeline #212276 passed with stage
in 10 minutes and 11 seconds
......@@ -4684,7 +4684,7 @@ void Bin::rebuildProxies()
toProxy << clp;
// Abort all pending jobs
pCore->taskManager.discardJobs({ObjectType::BinClip, clp->clipId().toInt()}, AbstractTask::PROXYJOB);
clp->deleteProxy();
clp->deleteProxy(false);
}
}
if (toProxy.isEmpty()) {
......
......@@ -1600,16 +1600,18 @@ ClipPropertiesController *ProjectClip::buildProperties(QWidget *parent)
QList<std::shared_ptr<ProjectClip>> clipList{std::static_pointer_cast<ProjectClip>(shared_from_this())};
pCore->currentDoc()->slotProxyCurrentItem(doProxy, clipList);
});
connect(panel, &ClipPropertiesController::deleteProxy, this, &ProjectClip::deleteProxy);
connect(panel, &ClipPropertiesController::deleteProxy, [this]() { deleteProxy(); });
return panel;
}
void ProjectClip::deleteProxy()
void ProjectClip::deleteProxy(bool reloadClip)
{
// Disable proxy file
QString proxy = getProducerProperty(QStringLiteral("kdenlive:proxy"));
QList<std::shared_ptr<ProjectClip>> clipList{std::static_pointer_cast<ProjectClip>(shared_from_this())};
pCore->currentDoc()->slotProxyCurrentItem(false, clipList);
if (reloadClip) {
pCore->currentDoc()->slotProxyCurrentItem(false, clipList);
}
// Delete
bool ok;
QDir dir = pCore->currentDoc()->getCacheDir(CacheProxy, &ok);
......
......@@ -274,7 +274,7 @@ public slots:
* avoid copy). */
void updateAudioThumbnail(bool cachedThumb);
/** @brief Delete the proxy file */
void deleteProxy();
void deleteProxy(bool reloadClip = true);
/** @brief A clip job progressed, update display */
void updateJobProgress();
......
......@@ -1282,16 +1282,14 @@ void KdenliveDoc::slotProxyCurrentItem(bool doProxy, QList<std::shared_ptr<Proje
qDebug() << "::::: CANNOT GET CACHE DIR!!!!";
return;
}
if (m_proxyExtension.isEmpty()) {
initProxySettings();
QString extension = getDocumentProperty(QStringLiteral("proxyextension"));
if (extension.isEmpty()) {
if (m_proxyExtension.isEmpty()) {
initProxySettings();
}
extension = m_proxyExtension;
}
QString extension = QLatin1Char('.') + m_proxyExtension;
// getDocumentProperty(QStringLiteral("proxyextension"));
/*QString params = getDocumentProperty(QStringLiteral("proxyparams"));
if (params.contains(QStringLiteral("-s "))) {
QString proxySize = params.section(QStringLiteral("-s "), 1).section(QStringLiteral("x"), 0, 0);
extension.prepend(QStringLiteral("-") + proxySize);
}*/
extension.prepend(QLatin1Char('.'));
// Prepare updated properties
QMap<QString, QString> newProps;
......
Supports Markdown
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