Tracker plugin shows two irrelevant items among search results

Bug #376836 reported by Alexey Nedilko on 2009-05-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Do Plugins
Low
Alex Launi

Bug Description

At top of each search using Tracker plugin, there are 2 items shown, which look like this:
Defaulting to 'files' service
Results: 24

There are 2 problems with these items:
 1) They do not have any value for the user (especially the 1st one), but take 2 top places of the search results list.
 2) They are treated as IFileItems by Do, while they are obviously not files.

Looking under the hood, these 2 strings come from tracker-search tool, which is used by tracker plugin. The output of tracker search is the following:

axe@axe-desktop:~$ tracker-search <search query>
Defaulting to 'files' service
Results: 24
  <file #1>
  <file #2>
  <file #3>
  ...

The plugin reads all lines from tracker-search output, and adds them to the result list as IFileItem:
 # do-plugins/Tracker/src/TrackerSearch.cs, method TrackerSearchAction.Search
 string path;
 while (null != (path = tracker.StandardOutput.ReadLine ())) {
  files.Add (Services.UniverseFactory.NewFileItem (path.Trim()));
 }
That's how these strings get into results list.

Suggestions for fix:
 1) Quick'n'very dirty: make 2 ReadLine()'s before the loop :)
 2) Proper: implement Tracker plugin using Tracker D-Bus API (I'll provide a link for more detailed suggestion)

Environment:
 Ubuntu 9.04 x64
 gnome-do 0.8.1.3 (from PPA)
 gnome-do-plugins 0.8.1.3 (from PPA)

Alexey Nedilko (alexey.nedilko) wrote :

Proposal for implementing Tracker plugin using D-Bus API:
https://bugs.launchpad.net/do-plugins/+bug/376837

tags: added: community-plugins
Alex Launi (alexlauni) on 2009-05-17
Changed in do-plugins:
assignee: nobody → Alex Launi (alexlauni)
importance: Undecided → Low
milestone: none → 0.8.2
status: New → Fix Committed
Changed in do-plugins:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers