On Sun, Oct 24, 2010 at 3:45 AM, Bastien Nocera <[email protected]> wrote: > > On Sun, 2010-10-24 at 01:50 +0100, Peter wrote: >> >> + if (g_ascii_strncasecmp(uri, "file://", 7) == 0) { >> + /* Need to remove file:// and unencode it, e.g. %20 to >> space */ >> + cover = g_strdup(g_filename_from_uri(uri, NULL, >> NULL)); >> + } > > This will leak the output of g_filename_from_uri(),
Yeah - I missed that. I was doing g_strdup(uri+7) to just strip the file prefix, I should have removed the g_strdup when I switch to g_filename_from_uri > ... and it's not the way to get the URI. > > Use: > file = g_file_new_for_uri (uri); > cover = g_file_get_path (file); > g_object_unref (file); > > This will make sure that SMB URIs will get a local path, through the > gvfs fuse support. That works too - although I have only tested it with local files so far, When playing a file hosted on another server, the URI points to a cover image in the ~/.cache/rhythmbox/covers directory. Thanks for the helpful feedback Bastien. However, after more testing, by handling only the now playing request it seems sometimes the Remote application shows stale artwork. This seems to be an issue when you select the track by browsing artists/albums on the iPod (where we don't yet support the covers), rather than just watching what RB is playing (e.g. picking tracks on the computer) - that works well. I think we're also going to have to implement the general cover art request to make this more usable, i.e. requests which are currently igrored: /databases/1/groups/162993416/extra_data/artwork That will probably need work in libdmapsharing and the RB plugin. Peter _______________________________________________ rhythmbox-devel mailing list [email protected] http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
