moar style fixes
This commit is contained in:
parent
b9f5ec9e2c
commit
9d750368ff
1 changed files with 6 additions and 7 deletions
|
@ -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,15 +201,13 @@ 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
|
||||
self.current_title is not None:
|
||||
if self.player_state in (STATE_PLAYING, STATE_IDLE, STATE_PAUSED) and \
|
||||
self.current_title is not None:
|
||||
return self.client.artwork_url()
|
||||
else:
|
||||
return 'https://cloud.githubusercontent.com/assets/260/9829355'
|
||||
'/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png'
|
||||
|
||||
'/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png'
|
||||
|
||||
@property
|
||||
def media_title(self):
|
||||
""" Title of current playing media. """
|
||||
|
|
Loading…
Add table
Reference in a new issue