[gnome-music/wip/jfelder/tracker3-rebased: 28/39] coregrilo: Handle a list of keys for writeback




commit 10917938e2cb9ade6f418554ba4744e5a23cae9e
Author: Jean Felder <jfelder src gnome org>
Date:   Sat Nov 23 16:37:53 2019 +0100

    coregrilo: Handle a list of keys for writeback
    
    Several metadata can be updated with a single call.

 gnomemusic/coregrilo.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 3927f338..b44ad402 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -236,11 +236,11 @@ class CoreGrilo(GObject.GObject):
         self._wrappers[source].populate_album_disc_songs(
             media, discnr, callback)
 
-    def writeback(self, media, key):
-        """Store the values associated with the key.
+    def writeback(self, media, keys):
+        """Store the values associated with the keys.
 
         :param Grl.Media media: A Grilo media item
-        :param int key: a Grilo metadata key
+        :param list keys: A list of Grilo metadata keys
         """
         def _store_metadata_cb(source, media, failed_keys, data, error):
             if error is not None:
@@ -252,7 +252,7 @@ class CoreGrilo(GObject.GObject):
         for wrapper in self._wrappers.values():
             if media.get_source() == wrapper.source.props.source_id:
                 wrapper.props.source.store_metadata(
-                    media, [key], Grl.WriteFlags.NORMAL, _store_metadata_cb,
+                    media, keys, Grl.WriteFlags.NORMAL, _store_metadata_cb,
                     None)
                 break
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]