mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
When loading a CUE from disk that isn't in the library, don't overwrite the metadata of its first song with the metadata from the audio file. Fixes issue 2092
This commit is contained in:
parent
13fc24f6c6
commit
7e0e4e48e4
@ -303,6 +303,11 @@ void SongLoader::EffectiveSongsLoad() {
|
||||
for (int i = 0; i < songs_.size(); i++) {
|
||||
Song& song = songs_[i];
|
||||
|
||||
if (song.filetype() != Song::Type_Unknown) {
|
||||
// Maybe we loaded the metadata already, for example from a cuesheet.
|
||||
continue;
|
||||
}
|
||||
|
||||
LibraryQuery query;
|
||||
query.SetColumnSpec("%songs_table.ROWID, " + Song::kColumnSpec);
|
||||
query.AddWhere("filename", song.url().toEncoded());
|
||||
|
@ -971,7 +971,9 @@ void Playlist::UpdateItems(const SongList& songs) {
|
||||
// Update current items list
|
||||
for (int i=0; i<items_.size(); i++) {
|
||||
PlaylistItemPtr item = items_[i];
|
||||
if (item->Metadata().url() == song.url()) {
|
||||
|
||||
if (item->Metadata().url() == song.url() &&
|
||||
item->Metadata().filetype() == Song::Type_Unknown) {
|
||||
PlaylistItemPtr new_item;
|
||||
if (song.id() == -1) {
|
||||
new_item = PlaylistItemPtr(new SongPlaylistItem(song));
|
||||
|
Loading…
Reference in New Issue
Block a user