FIx proxy used for rendering when app started from home dir

BUG: 368491
parent ae291794
......@@ -3244,7 +3244,7 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
// Do we want proxy rendering
if (project->useProxy() && !m_renderWidget->proxyRendering()) {
QString root = doc.documentElement().attribute(QStringLiteral("root"));
QString root = pCore->binController()->documentRoot();
// replace proxy clips with originals
//TODO
......@@ -3276,10 +3276,10 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
} else {
suffix.clear();
}
if (!producerResource.startsWith('/')) {
producerResource.prepend(root + '/');
}
if (!producerResource.isEmpty()) {
if (!producerResource.startsWith(QLatin1Char('/'))) {
producerResource.prepend(root);
}
if (proxies.contains(producerResource)) {
QString replacementResource = proxies.value(producerResource);
EffectsList::setProperty(e, QStringLiteral("resource"), prefix + replacementResource + suffix);
......
......@@ -597,7 +597,14 @@ QMap <QString, QString> BinController::getProxies()
if (!prod->is_valid() || prod->is_blank()) continue;
QString proxy = prod->parent().get("kdenlive:proxy");
if (proxy.length() > 2) {
proxies.insert(proxy, prod->parent().get("kdenlive:originalurl"));
if (!proxy.startsWith(QLatin1Char('/'))) {
proxy.prepend(m_documentRoot);
}
QString sourceUrl(prod->parent().get("kdenlive:originalurl"));
if (!sourceUrl.startsWith(QLatin1Char('/'))) {
sourceUrl.prepend(m_documentRoot);
}
proxies.insert(proxy, sourceUrl);
}
}
return proxies;
......
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