Re: [Rhythmbox-devel] syncing artwork to ipod only works after tracks played



On Wed, Jan 2, 2013 at 5:33 AM, J.D. Laub <laubster laubster org> wrote:

Hi.  I've been having problems getting cover art sync'ed onto my ipod with rb 2.96 on ubuntu 12.04; I think I've tracked down why, but am not sure the best way to tackle it.

If I import a folder containing mp3 files that contain embedded artwork in an ID3 tag, and I play one of the songs, then rb_gst_process_embedded_image pulls out the image & stores it in ~/.cache/rhythmbox/album-art/ .  Later, when I sync my ipod, the call to rb_ext_db_request from impl_track_added picks up that cached artwork, and things work swell.

However, if I *don't* first play one of the songs, then the artwork never gets pulled & stored in the cache; impl_track_added doesn't look for embedded artwork, and so no artwork gets loaded.

The missing piece here is support for embedded artwork in the art search plugin. I couldn't get this working after the switch from static python bindings to introspection, but now that we've switched to GStreamer 1.0 it's a good time to make another attempt.

It's pretty simple in concept: use GstDiscoverer to get the tags from the file, find the embedded image tag, convert it into a pixbuf. You can probably find GStreamer examples to cover most of it.
 

Any thoughts on the direction a fix might go?  'm willing to do the coding, and am hoping not to rock the boat too much.  The existing code to look for embedded artwork seems at home in the gstreamer code, and not really a great fit with the sync code.  But then again, it writes to ~/.cache/rhythmbox/, not ~/.cache/gstreamer/ .  I do have the option to also write the artwork into a separate jpg that folder import might consume and perhaps cache, but I'm not convinced that would help, as I'd need to pull the metadata for the artwork from on of the mp3 files.

Also, is it highly encouraged that any such development be done against 2.98 instead of 2.96?  The former pulled some errors last time I tried to build/run it; rather than try to fix that, I just installed the source for 2.96.

In general, it's best to work against git master. In this specific case, you can't work against anything else because there hasn't been a release since the switch to GStreamer 1.0.

If you're interested in working on this, the first step would be to set up a jhbuild environment (https://live.gnome.org/Jhbuild) to build up to date versions of rhythmbox's dependencies (mostly glib, gtk+ and gstreamer). Or install a recent distribution in a VM and work on that.



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