[rygel] tracker: Put size in store only if its > 0
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Put size in store only if its > 0
- Date: Tue, 26 Oct 2010 13:39:29 +0000 (UTC)
commit 9034121d27179e4480f59945a7a2595e8415804d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Oct 15 17:22:38 2010 +0300
tracker: Put size in store only if its > 0
Tracker keeps the size set by us originally even after the size changes. A
simple work-around is to just not set the size if its an empty file.
.../tracker/rygel-tracker-insertion-query.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-insertion-query.vala b/src/plugins/tracker/rygel-tracker-insertion-query.vala
index 736f7bf..3514d9a 100644
--- a/src/plugins/tracker/rygel-tracker-insertion-query.vala
+++ b/src/plugins/tracker/rygel-tracker-insertion-query.vala
@@ -48,9 +48,12 @@ public class Rygel.Tracker.InsertionQuery : Query {
triplets.add (new QueryTriplet (QUERY_ID,
"nie:url",
"\"" + item.uris[0] + "\""));
- triplets.add (new QueryTriplet (QUERY_ID,
+ if (item.size > 0) {
+ triplets.add (new QueryTriplet (
+ QUERY_ID,
"nfo:fileSize",
"\"" + item.size.to_string () + "\""));
+ }
var now = TimeVal ();
triplets.add (new QueryTriplet (QUERY_ID,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]