[gnome-music/wip/mschraal/asyncqueue-fixes: 23/29] grltrackerwrapper: Add type filter for GrlOptions
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/asyncqueue-fixes: 23/29] grltrackerwrapper: Add type filter for GrlOptions
- Date: Sun, 19 Sep 2021 10:51:08 +0000 (UTC)
commit ce1264da2dff194fa1226448a2cc4859df9166fa
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Sep 7 12:30:48 2021 +0200
grltrackerwrapper: Add type filter for GrlOptions
Music is only interested in audio content, this should speed up some
queries.
gnomemusic/grilowrappers/grltrackerwrapper.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index a86dbb890..a721d95f7 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -142,9 +142,11 @@ class GrlTrackerWrapper(GObject.GObject):
cm.props.artists_search_proxy.append(self._artists_search)
self._fast_options: Grl.OperationOptions = Grl.OperationOptions()
+ self._fast_options.set_type_filter(Grl.TypeFilter.AUDIO)
self._fast_options.set_resolution_flags(
Grl.ResolutionFlags.FAST_ONLY)
self._full_options: Grl.OperationOptions = Grl.OperationOptions()
+ self._full_options.set_type_filter(Grl.TypeFilter.AUDIO)
self._full_options.set_resolution_flags(
Grl.ResolutionFlags.FULL)
@@ -1227,7 +1229,7 @@ class GrlTrackerWrapper(GObject.GObject):
query: str = self._get_album_for_media_id_query(song_id)
self.props.source.query(
- query, self._METADATA_THUMBNAIL_KEYS, self._full_options,
+ query, self._METADATA_THUMBNAIL_KEYS, self._full_options_prio,
art_retrieved_cb)
def get_album_art(self, corealbum: CoreAlbum) -> None:
@@ -1256,7 +1258,7 @@ class GrlTrackerWrapper(GObject.GObject):
query: str = self._get_album_for_media_id_query(album_id, False)
self.props.source.query(
- query, self._METADATA_THUMBNAIL_KEYS, self._full_options,
+ query, self._METADATA_THUMBNAIL_KEYS, self._full_options_prio,
art_retrieved_cb)
def get_artist_art(self, coreartist: CoreArtist) -> None:
@@ -1284,7 +1286,7 @@ class GrlTrackerWrapper(GObject.GObject):
StoreArt(), coreartist, resolved_media.get_thumbnail())
self.props.source.resolve(
- media, [Grl.METADATA_KEY_THUMBNAIL], self._full_options,
+ media, [Grl.METADATA_KEY_THUMBNAIL], self._full_options_prio,
art_resolved_cb)
def stage_playlist_deletion(self, playlist: Optional[Playlist]) -> None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]