[rygel] server: Set the album art uri when applying didl
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] server: Set the album art uri when applying didl
- Date: Sat, 21 Nov 2015 12:17:23 +0000 (UTC)
commit 1c4ed3fe76a55fdd3ac75163cf5e02bb15b090c6
Author: Richard Röjfors <richard rojfors gmail com>
Date: Sat Oct 24 14:21:18 2015 +0200
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
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 d528db5..2d9a45e 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]