GNOME Bugzilla – Bug 691717
grilo tracker plugin doesn't notify about newly added media
Last modified: 2013-01-20 23:43:19 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.
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
Created attachment 233675 [details] [review] proposed patch Here's a proposed patch. I started to get notifications for newly indexed content.
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(-)