Ensure currentsong dictionary has "file" key

This commit is contained in:
ncoop 2016-04-15 20:08:32 -07:00
parent 8aeaab7fa5
commit 84e438caf4

View File

@ -114,7 +114,7 @@ class MPD(IntervalModule):
"bitrate": int(status.get("bitrate", 0)), "bitrate": int(status.get("bitrate", 0)),
} }
if not fdict["title"]: if not fdict["title"] and "file" in currentsong:
fdict["filename"] = '.'.join( fdict["filename"] = '.'.join(
basename(currentsong["file"]).split('.')[:-1]) basename(currentsong["file"]).split('.')[:-1])
else: else: