From 22cfade4a457f900f798e66186a557c527ff5c85 Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Sat, 6 Jun 2020 10:14:01 -0700 Subject: [PATCH] organise: Refresh filename after transcode --- src/core/organise.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/organise.cpp b/src/core/organise.cpp index 46bc3a6b0..699728354 100644 --- a/src/core/organise.cpp +++ b/src/core/organise.cpp @@ -149,6 +149,12 @@ void Organise::ProcessSomeFiles() { song.set_basefilename(Utilities::FiddleFileExtension( song.basefilename(), task.new_extension_)); + // Adjust the destination filename. Don't use the OrganiseFormat object + // for this since that will remove any duplicate filename adjustments + // made by OrganiseDialog. + task.song_info_.new_filename_ = Utilities::FiddleFileExtension( + task.song_info_.new_filename_, task.new_extension_); + // Have to set this to the size of the new file or else funny stuff // happens song.set_filesize(QFileInfo(task.transcoded_filename_).size());