From efe3e6b4e6ef123ca7ff5e21ec5a69787345ea79 Mon Sep 17 00:00:00 2001 From: "craig.p.drummond" Date: Thu, 3 Oct 2013 17:11:16 +0000 Subject: [PATCH] Only set details from album if cue file details empty --- mpd/mpdparseutils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mpd/mpdparseutils.cpp b/mpd/mpdparseutils.cpp index 8250605c2..d525c0a73 100644 --- a/mpd/mpdparseutils.cpp +++ b/mpd/mpdparseutils.cpp @@ -443,23 +443,23 @@ MusicLibraryItemRoot * MPDParseUtils::parseLibraryItems(const QByteArray &data, Song s=orig; Song albumSong=origFiles[s.name]; s.name=QString(); // CueFile has placed source file name here! - if (s.artist.isEmpty()) { + if (s.artist.isEmpty() && !albumSong.artist.isEmpty()) { s.artist=albumSong.artist; DBUG << "Get artist from album" << albumSong.artist; } - if (s.composer.isEmpty()) { + if (s.composer.isEmpty() && !albumSong.composer.isEmpty()) { s.composer=albumSong.composer; DBUG << "Get composer from album" << albumSong.composer; } - if (s.album.isEmpty()) { + if (s.album.isEmpty() && !albumSong.album.isEmpty()) { s.album=albumSong.album; DBUG << "Get album from album" << albumSong.album; } - if (s.albumartist.isEmpty()) { + if (s.albumartist.isEmpty() && !albumSong.albumartist.isEmpty()) { s.albumartist=albumSong.albumartist; - DBUG << "Get albumartist from album" << albumSong.album; + DBUG << "Get albumartist from album" << albumSong.albumartist; } - if (0==s.year) { + if (0==s.year && 0!=albumSong.year) { s.year=albumSong.year; DBUG << "Get year from album" << albumSong.year; }