media-export: Correct condition for (us)setting duration
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 23 Jul 2010 17:01:08 +0000 (20:01 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 23 Jul 2010 17:04:00 +0000 (20:04 +0300)
Thanks to Arun Raghavan for pointing this out.

src/plugins/media-export/rygel-media-export-item.vala

index ede7b53..078f2b0 100644 (file)
@@ -206,9 +206,9 @@ public class Rygel.MediaExport.Item : Rygel.MediaItem {
         base (id, parent, title, upnp_class);
 
         if (dlna_info.info.duration > -1) {
-            this.duration = -1;
-        } else {
             this.duration = dlna_info.info.duration / Gst.SECOND;
+        } else {
+            this.duration = -1;
         }
 
         if (dlna_info.info.tags != null) {