Skip to content

Commit

Permalink
added preventive measure for NoneType object provided to add_audio_fe…
Browse files Browse the repository at this point in the history
…ature see #512
  • Loading branch information
fcusson committed Jan 25, 2025
1 parent 7a926a7 commit f439514
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/spotcast/spotify/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,9 @@ async def async_playback_state(self, force: bool = False) -> dict:

async def _async_add_audio_features(self, playback_state: dict) -> dict:
"""Adds the audio_features to the current playback state"""

playback_state = {} if playback_state is None else playback_state

current_uri = playback_state.get("item", {}).get("uri")
last_uri = self.current_item["uri"]

Expand Down

0 comments on commit f439514

Please sign in to comment.