Fix source for CUE songs in collection watcher

This commit is contained in:
Jonas Kvinge 2020-10-07 23:27:58 +02:00
parent cb6cbb9ee5
commit 45b44d012d
1 changed files with 2 additions and 1 deletions

View File

@ -569,7 +569,8 @@ SongList CollectionWatcher::ScanNewFile(const QString &file, const QString &path
// Also, watch out for incorrect media files.
// Playlist parser for CUEs considers every entry in sheet valid and we don't want invalid media getting into collection!
QString file_nfd = file.normalized(QString::NormalizationForm_D);
for (const Song &cue_song : cue_parser_->Load(&cue, matching_cue, path)) {
for (Song &cue_song : cue_parser_->Load(&cue, matching_cue, path)) {
cue_song.set_source(source_);
if (cue_song.url().toLocalFile().normalized(QString::NormalizationForm_D) == file_nfd) {
if (TagReaderClient::Instance()->IsMediaFileBlocking(file)) {
song_list << cue_song;