[gnome-music/wip/mschraal/tracker-detection: 15/18] coregrilo: Add TrackerWrapper check
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/tracker-detection: 15/18] coregrilo: Add TrackerWrapper check
- Date: Sat, 27 Jul 2019 10:41:11 +0000 (UTC)
commit dcba8daba54a1700d08545b3a547e383ebffb9d8
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Jul 23 17:34:11 2019 +0200
coregrilo: Add TrackerWrapper check
gnomemusic/coregrilo.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 37ff9e26..5a174517 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -29,6 +29,7 @@ from gi.repository import Grl, GLib, GObject
# from gnomemusic.grilowrappers.grldleynawrapper import GrlDLeynaWrapper
from gnomemusic.grilowrappers.grlsearchwrapper import GrlSearchWrapper
from gnomemusic.grilowrappers.grltrackerwrapper import GrlTrackerWrapper
+from gnomemusic.trackerwrapper import TrackerWrapper
class CoreGrilo(GObject.GObject):
@@ -60,6 +61,8 @@ class CoreGrilo(GObject.GObject):
self._thumbnail_sources_timeout = None
self._wrappers = {}
+ self._tracker_wrapper = TrackerWrapper()
+
Grl.init(None)
self._registry = Grl.Registry.get_default()
@@ -101,7 +104,8 @@ class CoreGrilo(GObject.GObject):
new_wrapper = None
if (source.props.source_id == "grl-tracker-source"
- and source.props.source_id not in self._wrappers.keys()):
+ and source.props.source_id not in self._wrappers.keys()
+ and self._tracker_wrapper.props.tracker_available):
new_wrapper = GrlTrackerWrapper(
source, self._coremodel, self._coreselection, self)
self._wrappers[source.props.source_id] = new_wrapper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]