Fix minor issue in cue parser with date and genre

This commit is contained in:
Jonas Kvinge 2020-08-13 21:14:12 +02:00
parent c315e5016d
commit 3b134320c4
1 changed files with 3 additions and 3 deletions

View File

@ -83,9 +83,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
QString file;
QString file_type;
QString album_genre;
QString genre;
QString album_date;
QString date;
QString disc;
// -- FILE section
@ -150,6 +148,8 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
QString artist;
QString composer;
QString title;
QString date;
QString genre;
// TRACK section
do {
@ -169,7 +169,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
// the beginning of another track's definition - we're saving the current one for later (if it's valid of course)
// please note that the same code is repeated just after this 'do-while' loop
if (valid_file && !index.isEmpty() && (track_type.isEmpty() || track_type == kAudioTrackType)) {
entries.append(CueEntry(file, index, title, artist, album_artist, album, composer, album_composer, genre, (date.isEmpty() ? album_date : date), disc));
entries.append(CueEntry(file, index, title, artist, album_artist, album, composer, album_composer, (genre.isEmpty() ? album_genre : genre), (date.isEmpty() ? album_date : date), disc));
}
// clear the state