cmus remove IO from properties (#6030)

This commit is contained in:
Adam Mills 2017-02-15 22:13:25 -05:00 committed by Paulus Schoutsen
parent 4addcccfac
commit eb9400de4c

View File

@ -90,11 +90,9 @@ class CmusDevice(MediaPlayerDevice):
@property
def state(self):
"""Return the media state."""
if 'status' not in self.status:
self.update()
if self.status['status'] == 'playing':
if self.status.get('status') == 'playing':
return STATE_PLAYING
elif self.status['status'] == 'paused':
elif self.status.get('status') == 'paused':
return STATE_PAUSED
else:
return STATE_OFF