[gnome-music/wip/jfelder/xdg-music-dir-not-set: 3/3] coregrilo: Do not query tracker if xdg music dir is not set
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/xdg-music-dir-not-set: 3/3] coregrilo: Do not query tracker if xdg music dir is not set
- Date: Sat, 9 Nov 2019 20:56:59 +0000 (UTC)
commit fc1f85ac1afde42fb5cff7c8998829ae9b564692
Author: Jean Felder <jfelder src gnome org>
Date: Fri Nov 8 23:17:28 2019 +0100
coregrilo: Do not query tracker if xdg music dir is not set
GrlTrackerWrapper
gnomemusic/coregrilo.py | 1 +
gnomemusic/trackerwrapper.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 5581cdbe..ed2c9993 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -132,6 +132,7 @@ class CoreGrilo(GObject.GObject):
new_state = self._tracker_wrapper.props.tracker_available
if (source.props.source_id == "grl-tracker-source"
and source.props.source_id not in self._wrappers.keys()
+ and TrackerWrapper.location_filter() is not None
and new_state == TrackerState.AVAILABLE):
new_wrapper = GrlTrackerWrapper(
source, self._coremodel, self._application, self,
diff --git a/gnomemusic/trackerwrapper.py b/gnomemusic/trackerwrapper.py
index d6fbb463..06e406e9 100644
--- a/gnomemusic/trackerwrapper.py
+++ b/gnomemusic/trackerwrapper.py
@@ -100,7 +100,7 @@ class TrackerWrapper(GObject.GObject):
assert music_dir is not None
except (TypeError, AssertionError):
logger.warning("XDG Music dir is not set")
- return
+ return None
music_dir = Tracker.sparql_escape_string(
GLib.filename_to_uri(music_dir))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]