[rygel] server: Fix playlist creation
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] server: Fix playlist creation
- Date: Tue, 30 Jul 2013 08:31:56 +0000 (UTC)
commit f8debdcf6d054c34afdff8da8ec95faf7d79891b
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 ddead31..8e7df00 100644
--- a/src/librygel-server/rygel-object-creator.vala
+++ b/src/librygel-server/rygel-object-creator.vala
@@ -254,6 +254,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]