rygel r430 - trunk/src/rygel



Author: zeeshanak
Date: Tue Jan 13 14:32:59 2009
New Revision: 430
URL: http://svn.gnome.org/viewvc/rygel?rev=430&view=rev

Log:
Check only prefix of MediaItem.upnp_class.

Modified:
   trunk/src/rygel/rygel-media-item.vala
   trunk/src/rygel/rygel-streamer.vala

Modified: trunk/src/rygel/rygel-media-item.vala
==============================================================================
--- trunk/src/rygel/rygel-media-item.vala	(original)
+++ trunk/src/rygel/rygel-media-item.vala	Tue Jan 13 14:32:59 2009
@@ -87,12 +87,12 @@
                                     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 @@
 
         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;

Modified: trunk/src/rygel/rygel-streamer.vala
==============================================================================
--- trunk/src/rygel/rygel-streamer.vala	(original)
+++ trunk/src/rygel/rygel-streamer.vala	Tue Jan 13 14:32:59 2009
@@ -154,7 +154,7 @@
             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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]