Organize: Only notify song path changed for collection and device songs
This commit is contained in:
@@ -250,17 +250,17 @@ void Organize::ProcessSomeFiles() {
|
|||||||
|
|
||||||
job.progress_ = std::bind(&Organize::SetSongProgress, this, std::placeholders::_1, !task.transcoded_filename_.isEmpty());
|
job.progress_ = std::bind(&Organize::SetSongProgress, this, std::placeholders::_1, !task.transcoded_filename_.isEmpty());
|
||||||
|
|
||||||
if (!destination_->CopyToStorage(job)) {
|
if (destination_->CopyToStorage(job)) {
|
||||||
files_with_errors_ << task.song_info_.song_.basefilename();
|
if (job.remove_original_ && (song.is_collection_song() || song.source() == Song::Source_Device)) {
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (job.remove_original_) {
|
|
||||||
// Notify other aspects of system that song has been invalidated
|
// Notify other aspects of system that song has been invalidated
|
||||||
QString root = destination_->LocalPath();
|
QString root = destination_->LocalPath();
|
||||||
QFileInfo new_file = QFileInfo(root + "/" + task.song_info_.new_filename_);
|
QFileInfo new_file = QFileInfo(root + "/" + task.song_info_.new_filename_);
|
||||||
emit SongPathChanged(song, new_file, destination_->collection_directory_id());
|
emit SongPathChanged(song, new_file, destination_->collection_directory_id());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
files_with_errors_ << task.song_info_.song_.basefilename();
|
||||||
|
}
|
||||||
|
|
||||||
// Clean up the temporary transcoded file
|
// Clean up the temporary transcoded file
|
||||||
if (!task.transcoded_filename_.isEmpty()) {
|
if (!task.transcoded_filename_.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user