[gnome-music/wip/jfelder/album-cover-editordialog: 1/8] utils: Add support for genre retrieval



commit 9d6af31044f07fa516743b44d44e7e5640f9f285
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Nov 13 14:27:32 2018 +0100

    utils: Add support for genre retrieval

 gnomemusic/utils.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index ec171663..605324cb 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -75,6 +75,17 @@ def get_artist_name(item):
             or _("Unknown Artist"))
 
 
+def get_media_genre(item):
+    """Returns the genre of the media item.
+
+    :param item: A Grilo Media object
+    :return: The genre
+    :rtype: string
+    """
+
+    return item.get_genre()
+
+
 def get_media_title(item):
     """Returns the title of the media item.
 


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