moar style fixes

This commit is contained in:
Jon Maddox 2015-09-12 00:16:51 -04:00
parent b9f5ec9e2c
commit 9d750368ff

View file

@ -102,10 +102,11 @@ class Itunes(object):
return self._base_url + '/artwork'
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the itunes platform. """
add_devices([
ItunesDevice(
config.get('name', 'iTunes'),
@ -200,9 +201,7 @@ class ItunesDevice(MediaPlayerDevice):
def media_image_url(self):
""" Image url of current playing media. """
if (self.player_state == STATE_PLAYING or
self.player_state == STATE_IDLE or
self.player_state == STATE_PAUSED) and
if self.player_state in (STATE_PLAYING, STATE_IDLE, STATE_PAUSED) and \
self.current_title is not None:
return self.client.artwork_url()
else: