[gnome-music/wip/jfelder/musicbrainz-tageditordialog: 207/209] utils: Map grilo tags and utils functions



commit f3d4745bb17fdd675c167f4249b2f8ca7cc66419
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Sep 3 08:11:02 2018 +0200

    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 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index 56b7e350..7294dfdd 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -175,3 +175,15 @@ def seconds_to_string(duration):
     seconds %= 60
 
     return '{:d}:{:02d}'.format(minutes, seconds)
+
+
+fields = {
+    'album': get_album_title,
+    'artist': get_artist_name,
+    'composer': get_composer_name,
+    'disc': get_album_disc_nr,
+    'genre': get_media_genre,
+    '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]