bleskodev / rubyripper

Fork of the original rubyripper from code.google.com/p/rubyripper + some bugs fixes
126 stars 21 forks source link

musicbrainz not working in current git #541

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1) Please describe the steps to reproduce the situation:
a. insert a cd that's in musicbrainz (and not in freedb)
b. start rubyripper with metadata option set to musicbrainz

2) What is the expected output? What do you see instead?

I'd expect correct metadata, I get no metadata.

3) What version of rubyripper are you using? On what operating system? The
gtk2 of commandline interface?

gtk2-version, current git (as of 2012-10-26)

5) Does the problem happen with all discs? If not, please attach
the output of cdparanoia -Q with a disc that gives trouble.

Will attach.

Original issue reported on code.google.com by hanno@hboeck.de on 26 Oct 2012 at 6:01

Attachments:

GoogleCodeExporter commented 8 years ago
I’m seeing the same problem. Having run a network packet trace while 
rubyripper is running, I can see it requesting the proper information from the 
Musicbrainz web service:
http://musicbrainz.org/ws/2/discid/AagPUHvZqXqeitHq41zf74Dh1I0-?toc=1+16+224996+
150+17224+33703+45967+61833+78012+91474+111343+126501+148246+152143+171911+18533
0+206829+218941+220592&inc=artists+recordings+artist-credits

But then it immediately appears to fall back to freedb, and retrieves (I have 
musicbrainz freedb gateway set as my freedb server):
http://freedb.musicbrainz.org/~cddb/cddb.cgi?cmd=cddb+query+E90BB510+16+150+1722
4+33703+45967+61833+78012+91474+111343+126501+148246+152143+171911+185330+206829
+218941+220592+2999&hello=anonymous+my_secret.com+rubyripper+0.7.0a1&proto=6

Original comment by ha...@hawkesnest.net on 26 Oct 2012 at 6:05

GoogleCodeExporter commented 8 years ago
I added some debugging so it's easy to open up the requested XML in your 
browser. The code that doesn't work is in getMusicBrainzRelease.rb from line 
107 on:

releases = REXML::XPath::match(reply, '//metadata/disc/release-list/release', 
{''=>MMD_NAMESPACE})

case releases.length
  when 0 ; noReleasesFound()
  when 1 ; oneReleaseFound(releases[0])
  else ; multipleReleasesFound(releases)
end

In the examples I looked at the XPATH will always return 0 when looking for: 
//metadata/disc/release-list/release.

I haven't coded this, so don't know where to start. I hope Ian can find some 
time for this.

Original comment by boukewou...@gmail.com on 28 Nov 2012 at 8:17

GoogleCodeExporter commented 8 years ago
Issue 540 has been merged into this issue.

Original comment by boukewou...@gmail.com on 28 Nov 2012 at 8:42

GoogleCodeExporter commented 8 years ago
Sorry, I guess I've been putting this on the back burner of late to work on a 
couple of other projects.  There doesn't seem to be anything obviously wrong 
with that XPath query, and the minimal script I've attached here correctly 
returns 1 for releases.length on ruby 1.8.7 (2012-02-08 patchlevel 358) 
[universal-darwin12.0].

Perhaps behavior changes between Ruby versions?

Original comment by comradec...@gmail.com on 28 Nov 2012 at 10:31

Attachments:

GoogleCodeExporter commented 8 years ago
Had a bad disc as a test disc. It returned a disc stub, which rarely ever 
happens as I found out. Still the conclusion seems to be for a lot of discs 
that no match is found. 

In debugging some further it seems to me that the above "case releases.length" 
is not even triggered. In latest commit I show that the "XML" in 
queryMusicBrainzForMatches is not really retrieved, it's just returning a Nill 
class object.

Original comment by boukewou...@gmail.com on 28 Nov 2012 at 10:45

GoogleCodeExporter commented 8 years ago
This is fixed with a series of commits today. Please checkout latest git to see 
if your problems are solved as well and report back.

I removed the MusicBrainzWebservice class since it was almost a copy of the 
network class. The network class I made more generic, it's now shared for 
freedb and musicbrainz.

Original comment by boukewou...@gmail.com on 2 Dec 2012 at 12:31

GoogleCodeExporter commented 8 years ago
Fantastic, I was able to rip all five of my "problem" CDs using data from 
MusicBrainz.

Original comment by publicpa...@gmail.com on 6 Dec 2012 at 8:17