Commit a1304676 authored by Eric Jiang's avatar Eric Jiang
Browse files

Put metadata directly in XML from doc

Putting the project metadata in the parameters text hit an issue with
whitespace in the metadata. Skipping the parameters text and putting it
directly in the XML preserves the whitespace.

BUG: 458718
parent 35814d86
Pipeline #237869 failed with stage
in 3 minutes and 44 seconds
......@@ -834,6 +834,17 @@ void RenderWidget::generateRenderFiles(QDomDocument doc, int in, int out, QStrin
doc.documentElement().insertAfter(consumer, profiles.at(profiles.length() - 1));
}
// Insert project metadata
if (m_view.export_meta->isChecked()) {
QMap<QString, QString> metadata = pCore->currentDoc()->metadata();
QMap<QString, QString>::const_iterator mi = metadata.constBegin();
while (mi != metadata.constEnd()) {
consumer.setAttribute(mi.key(), mi.value());
++mi;
}
}
// insert params from preset
QStringList args = renderArgs.split(QLatin1Char(' '));
for (auto &param : args) {
......@@ -1362,16 +1373,6 @@ void RenderWidget::refreshParams()
newParams.append(QStringLiteral("threads=%1").arg(KdenliveSettings::encodethreads()));
}
// Project metadata
if (m_view.export_meta->isChecked()) {
QMap<QString, QString> metadata = pCore->currentDoc()->metadata();
QMap<QString, QString>::const_iterator i = metadata.constBegin();
while (i != metadata.constEnd()) {
newParams.append(QStringLiteral("%1=%2").arg(i.key(), i.value()));
++i;
}
}
if (params.contains(QStringLiteral("%quality")) || params.contains(QStringLiteral("%audioquality"))) {
m_view.qualityGroup->setEnabled(true);
} else {
......
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