Organize: Update collection directory ID and song path immediately
Fixes #781
This commit is contained in:
@@ -256,11 +256,11 @@ void Organize::ProcessSomeFiles() {
|
||||
files_with_errors_ << task.song_info_.song_.basefilename();
|
||||
}
|
||||
else {
|
||||
if (job.remove_original_ && song.source() == Song::Source_Device) {
|
||||
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);
|
||||
emit SongPathChanged(song, new_file, destination_->collection_directory_id());
|
||||
}
|
||||
if (job.mark_as_listened_) {
|
||||
emit FileCopied(job.metadata_.id());
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include <QObject>
|
||||
#include <QBasicTimer>
|
||||
@@ -73,7 +74,7 @@ class Organize : public QObject {
|
||||
signals:
|
||||
void Finished(QStringList files_with_errors, QStringList);
|
||||
void FileCopied(int database_id);
|
||||
void SongPathChanged(Song song, QFileInfo new_file);
|
||||
void SongPathChanged(Song song, QFileInfo new_file, std::optional<int> new_collection_directory_id);
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *e) override;
|
||||
|
||||
Reference in New Issue
Block a user