Merge pull request #99 from Arvedui/fix_mpd

fixed false "error connecting MPD" when no song is seleced right now"
This commit is contained in:
enkore 2014-08-16 16:20:34 +02:00
commit 1dbbc01cc6

View File

@ -84,7 +84,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 "filename" in fdict:
fdict["filename"] = '.'.join( fdict["filename"] = '.'.join(
basename(currentsong["file"]).split('.')[:-1]) basename(currentsong["file"]).split('.')[:-1])
else: else: