Re: [Rhythmbox-devel] DACP (iTunes remote) support added



On Sun, Oct 24, 2010 at 1:54 PM, Peter wrote:
> 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.

Hi Michael (and others),

The following stub entry in libdmapsharing to just say we don't
have covers (rather than not handling the request at all) seems
to solve the stale cover issue I was seeing in the Remote app:

diff --git a/libdmapsharing/dmap-share.c b/libdmapsharing/dmap-share.c
index 1c714df..be3ed1f 100644
--- a/libdmapsharing/dmap-share.c
+++ b/libdmapsharing/dmap-share.c
@@ -1774,6 +1774,12 @@ _dmap_share_databases (DMAPShare *share,
                        path,
                        query,
                        context);
+       } else if (g_str_has_prefix(rest_of_path, "/1/groups/") &&
+                  g_str_has_suffix(rest_of_path, "/extra_data/artwork")) {
+               /* We don't yet implement cover requests here, say no cover */
+               g_debug ("Assuming no artwork for requested group/album");
+               soup_message_set_status (message, SOUP_STATUS_NOT_FOUND);
+               return;
        } else {
                g_warning ("Unhandled: %s\n", path);
        }

Clearly the libdmapsharing API must be extended, presumably in
the same way as the dacp_player_now_playing_artwork function
is called for the /ctrl-int/1/nowplayingartwork request to give a
filename back - I guess we need to add a dmap_group_artwork
function (or some such name) which will be passed the group
identifier, and return a filename,

Peter

P.S. Michael - why don't you use the g_str_has_prefix function
instead of g_ascii_strcasecmp in this part of the code?


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