[gnome-music/wip/jfelder/tracker3: 3/3] make miner_fs_busname a property (to be squashed)
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/tracker3: 3/3] make miner_fs_busname a property (to be squashed)
- Date: Mon, 24 Aug 2020 14:01:58 +0000 (UTC)
commit 66e735747e98988ce6a5e2a37148d978e55cd18b
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Aug 24 15:53:55 2020 +0200
make miner_fs_busname a property (to be squashed)
gnomemusic/coregrilo.py | 2 +-
gnomemusic/grilowrappers/grltrackerplaylists.py | 14 ++++++-------
gnomemusic/grilowrappers/grltrackerwrapper.py | 26 ++++++++++++-------------
gnomemusic/trackerwrapper.py | 1 +
4 files changed, 22 insertions(+), 21 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 1e896327..d96eb1b5 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -88,7 +88,7 @@ class CoreGrilo(GObject.GObject):
config = Grl.Config.new("grl-tracker3", "grl-tracker3-source")
config.set_string(
- "miner-service", self._tracker_wrapper.miner_fs_busname())
+ "miner-service", self._tracker_wrapper.props.miner_fs_busname)
config.set_string(
"store-path", self._tracker_wrapper.cache_directory())
self._registry.add_config(config)
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index 5f9bff32..0e90207b 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -396,7 +396,7 @@ class Playlist(GObject.GObject):
"media_type": int(Grl.MediaType.AUDIO),
"filter_clause": 'tracker:id(?playlist) = ' + self.props.pl_id,
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
def _add_to_playlist_cb(
@@ -653,7 +653,7 @@ class Playlist(GObject.GObject):
"media_type": int(Grl.MediaType.AUDIO),
"filter_clause": "tracker:id(?song) = " + media_id,
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
options = self._fast_options.copy()
@@ -868,7 +868,7 @@ class MostPlayed(SmartPlaylist):
""".replace('\n', ' ').strip() % {
"media_type": int(Grl.MediaType.AUDIO),
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
@@ -920,7 +920,7 @@ class NeverPlayed(SmartPlaylist):
""".replace('\n', ' ').strip() % {
"media_type": int(Grl.MediaType.AUDIO),
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
@@ -982,7 +982,7 @@ class RecentlyPlayed(SmartPlaylist):
"media_type": int(Grl.MediaType.AUDIO),
'compare_date': compare_date,
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
@@ -1044,7 +1044,7 @@ class RecentlyAdded(SmartPlaylist):
"media_type": int(Grl.MediaType.AUDIO),
'compare_date': compare_date,
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
@@ -1095,5 +1095,5 @@ class Favorites(SmartPlaylist):
""".replace('\n', ' ').strip() % {
"media_type": int(Grl.MediaType.AUDIO),
"location_filter": self._tracker_wrapper.location_filter(),
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
}
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 5788da44..83fc41a8 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -203,7 +203,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
'location_filter': self._tracker_wrapper.location_filter()
}
@@ -273,7 +273,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
'location_filter': self._tracker_wrapper.location_filter()
}
@@ -368,7 +368,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.AUDIO),
'location_filter': self._tracker_wrapper.location_filter(),
'media_ids': media_ids
@@ -473,7 +473,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.AUDIO),
'location_filter': self._tracker_wrapper.location_filter()
}
@@ -541,7 +541,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
'location_filter': self._tracker_wrapper.location_filter()
}
@@ -602,7 +602,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
'location_filter': self._tracker_wrapper.location_filter()
}
@@ -648,7 +648,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
"artist_id": artist_id,
'location_filter': self._tracker_wrapper.location_filter()
@@ -711,7 +711,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
"album_id": album_id,
'location_filter': self._tracker_wrapper.location_filter()
@@ -794,7 +794,7 @@ class GrlTrackerWrapper(GObject.GObject):
'album_id': album_id,
'disc_nr': disc_nr,
'location_filter': self._tracker_wrapper.location_filter(),
- 'miner_fs_busname': self._tracker_wrapper.miner_fs_busname()
+ 'miner_fs_busname': self._tracker_wrapper.props.miner_fs_busname
}
options = self._fast_options.copy()
@@ -858,7 +858,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.AUDIO),
'location_filter': self._tracker_wrapper.location_filter(),
'name': term
@@ -926,7 +926,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
'location_filter': self._tracker_wrapper.location_filter(),
'name': term
@@ -999,7 +999,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace('\n', ' ').strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.AUDIO),
'location_filter': self._tracker_wrapper.location_filter(),
'name': term
@@ -1080,7 +1080,7 @@ class GrlTrackerWrapper(GObject.GObject):
}
}
""".replace("\n", " ").strip() % {
- "miner_fs_busname": self._tracker_wrapper.miner_fs_busname(),
+ "miner_fs_busname": self._tracker_wrapper.props.miner_fs_busname,
"media_type": int(Grl.MediaType.CONTAINER),
"filter_clause": filter_clause,
"location_filter": self._tracker_wrapper.location_filter()
diff --git a/gnomemusic/trackerwrapper.py b/gnomemusic/trackerwrapper.py
index d7ba11c9..2db07418 100644
--- a/gnomemusic/trackerwrapper.py
+++ b/gnomemusic/trackerwrapper.py
@@ -158,6 +158,7 @@ class TrackerWrapper(GObject.GObject):
GLib.DIR_SEPARATOR_S,
[GLib.get_user_cache_dir(), "gnome-music", "db"])
+ @GObject.Property(type=str, flags=GObject.ParamFlags.READABLE)
def miner_fs_busname(self):
return self._miner_fs_busname
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]