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

When searching for an artist, no results are returned #279

Closed
pathofleastresistor opened this issue Dec 23, 2023 · 3 comments
Closed

When searching for an artist, no results are returned #279

pathofleastresistor opened this issue Dec 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@pathofleastresistor
Copy link
Contributor

pathofleastresistor commented Dec 23, 2023

Describe the bug
When searching for an artist, no results are returned.

Version
20231128.01

To Reproduce
Steps to reproduce the behavior:

  1. Make a search service call where the query is an artist name (i.e. Mariah Carey). Do not set the filter value.
  2. Go to search results in media browser
  3. See "unknown error"
  4. See error in logs

Additional context

2023-12-22 23:30:30.595 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140438861172416] Error handling message: Unknown error (unknown_error) Amit from 192.168.50.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/media_player/__init__.py", line 1233, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ytube_music_player/media_player.py", line 1979, in async_browse_media
    response = await build_item_response(self, payload)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ytube_music_player/browse_media.py", line 392, in build_item_response
    title = helper.get(a['resultType'], "") + a['artist'], # noqa: E251
                                              ~^^^^^^^^^^
KeyError: 'artist'

Thanks

@pathofleastresistor pathofleastresistor added the bug Something isn't working label Dec 23, 2023
@pathofleastresistor
Copy link
Contributor Author

#282

@KoljaWindeler
Copy link
Owner

So this one is fixed by merge 282 right?

@pathofleastresistor
Copy link
Contributor Author

Yeah - it should be but I don't have an exhaustive list of categories to test against. But I'm happy to make another pull request if I find more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants