From 14c3a8e8762479dc8c3a13f4b5e827d2f1b1fcb5 Mon Sep 17 00:00:00 2001
From: John Scipione <jscipione@gmail.com>
Date: Tue, 4 Jun 2013 18:29:48 -0400
Subject: [PATCH] Check if disk has compilation artist
... before looking for track specific artist information. Fixes #9813
---
src/servers/cddb_daemon/cddb_server.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/servers/cddb_daemon/cddb_server.cpp b/src/servers/cddb_daemon/cddb_server.cpp
index d0d8ebb..46f369e 100644
a
|
b
|
CDDBServer::Read(QueryResponseData* diskData, ReadResponseData* readResponse)
|
257 | 257 | trackData->trackNumber = track; |
258 | 258 | |
259 | 259 | int32 pos = line.FindFirst(" / " ); |
260 | | if (pos != B_ERROR) { |
261 | | // We have track specific artist information. |
| 260 | if (pos != B_ERROR && diskData->artist.ICompare("Various") == 0) { |
| 261 | // Disk is set to have a compilation artist and |
| 262 | // we have track specific artist information. |
262 | 263 | BString artist; |
263 | 264 | line.MoveInto(artist, 0, pos); |
| 265 | // Move artist information from line to artist. |
264 | 266 | line.Remove(0, 3); |
| 267 | // Remove " / " from line. |
265 | 268 | trackData->artist = artist; |
266 | 269 | } else { |
267 | 270 | trackData->artist = diskData->artist; |