Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Song without album art prevents successful update of media status #10

Closed
nohum opened this issue Aug 20, 2017 · 0 comments
Closed

Song without album art prevents successful update of media status #10

nohum opened this issue Aug 20, 2017 · 0 comments
Assignees
Labels

Comments

@nohum
Copy link
Owner

nohum commented Aug 20, 2017

Listening to a song without album or a cover art lets the MQTT update code fail because a expected key is missing within the data:

ERROR:chromecast:command CastMediaStatus(status=<MediaStatus {'metadata_type': 3, 'title': "xxx", 'series_title': None, 'season': None, 'episode': None, 'artist': 'xxx', 'album_name': '', 'album_artist': 'xxx', 'track': None, 'subtitle_tracks': {}, 'images': [MediaImage(url=None, height=0, width=0)], 'supports_pause': True, 'supports_seek': True, 'supports_stream_volume': True, 'supports_stream_mute': True, 'supports_skip_forward': False, 'supports_skip_backward': False, 'current_time': 0.591299, 'content_id': 'xxx', 'content_type': 'audio/mpeg', 'duration': 272.79200000000003, 'stream_type': 'BUFFERED', 'idle_reason': 'INTERRUPTED', 'media_session_id': 37, 'playback_rate': 1, 'player_state': 'BUFFERING', 'supported_media_commands': 207, 'volume_level': 1, 'volume_muted': False, 'media_custom_data': {}, 'media_metadata': {'metadataType': 3, 'title': "xxx", 'albumName': '', 'albumArtist': 'xxx', 'artist': 'xxx', 'images': [{'height': 0, 'width': 0}]}, 'current_subtitle_tracks': []}>) failed
Traceback (most recent call last):
  File "/home/x/PycharmProjects/chromecast-mqtt-connector/handler/adapter.py", line 204, in _worker
    self._worker_cast_media_status(item.status)
  File "/home/x/PycharmProjects/chromecast-mqtt-connector/handler/adapter.py", line 389, in _worker_cast_media_status
    image_filtered = image["url"]
KeyError: 'url'
@nohum nohum added the bug label Aug 20, 2017
@nohum nohum self-assigned this Aug 20, 2017
nohum added a commit that referenced this issue Aug 20, 2017
#10 fix exception if no album art url given
@nohum nohum closed this as completed Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant