Commit dc11bf42 authored by Ed Rogalsky's avatar Ed Rogalsky

stem export is always stem export also if only one track is selected

Append track name to filename.
parent a98aac41
......@@ -950,20 +950,19 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
// script file
QFile file(scriptPath);
int stemCount = playlistPaths.count();
bool stemExport = (trackNames.count() > 0);
for (int stemIdx = 0; stemIdx < stemCount; stemIdx++) {
QString dest(destBase);
// on stem export append track name to each filename
if (stemCount > 1) {
if (stemExport) {
QFileInfo dfi(dest);
QStringList filePath;
// construct the full file path
filePath << dfi.absolutePath() << QDir::separator() << dfi.completeBaseName() + "_" <<
QString(trackNames.at(stemIdx)).replace(" ","_") << "." << dfi.suffix();
dest = filePath.join("");
// debug output
qDebug() << "dest: " << dest;
QString(trackNames.at(stemIdx)).replace(QLatin1String(" "),QLatin1String("_")) << QStringLiteral(".") << dfi.suffix();
dest = filePath.join(QLatin1String(""));
}
// Check whether target file has an extension.
......
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