Skip to content

Commit

Permalink
fix: trigger metadata setting for converted files (fix #3116)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Apr 1, 2024
1 parent e9b84dd commit f28acd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/src/models/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,12 @@ QString Image::postSaving(const QString &originalPath, Size size, bool addMd5, b
commands.after();
}

const QString &ext = extension();
QString ext = extension();

// FFmpeg
if (ext == QStringLiteral("webm") && m_settings->value("Save/FFmpegRemuxWebmToMp4", false).toBool()) {
path = FFmpeg::remux(path, "mp4");
ext = getExtension(path);
}

// Image conversion
Expand All @@ -822,13 +823,15 @@ QString Image::postSaving(const QString &originalPath, Size size, bool addMd5, b
} else if (backend == QStringLiteral("FFmpeg")) {
path = FFmpeg::remux(path, targetImgExt);
}
ext = getExtension(path);
}

// Ugoira conversion
if (ext == QStringLiteral("zip") && m_settings->value("Save/ConvertUgoira", false).toBool()) {
const QString targetUgoiraExt = m_settings->value("Save/ConvertUgoiraFormat", "gif").toString();
const bool deleteOriginal = m_settings->value("Save/ConvertUgoiraDeleteOriginal", false).toBool();
path = FFmpeg::convertUgoira(path, ugoiraFrameInformation(), targetUgoiraExt, deleteOriginal);
ext = getExtension(path);
}

// Metadata
Expand Down

0 comments on commit f28acd0

Please # to comment.