diff options
author | Richard Röjfors <richard.rojfors@gmail.com> | 2015-10-24 14:21:18 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2015-11-21 13:16:33 +0100 |
commit | 1c4ed3fe76a55fdd3ac75163cf5e02bb15b090c6 (patch) | |
tree | baa51eb46bae5df853b4fb5aac92e464edaba9fb | |
parent | 8df903bd714649ce9fd640c2f3ef75447a65d988 (diff) | |
download | rygel-1c4ed3fe76a55fdd3ac75163cf5e02bb15b090c6.tar.gz |
server: Set the album art uri when applying didl
Currently if an object is created in a writable container the
album art uri is thrown away.
This commit makes sure to create a thumbnail in the music item
and assign the album art URI from the DIDL, if one is provided.
Signed-off-by: Richard Röjfors <richard@puffinpack.se>
https://bugzilla.gnome.org/show_bug.cgi?id=757056
-rw-r--r-- | src/librygel-server/rygel-music-item.vala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/librygel-server/rygel-music-item.vala b/src/librygel-server/rygel-music-item.vala index d528db50..2d9a45ed 100644 --- a/src/librygel-server/rygel-music-item.vala +++ b/src/librygel-server/rygel-music-item.vala @@ -87,8 +87,13 @@ public class Rygel.MusicItem : AudioItem { base.apply_didl_lite (didl_object); this.track_number = didl_object.track_number; - // TODO: Not sure about it. - //this.album_art.uri = didl_object.album_art + + if (didl_object.album_art.length > 0) { + if (this.album_art == null) + this.album_art = new Thumbnail (); + this.album_art.uri = didl_object.album_art; + } else if (this.album_art != null) + this.album_art = null; } internal override DIDLLiteObject? serialize (Serializer serializer, |