The Extraction of My Songs is Wrong as I Expected.

Last month, I had been bothered by the Albums view in GNOME Music. Most of my songs don’t have cover art. This is surprising, since most of my songs are in FLAC and I’m sure all of them has cover art (Nautilus and Rhythmbox shows them).

So, I decided to debug tracker-extract to find out what’s happening in there. It took about 30 minutes until I realized what’s wrong in the code – the check if the image type is a cover actually uses an uninitialized variable!

If “the bytes aligned correctly”, or in other words, the uninitialized value of the said variable is a null value by chance, it would recognize the image as a cover and extract it. The reason why it doesn’t get initialized is that the code doesn’t check if the retrieval of this info happened correctly – but it was actually getting the property in the wrong object – which means it will never work properly!

I then created a patch for it and reported it in bugzilla: Martyn Russell reviewed and committed it.

Yahari Ore no Seishun Rabu Kome wa Machigatteiru. (My Youth Romantic Comedy is Wrong As I Expected.) ED - Hello Alone
Hello Alone, Ending Theme of Yahari Ore no Seishun Rabu Kome wa Machigatteiru. (My Youth Romantic Comedy is Wrong as I Expected.) One of my albums after the extraction was fixed.

I also have another tracker bug which incorrectly guesses the encoding of a Japanese song’s metadata as Cyrillic – Seems like it is because of enca, and Martyn also found how to fix it. I was busy the whole month so I haven’t taken a look at it yet.

But then, even with the first bug fixed, GNOME Music still doesn’t correctly load the media art of all files – seems like it doesn’t properly normalize and hash the artist and album’s name, that’s why it is not using tracker’s extracted media art and was extracting it itself. The result – the cache has multiple copies of media art and because of the first bug on tracker, the thumbnail uri is not set too. I also fixed this bug and was reported in Vadim Rutkovsky reviewed and committed it.

If you use openSUSE 12.3 and you’re using the GNOME:STABLE:3.8 repo, you could grab the tracker packages at (I’m moving this soon to my new OBS account, gonna update it later). As for Fedora 19, you could use these: which has the packages for 64-bit. The source rpm is there too so you could rebuild it manually. (I will move this too to OBS later.)

Update: Seems like tracker 0.16.2, which contains my patches, was released July 31. It is now on Fedora 19 updates and openSUSE GNOME:STABLE:3.8 repo.

If you want to rebuild your tracker index so that it would re-extract the media art, you need to remove the folders $HOME/.cache/media-art$HOME/.local/share/tracker/data and $HOME/.cache/tracker then relogin. It would take some minutes before tracker could rebuild the indices.

Thanks to Vadim and Martyn for reviewing and committing my patches! I’m gonna post an update once the last bug gets fixed.


Blog is now moved to, please leave your comments there instead.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s