[gnome-music/wip/jfelder/songeditor-gtk4: 66/76] coregrilo: Handle a list of keys for writeback
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/songeditor-gtk4: 66/76] coregrilo: Handle a list of keys for writeback
- Date: Wed, 23 Feb 2022 20:36:45 +0000 (UTC)
commit 2a833a0dea5cf4710887f78a0ee139ecc2e06c3b
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 27e25cab8..6d5843c35 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -255,11 +255,11 @@ class CoreGrilo(GObject.GObject):
source = media.get_source()
self._wrappers[source].get_album_disc(media, discnr, model)
- 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:
@@ -271,7 +271,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]