[gnome-music/wip/mschraal/grltrackerwrapper-grilo-options-copy: 3/3] grltrackerwrapper: Make Grilo full options classwide
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/grltrackerwrapper-grilo-options-copy: 3/3] grltrackerwrapper: Make Grilo full options classwide
- Date: Thu, 20 Aug 2020 09:33:55 +0000 (UTC)
commit 1c0f0d486d74211317d1234f43a69bb2cf7af58b
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Aug 20 11:26:13 2020 +0200
grltrackerwrapper: Make Grilo full options classwide
gnomemusic/grilowrappers/grltrackerwrapper.py | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 166ebda9..9a081633 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -100,6 +100,9 @@ class GrlTrackerWrapper(GObject.GObject):
self._fast_options = Grl.OperationOptions()
self._fast_options.set_resolution_flags(
Grl.ResolutionFlags.FAST_ONLY | Grl.ResolutionFlags.IDLE_RELAY)
+ self._full_options = Grl.OperationOptions()
+ self._full_options.set_resolution_flags(
+ Grl.ResolutionFlags.FULL | Grl.ResolutionFlags.IDLE_RELAY)
self._content_changed_id = None
self.props.source = source
@@ -954,12 +957,8 @@ class GrlTrackerWrapper(GObject.GObject):
song_id = media.get_id()
query = self._get_album_for_media_id_query(song_id)
- full_options = Grl.OperationOptions()
- full_options.set_resolution_flags(
- Grl.ResolutionFlags.FULL | Grl.ResolutionFlags.IDLE_RELAY)
-
self.props.source.query(
- query, self.METADATA_THUMBNAIL_KEYS, full_options,
+ query, self.METADATA_THUMBNAIL_KEYS, self._full_options,
art_retrieved_cb)
def get_album_art(self, corealbum):
@@ -990,12 +989,8 @@ class GrlTrackerWrapper(GObject.GObject):
album_id = media.get_id()
query = self._get_album_for_media_id_query(album_id, False)
- full_options = Grl.OperationOptions()
- full_options.set_resolution_flags(
- Grl.ResolutionFlags.FULL | Grl.ResolutionFlags.IDLE_RELAY)
-
self._source.query(
- query, self.METADATA_THUMBNAIL_KEYS, full_options,
+ query, self.METADATA_THUMBNAIL_KEYS, self._full_options,
art_retrieved_cb)
def get_artist_art(self, coreartist):
@@ -1019,13 +1014,9 @@ class GrlTrackerWrapper(GObject.GObject):
StoreArt(coreartist, resolved_media.get_thumbnail())
- full_options = Grl.OperationOptions()
- full_options.set_resolution_flags(
- Grl.ResolutionFlags.FULL | Grl.ResolutionFlags.IDLE_RELAY)
-
self.props.source.resolve(
- media, [Grl.METADATA_KEY_THUMBNAIL], full_options, art_resolved_cb,
- None)
+ media, [Grl.METADATA_KEY_THUMBNAIL], self._full_options,
+ art_resolved_cb, None)
def stage_playlist_deletion(self, playlist):
"""Prepares playlist deletion.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]