Summary: | Year field not set when retrieving from MusicBrainz | ||
---|---|---|---|
Product: | [Frameworks and Libraries] libkcddb | Reporter: | Bill Good <bkgood> |
Component: | general | Assignee: | Richard Lärkäng <larkang> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/libkcddb/a2d2a670fb5ac1a733f35b3358d00b8981a4a459 | Version Fixed In: | |
Sentry Crash Report: |
Description
Bill Good
2012-05-15 20:11:47 UTC
Your solution with choosing the earliest year would have been fine. However, libmusicbrainz 3 is not working very well with the new schema introduced last year, so in the next release of KDE (4.9), I have updated libkcddb to use the new libmusicbrainz 4 instead. I believe in the new schema, only one release date per release is possible, which would make the problem you describe go away. See http://users.musicbrainz.org/~luks/docs/libmusicbrainz4/class_music_brainz4_1_1_c_release.html I would guess the CRelease::Date() only returns one date. However, since it's a string I think it might return a full date, and not just a year (as a test case, you might try for example http://musicbrainz.org/release/04319e80-0948-4e89-8180-7cf6f17fc77a ) If you want to give it a try to write a patch, you are very welcome to do so, just ask if you have any questions. Otherwise, I might try to take a look at it, but it might take some time getting around to doing it. Since it should use libmusicbrainz 4, you should start from the code at https://projects.kde.org/projects/kde/kdemultimedia/libkcddb/repository (the 'master' branch) if you want to give it a try. Git commit a2d2a670fb5ac1a733f35b3358d00b8981a4a459 by Richard Lärkäng. Committed on 05/06/2012 at 21:45. Pushed by larkang into branch 'master'. Read year on Musicbrainz lookups Add code for reading the year when looking up releases from Musicbrainz. Added a test-case (musicbrainztest-fulldata), where the date is "2011-04-29", which should be parsed as only "2011". Also, while adding the test case, I ran into a bug, the titles and track artists were always taken from the recording, while ones from the "release credits" are preferred, fixed this as well, and updated the other tests to reflect the fixes. M +25 -10 libkcddb/musicbrainz/musicbrainzlookup.cpp M +1 -0 test/CMakeLists.txt M +4 -4 test/asyncmusicbrainztest.cpp A +157 -0 test/musicbrainztest-fulldate.cpp [License: LGPL (v2+)] A +32 -0 test/musicbrainztest-fulldate.h [License: LGPL (v2+)] M +7 -7 test/musicbrainztest-severaldiscs.cpp M +3 -3 test/musicbrainztest.cpp http://commits.kde.org/libkcddb/a2d2a670fb5ac1a733f35b3358d00b8981a4a459 |