[rygel] core,tracker: Set item's size on creation



commit 62dc77da90e8b3b08f9d472fb33828980b19576c
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Sep 30 16:49:14 2010 +0300

    core,tracker: Set item's size on creation

 .../tracker/rygel-tracker-insertion-query.vala     |    3 +++
 src/rygel/rygel-media-container.vala               |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-insertion-query.vala b/src/plugins/tracker/rygel-tracker-insertion-query.vala
index 888cd07..5b61bd6 100644
--- a/src/plugins/tracker/rygel-tracker-insertion-query.vala
+++ b/src/plugins/tracker/rygel-tracker-insertion-query.vala
@@ -47,6 +47,9 @@ public class Rygel.Tracker.InsertionQuery : Query {
         triplets.add (new QueryTriplet (QUERY_ID,
                                         "nie:url",
                                         "\"" + item.uris[0] + "\""));
+        triplets.add (new QueryTriplet (QUERY_ID,
+                                        "nfo:fileSize",
+                                        "\"" + item.size.to_string () + "\""));
 
         var now = TimeVal ();
         triplets.add (new QueryTriplet (QUERY_ID,
diff --git a/src/rygel/rygel-media-container.vala b/src/rygel/rygel-media-container.vala
index 69a64eb..5152ad1 100644
--- a/src/rygel/rygel-media-container.vala
+++ b/src/rygel/rygel-media-container.vala
@@ -226,6 +226,7 @@ public abstract class Rygel.MediaContainer : MediaObject {
                                  cancellable);
         var uri = file.get_uri ();
         item.id = uri;
+        item.size = 0;
         item.uris.add (uri);
     }
 



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