bleskodev / rubyripper

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

Rubyripper finds metadata on one computer but not on another #643

Open davidedelvento opened 7 months ago

davidedelvento commented 7 months ago

I have two computer running an identical version of Linux on them. I was baffled by the fact that one was finding metadata (authors, track titles, etc) for a much larger number of disks then the other. Like something similar to 10 times more!

Same identical rubyripper settings (I even diffed the config files!)

I initially thought it could have been random, or related to e.g. network connectivity etc, but it was too obvious to be such a thing. Eventually I grew tired and I kept trying the same disk back-and-forth between the two machines after connecting them to the same network. One consistently found the metadata, the other did not.

I thought I was missing libraries, so I diffed the installed packages (*) and so with lots of work I found the root cause and hence a workaround (below), but I think this should be addressed in rubyripper itself.

(*) For the curious, I ran apt list --installed | awk '{print $1}' | sort > /tmp/installed_packages.txt on both machines and then I used comm and diff to navigate the few hundreds packages of differences between them

davidedelvento commented 7 months ago

So the root case was the package libdiscid0 which is described as follows

$ apt show libdiscid0
Package: libdiscid0
Version: 0.6.2-3
Priority: optional
Section: universe/libs
Source: libdiscid
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 46.1 kB
Depends: libc6 (>= 2.14)
Homepage: https://musicbrainz.org/doc/libdiscid
Download-Size: 14.6 kB
APT-Manual-Installed: no
APT-Sources: http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: library for creating MusicBrainz DiscIDs
 libdiscid is a library for creating MusicBrainz DiscIDs from audio CDs.
 It reads a CD's table of contents (TOC) and generates an identifier which
 can be used to lookup the CD at MusicBrainz (http://musicbrainz.org).
 Additionally, it provides a submission URL for adding the DiscID to the
 database.

The shocking thing is that its presence (rather than its absence, as I'd have speculated if I did not see it happen with my own eyes) makes most CDs result full of "Unknown" authors/titles/tracks.

A simple supo apt remove libdiscid0 works around the issue, but I think rubyripper itself should detect this problem (which I have not investigate further) and fall back to "the other thing" (gnudb) when it occurs. Just to be crystal clear, on both machines cd-discid was installed identically, but only when libdiscid0 is removed all the metadata is found