[rygel] tracker: Revert "Let the miner decide the RDF type"
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Revert "Let the miner decide the RDF type"
- Date: Tue, 21 Feb 2012 13:49:07 +0000 (UTC)
commit 79ba03ba7529a4a738ce45fe342d81bc24f94aef
Author: Jens Georg <mail jensge org>
Date: Mon Feb 20 16:27:10 2012 +0200
tracker: Revert "Let the miner decide the RDF type"
This reverts commit 193aff3bd259a1437ee1d243d0dcc49dae645ac2. The
commit broke upload completely.
.../tracker/rygel-tracker-insertion-query.vala | 2 +-
.../tracker/rygel-tracker-search-container.vala | 23 +++----------------
2 files changed, 5 insertions(+), 20 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-insertion-query.vala b/src/plugins/tracker/rygel-tracker-insertion-query.vala
index c5e89d3..ba5d1b2 100644
--- a/src/plugins/tracker/rygel-tracker-insertion-query.vala
+++ b/src/plugins/tracker/rygel-tracker-insertion-query.vala
@@ -60,7 +60,7 @@ public class Rygel.Tracker.InsertionQuery : Query {
}
var triplets = new QueryTriplets ();
- triplets.add (new QueryTriplet (QUERY_ID, "a", "nfo:Media"));
+ triplets.add (new QueryTriplet (QUERY_ID, "a", category));
triplets.add (new QueryTriplet (QUERY_ID, "a", type));
triplets.add (new QueryTriplet (QUERY_ID, "nmm:uPnPShared", "true"));
triplets.add (new QueryTriplet (QUERY_ID, "tracker:available", "true"));
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index 5145cdd..0213cc9 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -132,16 +132,13 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
uint offset,
uint max_count,
out uint total_matches,
- Cancellable? cancellable,
- bool generic_type = false)
+ Cancellable? cancellable)
throws GLib.Error {
var results = new MediaObjects ();
var query = this.create_query (expression as RelationalExpression,
(int) offset,
- (int) max_count,
- generic_type);
-
+ (int) max_count);
if (query != null) {
yield query.execute (this.resources);
@@ -178,8 +175,7 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
0,
1,
out total_matches,
- cancellable,
- true);
+ cancellable);
if (results.size > 0) {
return results[0];
} else {
@@ -236,8 +232,7 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
private SelectionQuery? create_query (RelationalExpression? expression,
int offset,
- int max_count,
- bool generic_type) {
+ int max_count) {
if (expression.operand1 == "upnp:class" &&
!this.item_factory.upnp_class.has_prefix (expression.operand2)) {
return null;
@@ -258,16 +253,6 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
}
}
- // Drop to generic RDF type for find_object
- if (generic_type) {
- foreach (var triplet in query.triplets) {
- if (triplet.predicate == "a" &&
- triplet.obj.has_prefix ("nmm:")) {
- triplet.obj = "nfo:Media";
- }
- }
- }
-
query.offset = offset;
query.max_count = max_count;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]