[rygel] tracker: Only share available files
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Only share available files
- Date: Mon, 21 Feb 2011 20:46:58 +0000 (UTC)
commit d5ea9126ff9f450b6c7d7e6b4c607f729a0e30b9
Author: Jens Georg <mail jensge org>
Date: Sun Feb 20 23:54:21 2011 +0100
tracker: Only share available files
As tracker also indices removable media we need to filter for
tracker:available=true to expose only those files that are currently
available, not each and every file that tracker has ever seen.
.../tracker/rygel-tracker-selection-query.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-selection-query.vala b/src/plugins/tracker/rygel-tracker-selection-query.vala
index 7883776..d538920 100644
--- a/src/plugins/tracker/rygel-tracker-selection-query.vala
+++ b/src/plugins/tracker/rygel-tracker-selection-query.vala
@@ -32,6 +32,8 @@ public class Rygel.Tracker.SelectionQuery : Query {
" nmm:uPnPShared(" +
ITEM_VARIABLE +
") = true)";
+ private const string AVAILABLE_FILTER = "(tracker:available(" +
+ ITEM_VARIABLE + ") = true)";
public ArrayList<string> variables;
public ArrayList<string> filters;
@@ -94,6 +96,10 @@ public class Rygel.Tracker.SelectionQuery : Query {
// Make sure we don't expose items that are marked not to be shared
filters.add (SHARED_FILTER);
+ // Make sure we don't expose items on removable media that isn't
+ // mounted
+ filters.add (AVAILABLE_FILTER);
+
if (filters.size > 0) {
query += " FILTER (";
for (var i = 0; i < filters.size; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]