After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681698 - Disc number may be incorrect for multi-disc vorbis / flac albums
Disc number may be incorrect for multi-disc vorbis / flac albums
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Extractor
0.14.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-extractor
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2012-08-12 16:54 UTC by Jens Georg
Modified: 2015-02-05 22:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jens Georg 2012-08-12 16:54:05 UTC
It looks like the association of ogg/vorbis files to the volums of an album is broken:

tracker-info 01\ -\ Shake\ a\ Tail\ Feather.ogg 

Querying information for entity:'01 - Shake a Tail Feather.ogg'
  'urn:uuid:e64c4b1a-a848-54c1-cef8-39050b8477b0'
Results:
  'nmm:musicAlbumDisc' = 'urn:album-disc:The%20Definitive%20Blues%20Brothers%20Collection:Disc1'

reindexing the file as "oga" yields:

Querying information for entity:'01 - Shake a Tail Feather.oga'
  'urn:uuid:e64c4b1a-a848-54c1-cef8-39050b8477b0'
Results:
  'nmm:musicAlbumDisc' = 'urn:album-disc:The%20Definitive%20Blues%20Brothers%20Collection:Disc2'


Funny thing is, in both cases the GStreamer back-end is used and tracker-extract reports it as belonging to the second disc:

Shortened output of tracker-extract 01\ -\ Shake\ a\ Tail\ Feather.ogg:

SPARQL item:
--
 a nfo:Audio , nmm:MusicPiece ;
	 nfo:genre "Blues" ;
	 nie:title "Shake a Tail Feather" ;
	 nie:contentCreated "2000-01-01T00:00:00Z" ;
	 nmm:trackNumber 1 ;
	 nfo:codec "Vorbis" ;
	 nmm:performer <urn:artist:Blues%20Brothers> ;
	 nmm:musicAlbum <urn:album:The%20Definitive%20Blues%20Brothers%20Collection> ;
	 nmm:musicAlbumDisc <urn:album-disc:The%20Definitive%20Blues%20Brothers%20Collection:Disc2> ;
	 nfo:channels 2 ;
	 nfo:sampleRate 44100 ;
	 nfo:duration 170 .
--
Comment 1 Martyn Russell 2012-08-14 16:59:27 UTC
Hi Jens, are you able to provide a link to the file to test with?
Comment 2 spacefrogg-gnome 2015-01-26 14:44:47 UTC
Hi, to warm this bug up a little. This issue is still not resolved. Without much ado I inspected `tracker-extract-vorbis.c' and found that it reads:
--
vd.disc_number = ogg_get_comment (comment, "DiscNo");
--

near line 140. According to wikipedia and some googling around through other open source projects, "DiscNumber" is the de-facto standard tag to memorize the disc number.

Suggested fix:
--
vd.disc_number = ogg_get_comment (comment, "DiscNo");
if (vd.disc_number == NULL) /* "DiscNo" did not happen to occur in the file */
        vd.disc_number = ogg_get_comment (comment, "DiscNumber");
--

or even replace "DiscNo" with "DiscNumber" (if it is known to not break anything).

Regards,

Michael
Comment 3 Martyn Russell 2015-01-27 18:53:43 UTC
Sounds good to me Michael, thanks for chasing this down. If it works for you, I would happily allow you to commit a patch like this.

Is this something you could do?
Do you have commit rights?
Comment 4 spacefrogg-gnome 2015-01-29 16:18:09 UTC
I have not. I am appending a pull request for your convenience.

--
The following changes since commit a87a0319b170276284edaeb6e61bd1c0fe41a834:

  Mechanically adjust for libmediaart-2.0 (2015-01-26 10:30:08 +0200)

are available in the git repository at:

  git://git.meterriblecrew.net/spacefrogg/tracker.git tags/fix-discno

for you to fetch changes up to 25fb55b6584bf207a2cf1f10782f3935b14be57e:

  Fixed parsing disc number in Vorbis comments. (2015-01-29 16:52:26 +0100)

----------------------------------------------------------------
Fixed parsing disc number in vorbis comments.

 This fixes:
 https://bugzilla.gnome.org/show_bug.cgi?id=681698

 Affects vorbis files and flac files using vorbis comments.

----------------------------------------------------------------
Michael Raitza (1):
      Fixed parsing disc number in Vorbis comments.

 src/tracker-extract/tracker-extract-flac.c   | 2 ++
 src/tracker-extract/tracker-extract-vorbis.c | 2 ++
 2 files changed, 4 insertions(+)
Comment 5 Martyn Russell 2015-02-05 22:18:44 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

Cheers Michael :)