[rygel/rygel-0-18] server: Fix playlist creation
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-18] server: Fix playlist creation
- Date: Fri, 9 Aug 2013 08:10:20 +0000 (UTC)
commit 3928f36ad6277dbfb3b7c047e2423df99a6c57da
Author: Jens Georg <jensg openismus com>
Date: Tue Jun 25 16:44:25 2013 +0200
server: Fix playlist creation
If a client creates an item with a DIDL_S resource, rewrite the UPnP
class to .playlistItem.
https://bugzilla.gnome.org/show_bug.cgi?id=702256
src/librygel-server/rygel-object-creator.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-object-creator.vala b/src/librygel-server/rygel-object-creator.vala
index 541d2e8..88494d0 100644
--- a/src/librygel-server/rygel-object-creator.vala
+++ b/src/librygel-server/rygel-object-creator.vala
@@ -258,6 +258,15 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
throw new ContentDirectoryError.BAD_METADATA
("Cannot create restricted item");
}
+
+ // Handle DIDL_S items...
+ if (this.didl_object.upnp_class == "object.item") {
+ var resources = this.didl_object.get_resources ();
+ if (resources != null &&
+ resources.data.protocol_info.dlna_profile == "DIDL_S") {
+ this.didl_object.upnp_class = PlaylistItem.UPNP_CLASS;
+ }
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]