mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-05 12:56:52 +01:00
Organize: Only notify song path changed for collection and device songs
This commit is contained in:
parent
b6b68edf1e
commit
dc1f9edfaf
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user