B5r1oJ0A9G / teufel_raumfeld

Integration for Teufel smart speaker (aka Raumfeld Multiroom) into https://www.home-assistant.io/.
GNU General Public License v3.0
31 stars 7 forks source link

Media Browser trhows an error, when accessing "Last Played" #67

Open B5r1oJ0A9G opened 3 months ago

B5r1oJ0A9G commented 3 months ago

When browsing media via the media browser to "Teufel favorites" and then to "Recently played", the media browser closes with the error message: "Error browsing media" and "Unknown error".

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/teufel_raumfeld/__init__.py:481
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 19:15:09 (9 occurrences)
Last logged: 19:21:00

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1304, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/teufel_raumfeld/media_player.py", line 673, in async_browse_media
    children = await self._raumfeld.async_browse_media(object_id, BROWSE_CHILDREN)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/teufel_raumfeld/__init__.py", line 481, in async_browse_media
    media_content_id = entry[DIDL_ATTR_ID]
                       ~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
theomega commented 2 months ago

I can't reproduce this, this works for me. Not sure what the issue here is.

Assumption, you are talking about the "Last Played" section in the Media Selection in the "Teufel Favourites" section . Your title of the issue says so, but in your text you mention "Recently Played"