[rygel/wip/playlist-item: 6/9] server: Add creator to playlist item.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/playlist-item: 6/9] server: Add creator to playlist item.
- Date: Mon, 26 Nov 2012 16:45:44 +0000 (UTC)
commit 68a5dc4b8a50ee731ce5cec2b3fc130bf5b4cb14
Author: Krzesimir Nowak <krnowak openismus com>
Date: Mon Nov 26 15:31:32 2012 +0100
server: Add creator to playlist item.
src/librygel-server/rygel-playlist-item.vala | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-playlist-item.vala b/src/librygel-server/rygel-playlist-item.vala
index ff4ad8c..0a416bf 100644
--- a/src/librygel-server/rygel-playlist-item.vala
+++ b/src/librygel-server/rygel-playlist-item.vala
@@ -20,6 +20,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+using GUPnP;
+
/**
* Represents a playlist item.
*
@@ -28,6 +30,8 @@
public class Rygel.PlaylistItem : MediaItem {
public new const string UPNP_CLASS = "object.item.playlistItem";
+ public string creator { get; set; }
+
public PlaylistItem (string id,
MediaContainer parent,
string title,
@@ -38,4 +42,18 @@ public class Rygel.PlaylistItem : MediaItem {
public override bool streamable () {
return false;
}
+
+ internal override DIDLLiteObject? serialize (Serializer serializer,
+ HTTPServer http_server)
+ throws Error {
+ var didl_item = base.serialize (serializer, http_server);
+
+ if (this.creator != null && this.creator != "") {
+ var contributor = didl_item.add_creator ();
+
+ contributor.name = this.creator;
+ }
+
+ return didl_item;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]