After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691717 - grilo tracker plugin doesn't notify about newly added media
grilo tracker plugin doesn't notify about newly added media
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
0.2.x
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-14 14:21 UTC by Mohammed Sameer
Modified: 2013-01-20 23:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.20 KB, patch)
2013-01-17 16:15 UTC, Mohammed Sameer
committed Details | Review

Description Mohammed Sameer 2013-01-14 14:21:35 UTC
Tracker notifies about all changes but grilo tracker plugin seems to notify only about changed or deleted media. It ignores newly added ones.
I think because it cannot find a GriloTrackerSource associated with the tracker source that has produced them in case of not using a per device source.
Comment 1 Mohammed Sameer 2013-01-14 14:31:09 UTC
The trace below shows that tracker plugin indeed gets notified but it doesn't fire the content-changed signal:

Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:531: Tracker update event for class=http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Audio ins=0 del=9 evt=0x1fada4c8
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:591: 	inserted=0 deleted=0 updated=0 orphan=1
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:286: tracker_evt_update_orphans: evt=0x1fada4c8
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:344: 	request : 'SELECT rdf:type(?urn) tracker:id(?urn) nie:dataSource(?urn) WHERE { ?urn a nfo:FileDataObject . FILTER (tracker:id(?urn) IN (100398)) }'
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:531: Tracker update event for class=http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Audio ins=0 del=9 evt=0x1fada590
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:591: 	inserted=0 deleted=0 updated=0 orphan=1
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:286: tracker_evt_update_orphans: evt=0x1fada590
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:344: 	request : 'SELECT rdf:type(?urn) tracker:id(?urn) nie:dataSource(?urn) WHERE { ?urn a nfo:FileDataObject . FILTER (tracker:id(?urn) IN (100398)) }'
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:260: tracker_evt_update_orphans_cb: evt=0x1fada4c8
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:531: Tracker update event for class=http://www.tracker-project.org/temp/nmm#MusicPiece ins=0 del=10 evt=0x1fada678
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:591: 	inserted=0 deleted=0 updated=0 orphan=1
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:286: tracker_evt_update_orphans: evt=0x1fada678
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:344: 	request : 'SELECT rdf:type(?urn) tracker:id(?urn) nie:dataSource(?urn) WHERE { ?urn a nfo:FileDataObject . FILTER (tracker:id(?urn) IN (100398)) }'
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:531: Tracker update event for class=http://www.tracker-project.org/temp/nmm#MusicPiece ins=0 del=10 evt=0x1fada740
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:591: 	inserted=0 deleted=0 updated=0 orphan=1
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:286: tracker_evt_update_orphans: evt=0x1fada740
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:344: 	request : 'SELECT rdf:type(?urn) tracker:id(?urn) nie:dataSource(?urn) WHERE { ?urn a nfo:FileDataObject . FILTER (tracker:id(?urn) IN (100398)) }'
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:260: tracker_evt_update_orphans_cb: evt=0x1fada590
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:260: tracker_evt_update_orphans_cb: evt=0x1fada678
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada4c8
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:215: 	Orphan item: id=100398 datasource=urn:nepomuk:datasource:9291a450-1d49-11de-8c30-0800200c9a66
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:260: tracker_evt_update_orphans_cb: evt=0x1fada740
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada590
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:215: 	Orphan item: id=100398 datasource=urn:nepomuk:datasource:9291a450-1d49-11de-8c30-0800200c9a66
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada678
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:215: 	Orphan item: id=100398 datasource=urn:nepomuk:datasource:9291a450-1d49-11de-8c30-0800200c9a66
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada4c8
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:194: 	end of parsing...
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:92: free evt=0x1fada4c8
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada740
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:215: 	Orphan item: id=100398 datasource=urn:nepomuk:datasource:9291a450-1d49-11de-8c30-0800200c9a66
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada590
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:194: 	end of parsing...
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:92: free evt=0x1fada590
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada678
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:194: 	end of parsing...
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:92: free evt=0x1fada678
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:187: tracker_evt_update_orphan_item_cb: evt=0x1fada740
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:194: 	end of parsing...
Grilo-DEBUG: [tracker-notif] grl-tracker-source-notif.c:92: free evt=0x1fada740
Comment 2 Mohammed Sameer 2013-01-17 16:15:06 UTC
Created attachment 233675 [details] [review]
proposed patch

Here's a proposed patch. I started to get notifications for newly indexed content.
Comment 3 Juan A. Suarez Romero 2013-01-20 23:43:15 UTC
commit 18ee3f35540d8541b4308851eee2519ca8e03fb9
Author: Mohammed Hassan <mohammed.hassan@jollamobile.com>
Date:   Thu Jan 17 18:10:54 2013 +0200

    Account for grl_tracker_per_device_source while looking up the GrlTrackerSource
    
    We will never find a GrlTrackerSource corresponding to any tracker data source if we are
    using a catch all (not per device) source. In that case we simply try to find the one
    and only source we have and use it for notifications.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691717

 src/tracker/grl-tracker-source-notif.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)