[gnome-music/wip/jfelder/album-cover-editordialog: 2/8] utils: Map grilo tags and utils functions



commit 94c47b46921632d191eee628d475d77e5de8c353
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Nov 13 18:20:58 2018 +0100

    utils: Map grilo tags and utils functions
    
    Add a dictionnary to map a tag name with the corresponding utils
    function to get it.

 gnomemusic/utils.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index 605324cb..77ea74c5 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -125,3 +125,12 @@ def seconds_to_string(duration):
     seconds %= 60
 
     return '{:d}:{:02d}'.format(minutes, seconds)
+
+
+fields = {
+    'album': get_album_title,
+    'artist': get_artist_name,
+    'genre': get_media_genre,
+    'title': get_media_title,
+    'year': get_media_year
+}


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