[rygel] tracker: Treat 'nie:url' property like others
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Treat 'nie:url' property like others
- Date: Thu, 9 Dec 2010 13:21:01 +0000 (UTC)
commit 052805906b08c64805efc923c1c9c9bd94dfef31
Author: Sunil Mohan Adapa <sunil medhas org>
Date: Sun Dec 5 06:09:47 2010 +0530
tracker: Treat 'nie:url' property like others
.../tracker/rygel-tracker-item-factory.vala | 6 +++++-
.../tracker/rygel-tracker-search-container.vala | 15 +++++----------
2 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-item-factory.vala b/src/plugins/tracker/rygel-tracker-item-factory.vala
index 6cf9e75..75f26ae 100644
--- a/src/plugins/tracker/rygel-tracker-item-factory.vala
+++ b/src/plugins/tracker/rygel-tracker-item-factory.vala
@@ -1,8 +1,10 @@
/*
* Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
* Copyright (C) 2008 Nokia Corporation.
+ * Copyright (C) 2010 MediaNet Inh.
*
- * Author: Zeeshan Ali <zeenix gmail com>
+ * Authors: Zeeshan Ali <zeenix gmail com>
+ * Sunil Mohan Adapa <sunil medhas org>
*
* This file is part of Rygel.
*
@@ -28,6 +30,7 @@ using Gee;
*/
public abstract class Rygel.Tracker.ItemFactory {
protected enum Metadata {
+ URL,
FILE_NAME,
TITLE,
DLNA_PROFILE,
@@ -57,6 +60,7 @@ public abstract class Rygel.Tracker.ItemFactory {
this.key_chains.add (new ArrayList<string> ());
}
+ this.key_chains[Metadata.URL].add ("nie:url");
this.key_chains[Metadata.FILE_NAME].add ("nfo:fileName");
this.key_chains[Metadata.TITLE].add ("nie:title");
this.key_chains[Metadata.DLNA_PROFILE].add ("nmm:dlnaProfile");
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index 1a99589..de5934b 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -1,9 +1,11 @@
/*
* Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
* Copyright (C) 2008 Nokia Corporation.
+ * Copyright (C) 2010 MediaNet Inh.
*
- * Author: Zeeshan Ali <zeenix gmail com>
- * Ivan Frade <ivan frade nokia com>
+ * Authors: Zeeshan Ali <zeenix gmail com>
+ * Ivan Frade <ivan frade nokia com>
+ * Sunil Mohan Adapa <sunil medhas org>
*
* This file is part of Rygel.
*
@@ -35,8 +37,6 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
private const string MODIFIED_PREDICATE = "nfo:fileLastModified";
private const string MODIFIED_VARIABLE = "?modified";
- private const string URL_PREDICATE = "nie:url";
- private const string URL_VARIABLE = "?url";
public SelectionQuery query;
public ItemFactory item_factory;
@@ -55,7 +55,6 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
var variables = new ArrayList<string> ();
variables.add (SelectionQuery.ITEM_VARIABLE);
- variables.add (URL_VARIABLE);
QueryTriplets our_triplets;
if (triplets != null) {
@@ -72,10 +71,6 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
(SelectionQuery.ITEM_VARIABLE,
MODIFIED_PREDICATE,
MODIFIED_VARIABLE));
- our_triplets.add_triplet (new QueryTriplet
- (SelectionQuery.ITEM_VARIABLE,
- URL_PREDICATE,
- URL_VARIABLE));
foreach (var chain in this.item_factory.key_chains) {
var variable = SelectionQuery.ITEM_VARIABLE;
@@ -141,7 +136,7 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
for (uint i = 0; i < query.result.length[0]; i++) {
var id = this.create_child_id_for_urn (query.result[i, 0]);
var uri = query.result[i, 1];
- string[] metadata = this.slice_strvv_tail (query.result, i, 2);
+ string[] metadata = this.slice_strvv_tail (query.result, i, 1);
var item = this.item_factory.create (id, uri, this, metadata);
results.add (item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]