[rygel] tracker: Ignore duration of '0'



commit 2fd9cefb87f89c0ca129e3b6d4355f8acf295b4d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Aug 6 00:03:58 2010 +0300

    tracker: Ignore duration of '0'

 .../tracker/rygel-tracker-music-item-factory.vala  |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-music-item-factory.vala b/src/plugins/tracker/rygel-tracker-music-item-factory.vala
index 2641fb7..c8dee6c 100644
--- a/src/plugins/tracker/rygel-tracker-music-item-factory.vala
+++ b/src/plugins/tracker/rygel-tracker-music-item-factory.vala
@@ -65,8 +65,10 @@ public class Rygel.Tracker.MusicItemFactory : ItemFactory {
                                       throws GLib.Error {
         var item = base.create (id, uri, parent, metadata);
 
-        if (metadata[MusicMetadata.DURATION] != "")
+        if (metadata[MusicMetadata.DURATION] != "" &&
+            metadata[MusicMetadata.DURATION] != "0") {
             item.duration = metadata[MusicMetadata.DURATION].to_int ();
+        }
 
         if (metadata[MusicMetadata.AUDIO_TRACK_NUM] != "") {
             var track_number = metadata[MusicMetadata.AUDIO_TRACK_NUM];



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