Skip to content

coregrilo: Properly load tracker plugin

Jean Felder requested to merge wip/jfelder/coregrilo-tracker-plugin into master

All grilo plugins are loaded at startup. However, TrackerWrapper may not be available yet. In that case, GrlTrackerWrapper is not created. Once TrackerWrapper becomes available, all grilo plugins are loaded again in order to instantiate GrlTrackerWrapper. This approach has two issues:

  • all plugins are activated two times
  • TrackerWrapper may become available while the first tracker source is added. In that case, GrlTrackerWrapper is instantiated with a first source but a second source will be created by the second load_all_plugins call (a new source is created everytime the tracker plugin is activated). Then, GrlTrackerWrapper won't get any notification because they will be associated with the second source and not the first one.

Both issues can be solved by only (re)loading the tracker plugin when TrackerWrapper becomes available.

Merge request reports