mpd: use empty dict on stopped playback state (#721)

This commit is contained in:
lasers 2019-03-24 01:36:31 -05:00 committed by chestm007
parent 5d66539359
commit 4b6a6a68c9

View File

@ -133,7 +133,10 @@ cleartext to the server.)"),
try:
status = self._mpd_command(self.s, "status")
playback_state = status["state"]
currentsong = self._mpd_command(self.s, "currentsong")
if playback_state == "stop":
currentsong = {}
else:
currentsong = self._mpd_command(self.s, "currentsong")
except Exception:
if self.hide_inactive:
self.output = {