fixed window title when no song is playing

This commit is contained in:
Martin Wagner 2020-05-13 18:02:39 +02:00
parent 931f27763a
commit 2cf05fc308

View File

@ -2977,7 +2977,10 @@ class MainWindow(Gtk.ApplicationWindow):
def on_file_changed(self, *args): def on_file_changed(self, *args):
try: try:
song=self.client.extend_song_for_display(self.client.song_to_str_dict(self.client.currentsong())) song=self.client.currentsong()
if song == {}:
raise ValueError("Song out of range")
song=self.client.extend_song_for_display(self.client.song_to_str_dict(song))
if song["date"] != "": if song["date"] != "":
date=" ("+song["date"]+")" date=" ("+song["date"]+")"
else: else: