Add support for “albumartist” tag (resolve #27)
This commit is contained in:
parent
1fdab35391
commit
c451c32437
7 changed files with 97 additions and 36 deletions
21
mcg/utils.py
21
mcg/utils.py
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
import locale
|
||||
import os
|
||||
import urllib
|
||||
|
||||
|
|
@ -54,6 +55,26 @@ class Utils:
|
|||
return pixbuf
|
||||
|
||||
|
||||
def create_artists_label(album):
|
||||
label = ', '.join(album.get_albumartists())
|
||||
if album.get_artists():
|
||||
label = locale.gettext("{} feat. {}").format(
|
||||
label,
|
||||
", ".join(album.get_artists())
|
||||
)
|
||||
return label
|
||||
|
||||
|
||||
def create_track_title(track):
|
||||
title = track.get_title()
|
||||
if track.get_artists():
|
||||
title = locale.gettext("{} feat. {}").format(
|
||||
title,
|
||||
", ".join(track.get_artists())
|
||||
)
|
||||
return title
|
||||
|
||||
|
||||
|
||||
|
||||
class TracklistSize:
|
||||
|
|
|
|||
Loading…
Reference in a new issue