From dc1f9edfaf60e51568454ebe9c4e04aacb7f19b7 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 7 Jun 2022 22:43:39 +0200 Subject: [PATCH] Organize: Only notify song path changed for collection and device songs --- src/organize/organize.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/organize/organize.cpp b/src/organize/organize.cpp index 619665e23..5d857d7cc 100644 --- a/src/organize/organize.cpp +++ b/src/organize/organize.cpp @@ -250,17 +250,17 @@ void Organize::ProcessSomeFiles() { job.progress_ = std::bind(&Organize::SetSongProgress, this, std::placeholders::_1, !task.transcoded_filename_.isEmpty()); - if (!destination_->CopyToStorage(job)) { - files_with_errors_ << task.song_info_.song_.basefilename(); - } - else { - if (job.remove_original_) { + if (destination_->CopyToStorage(job)) { + if (job.remove_original_ && (song.is_collection_song() || song.source() == Song::Source_Device)) { // Notify other aspects of system that song has been invalidated QString root = destination_->LocalPath(); QFileInfo new_file = QFileInfo(root + "/" + task.song_info_.new_filename_); emit SongPathChanged(song, new_file, destination_->collection_directory_id()); } } + else { + files_with_errors_ << task.song_info_.song_.basefilename(); + } // Clean up the temporary transcoded file if (!task.transcoded_filename_.isEmpty()) {