Notify collection backend about renamed files when organising files

This commit is contained in:
Jonas Kvinge
2019-03-25 00:53:12 +01:00
parent fc1a2dac90
commit 15c8f2a3ee
9 changed files with 34 additions and 7 deletions

View File

@@ -216,6 +216,12 @@ void Organise::ProcessSomeFiles() {
files_with_errors_ << task.song_info_.song_.basefilename();
}
else {
if (job.remove_original_) {
// 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);
}
if (job.mark_as_listened_) {
emit FileCopied(job.metadata_.id());
}