Show album length on Playlist and Library panel (close #57)

Show the length of an album in the tooltip on the Playlist and the
Library panel.
This commit is contained in:
coderkun 2020-03-22 00:43:20 +01:00
commit 704fa3278a
6 changed files with 35 additions and 18 deletions

View file

@ -66,6 +66,13 @@ class Utils:
return label
def create_length_label(album):
minutes = album.get_length() // 60
seconds = album.get_length() - minutes * 60
return locale.gettext("{}:{} minutes").format(minutes, seconds)
def create_track_title(track):
title = track.get_title()
if track.get_artists():