Opened 12 years ago
Closed 12 years ago
#9813 closed bug (fixed)
[cddb_daemon] slash clash
Reported by: | ttcoder | Owned by: | bga |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Servers/cddb_daemon | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
The CDDB daemon parsing code has a feature where a "/" slash in a Track title is interpreted as a delimiter for a track specific artist (i.e. an artist that overrides the disc-wide artist for that particular track): http://cgit.haiku-os.org/haiku/tree/src/servers/cddb_daemon/cddb_server.cpp#n259
This causes trouble for track titles that include... a slash! Like track TTITLE0 on this disk: http://www.freedb.org/freedb/misc/5d0a5908
The www.freedb.org FAQ does mention that feature, but it says it only applies if the disc-wide artist is set to "Various" : http://www.freedb.org/en/faq.3.html#22
For highest compatibility, cddb_server.cpp:259 should test for "Various" before applying the overriden artist feature. If the artist is not "Various" but e.g. "Doug Smith" then the slash in title should be interpreted as-is... with the required defensive programming when using that value for creating files of course. Indeed there are provisions for that elsewhere in the code (look for ReplaceSet("/", " ")
calls in several places, including when processing the title and artist fields) so the fact that "Various" is not taken into account seems to be a simple overlook.
Attachments (2)
Change History (18)
comment:1 by , 12 years ago
by , 12 years ago
Attachment: | 0001-Check-for-compilation-artist-in-cddb-daemon.patch added |
---|
Patch to check for Various before looking for track specific artist info
follow-up: 4 comment:2 by , 12 years ago
patch: | 0 → 1 |
---|
comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
patch: | 1 → 0 |
Status: | new → assigned |
comment:4 by , 12 years ago
I don't think that's what he meant in the bug description - I believe the problem here is that if the CD-artist is "Various", then the track name is supposed to be used to parse the artist name out when it contains a "/"
Your patch seems to just look for "Various /" in the track name instead.
follow-up: 7 comment:5 by , 12 years ago
Wow, that was fast. Unfortunately, it doesn't look correct. I assume you did not test this, John? You check for "Various / " in the track title. You won't find it there, though -- you'll only have to consider " / " when the disk title is set to "Various".
comment:6 by , 12 years ago
Component: | Servers → Servers/cddb_daemon |
---|
comment:7 by , 12 years ago
Replying to axeld:
Wow, that was fast. Unfortunately, it doesn't look correct. I assume you did not test this, John? You check for "Various / " in the track title. You won't find it there, though -- you'll only have to consider " / " when the disk title is set to "Various".
No, I didn't test since I don't have the data to test this with. I guess I misinterpreted the bug. I'll try again.
comment:8 by , 12 years ago
Right, if I'm not mistaken it could be a one-line change, from
if (pos != B_ERROR) {
to
if (pos != B_ERROR && diskData->artist == "Various") {
(or even using ICompare() for case-insensitivity) Sorry I was not more explicit in my description...
follow-up: 11 comment:9 by , 12 years ago
Should "Various" be case sensitive or not? Should I match on "VARIOUS"?
comment:10 by , 12 years ago
I would assume that a band that calls itself VARIOUS and uses " / " in their titles can be safely ignored. Therefore I would suggest to compare case insensitively.
comment:11 by , 12 years ago
Replying to jscipione:
Should "Various" be case sensitive or not? Should I match on "VARIOUS"?
Having done my share of queries against cddb/freedb over the years - I would highly suggest making it a case-insensitive comparison... the data coming out of that database is pretty bad sometimes.
comment:12 by , 12 years ago
patch: | 0 → 1 |
---|
by , 12 years ago
Attachment: | 0001-Check-if-disk-has-compilation-artist.patch added |
---|
Let's try again. Look for disk title set to Various case-insensitively before parsing track specific artist info using ICompare()
comment:14 by , 12 years ago
Thanks much guys. I'm making a build of the modified daemon for dsuden (he's the one with the oddball Doug Smith CD :-) and will be sure to report back in a few days.
comment:15 by , 12 years ago
We finally had time to test the patched daemon on a few CDs. No regression on 'normal' albums, and the oddball album now works great; jscipione you may please apply the patch..!
Makes perfect sense, patches welcome :-)