1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 03:27:40 +01:00

Don't replace song metadata with blank m3u EXTINF metadata. Fixes issue 2593

This commit is contained in:
Adam Porter 2013-06-01 12:34:21 +10:00 committed by David Sansome
parent 6821f86759
commit 5252dac162

View File

@ -57,9 +57,15 @@ SongList M3UParser::Load(QIODevice* device, const QString& playlist_path, const
}
} else if (!line.isEmpty()) {
Song song = LoadSong(line, 0, dir);
song.set_title(current_metadata.title);
song.set_artist(current_metadata.artist);
song.set_length_nanosec(current_metadata.length);
if (!current_metadata.title.isEmpty()) {
song.set_title(current_metadata.title);
}
if (!current_metadata.artist.isEmpty()) {
song.set_artist(current_metadata.artist);
}
if (current_metadata.length > 0) {
song.set_length_nanosec(current_metadata.length);
}
ret << song;
current_metadata = Metadata();