Re: [Tracker] PATCH - Refactoring albumart fetching



Changes since last patch:

  o. Don't request a heuristic scan if the media file has no album id3
     tag.

On Mon, 2009-04-13 at 14:30 +0200, Philip Van Hoof wrote:
I continued working on this today, so here's a better version.

Changes since last patch:

  o. Requests to copy-to-local are now also handled by the indexer,
     instead of by the extractor
  o. Heuristic scanner finds local media art first, and copies from it
     if found as first heuristic match
  o. Proper check in configure.ac for strcasestr 
  o. There were linking problems in the test-tools for tracker-extract,
     I fixed them in this patch (by providing dummy functions)
  o. Restored all necessary locations for requesting thumbnails of the
     newly created album art
  o. Eliminated the need for TrackerHal in tracker-extract (which will
     make Ivan as happy as a little boy who has just found Easter eggs),
     removed the construction of it from the main function and from the
     tests for tracker-extract.
  o. Cleaned up use of TrackerHal in the code that now runs in the
     indexer, it all uses hal from private->hal now instead. Made it
     cope with not HAVE_HAL too.

I'll notify you tomorrow about it if I change more things today, Martyn.
But feel free to start reviewing this one already.


On Fri, 2009-04-10 at 17:40 +0200, Philip Van Hoof wrote:
Hackers!

Currently Tracker's media file extractor will on top of trying to
extract embedded media art from files, perform a heuristic on the
directory of the media file.

The reason why it does this heuristic is to find album art related to
the media file.

Usually are media files grouped together in a directory, though. For
example like this:

/location/Freaky Freak/The greatest hits/Freaky-Freak_-_The-greatest-hits_-_I-can-sing.mp3
/location/Freaky Freak/The greatest hits/Freaky-Freak_-_The-greatest-hits_-_You-can-sing.mp3
/location/Freaky Freak/The greatest hits/Freaky-Freak_-_The-greatest-hits_-_We-can-sing.mp3
/location/Freaky Freak/The greatest hits/Freaky-Freak_-_The-greatest-hits_-_They-can-sing.mp3

Or whatever filenaming format the w3ird peoples on thiz planetz have
used for their albums, songs, media files and etcetera.

Right now will the extractor foreach file in such a directory repeat the
complete heuristic.

With this patch we'll throw the request for a heuristic back to the
indexer. The indexer has a queue where it also merges the requests
together. In the patch the indexer does this by forming a key using the
dirname, album and artist.

Which means that if a request for a heuristic is made for ten files sang
by the same artist, grouped into the same album, stored in the same
directory, which is kinda common by the way, I'm again making my
sentences too long, making it hard for people to read them, then the
indexer will simply merge those ten together and perform just one
heuristic instead. Saving precious computar cycles.

It's quite a refactor, and this close to a next 0.6.x release it would I
think be good if a few extra couple of eyes would review and test the
code before I push it.

Please review

-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be

Attachment: albumart-refactor3.diff
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]