From: Zeeshan Ali (Khattak) Date: Tue, 13 Jan 2009 14:32:59 +0000 (+0000) Subject: Check only prefix of MediaItem.upnp_class. X-Git-Tag: RYGEL_0_2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a05480ef05742b27600af735422646ea20c969a;p=profile%2Fivi%2Frygel.git Check only prefix of MediaItem.upnp_class. svn path=/trunk/; revision=430 --- diff --git a/src/rygel/rygel-media-item.vala b/src/rygel/rygel-media-item.vala index 4951032..f1d8071 100644 --- a/src/rygel/rygel-media-item.vala +++ b/src/rygel/rygel-media-item.vala @@ -87,12 +87,12 @@ public class Rygel.MediaItem : MediaObject { null, this.author); - if (this.upnp_class == VIDEO_CLASS) { + if (this.upnp_class.has_prefix (VIDEO_CLASS)) { didl_writer.add_string ("author", DIDLLiteWriter.NAMESPACE_UPNP, null, this.author); - } else if (this.upnp_class == MUSIC_CLASS) { + } else if (this.upnp_class.has_prefix (MUSIC_CLASS)) { didl_writer.add_string ("artist", DIDLLiteWriter.NAMESPACE_UPNP, null, @@ -130,7 +130,7 @@ public class Rygel.MediaItem : MediaObject { this.res.dlna_profile = "MP3"; /* FIXME */ - if (this.upnp_class == MediaItem.IMAGE_CLASS) { + if (this.upnp_class.has_prefix (MediaItem.IMAGE_CLASS)) { this.res.dlna_flags |= GUPnP.DLNAFlags.INTERACTIVE_TRANSFER_MODE; } else { this.res.dlna_flags |= GUPnP.DLNAFlags.STREAMING_TRANSFER_MODE; diff --git a/src/rygel/rygel-streamer.vala b/src/rygel/rygel-streamer.vala index b31f3ad..6f17a1c 100644 --- a/src/rygel/rygel-streamer.vala +++ b/src/rygel/rygel-streamer.vala @@ -154,7 +154,7 @@ public class Rygel.Streamer : GLib.Object { return; } - if (item.upnp_class == MediaItem.IMAGE_CLASS) { + if (item.upnp_class.has_prefix (MediaItem.IMAGE_CLASS)) { this.handle_interactive_item (msg, item, seek); } else { this.handle_streaming_item (msg, item, seek);