Use filename/URL if there's no title
This commit is contained in:
parent
9827cdfd90
commit
bb895e9c9a
1 changed files with 7 additions and 3 deletions
10
mmmpd
10
mmmpd
|
@ -50,9 +50,13 @@ def clear_status():
|
||||||
# ---------
|
# ---------
|
||||||
|
|
||||||
def song_string(song_info):
|
def song_string(song_info):
|
||||||
artist = song_info.get("artist") or "Unknown artist"
|
if song_info.get("title") is None:
|
||||||
title = song_info.get("title") or "Unknown song"
|
artist = song_info.get("artist") or ""
|
||||||
return f"{artist} – {title}"
|
title = song_info.get("file") or "Unknown song"
|
||||||
|
else:
|
||||||
|
artist = song_info.get("artist") or "Unknown artist"
|
||||||
|
title = song_info.get("title") or "Unknown song"
|
||||||
|
return f"{artist}{' – ' if artist else ''}{title}"
|
||||||
|
|
||||||
|
|
||||||
def formatted_status(mpd_client):
|
def formatted_status(mpd_client):
|
||||||
|
|
Loading…
Reference in a new issue