[gnome-music/wip/mschraal/tageditor-13feb2020: 50/53] utils: Add fields to getters mapping
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/tageditor-13feb2020: 50/53] utils: Add fields to getters mapping
- Date: Tue, 24 Mar 2020 10:36:59 +0000 (UTC)
commit 0bc01efbc4cdb5e3b1d7c7a836d90c0676d3b84d
Author: Sumaid Syed <sumaidsyed gmail com>
Date: Fri Aug 16 16:09:49 2019 +0530
utils: Add fields to getters mapping
Add a dictionary which allows iterating over
different getters and filling corresponding entries
or suggestions in tageditor.
gnomemusic/utils.py | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index 65b68718..4217e175 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -222,3 +222,13 @@ def wrap_list_store_sort_func(func):
return func(a, b, *user_data)
return wrap
+
+
+fields_getter = {
+ "album": get_album_title,
+ "artist": get_song_artist,
+ "disc": get_album_disc_nr,
+ "title": get_media_title,
+ "track": get_media_track_nr,
+ "year": get_media_year
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]