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' return self._base_url + '/artwork'
# pylint: disable=unused-argument # pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None): def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the itunes platform. """ """ Sets up the itunes platform. """
add_devices([ add_devices([
ItunesDevice( ItunesDevice(
config.get('name', 'iTunes'), config.get('name', 'iTunes'),
@ -200,15 +201,13 @@ class ItunesDevice(MediaPlayerDevice):
def media_image_url(self): def media_image_url(self):
""" Image url of current playing media. """ """ Image url of current playing media. """
if (self.player_state == STATE_PLAYING or if self.player_state in (STATE_PLAYING, STATE_IDLE, STATE_PAUSED) and \
self.player_state == STATE_IDLE or self.current_title is not None:
self.player_state == STATE_PAUSED) and
self.current_title is not None:
return self.client.artwork_url() return self.client.artwork_url()
else: else:
return 'https://cloud.githubusercontent.com/assets/260/9829355' return 'https://cloud.githubusercontent.com/assets/260/9829355'
'/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png' '/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png'
@property @property
def media_title(self): def media_title(self):
""" Title of current playing media. """ """ Title of current playing media. """