[rygel/wip/create-container: 11/14] wip
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/create-container: 11/14] wip
- Date: Mon, 25 Feb 2013 16:29:35 +0000 (UTC)
commit 14ed0ebd4210a8beb59695a83bf7a824ae89cc2a
Author: Jens Georg <jensg openismus com>
Date: Sat Feb 23 12:40:16 2013 +0100
wip
src/librygel-server/rygel-item-creator.vala | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/librygel-server/rygel-item-creator.vala b/src/librygel-server/rygel-item-creator.vala
index e33b6e7..c589566 100644
--- a/src/librygel-server/rygel-item-creator.vala
+++ b/src/librygel-server/rygel-item-creator.vala
@@ -36,7 +36,7 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
private string container_id;
private string elements;
- private DIDLLiteItem didl_item;
+ private DIDLLiteObject didl_item;
private MediaItem item;
private ContentDirectory content_dir;
@@ -136,7 +136,9 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
* according to UPnP and DLNA guidelines.
*/
private void parse_didl () throws Error {
- this.didl_parser.item_available.connect ((didl_item) => {
+ // FIXME: This will take the last object in the DIDL-Lite, maybe we
+ // should limit it to one somehow.
+ this.didl_parser.object_available.connect ((didl_item) => {
this.didl_item = didl_item;
});
@@ -177,7 +179,7 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
if (didl_item.upnp_class == null ||
didl_item.upnp_class == "" ||
- !didl_item.upnp_class.has_prefix ("object.item")) {
+ !didl_item.upnp_class.has_prefix ("object")) {
throw new ContentDirectoryError.BAD_METADATA
("Invalid upnp:class given ");
}
@@ -449,6 +451,8 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
return new MusicItem (id, parent, title);
case PlaylistItem.UPNP_CLASS:
return new PlaylistItem (id, parent, title);
+ case MediaContainer.STORAGE_FOLDER:
+ return new MediaContainer (id, parent, title);
default:
throw new ContentDirectoryError.BAD_METADATA
("Creation of item of class '%s' " +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]