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

Show media player artist/album more often #2493

Merged
merged 1 commit into from
Apr 30, 2022

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Apr 30, 2022

Summary

I recently noticed that the media widget didn't show any details for me when playing a podcast. Turns out that the app I used doesn't set the media_artist, but it does set the media_album_artist. This PR adjusts the media widget to show media labels more often:

  • if media_artist isn't set, use media_album_artist if present for the artist
  • if no artist is set but media_album_name is set, show only the album name for the 'artist' slot

Screenshots

Example media_player entity state while playing (only relevant attributes shown):

media_title: 453- The Book of Tasty and Healthy Food
media_album_name: 99% Invisible
media_album_artist: Roman Mars
entity_picture: [url]

Will result in the following widgets, top version 2022.3.0-full, bottom with PR:

Light Dark
Two media player widgets, the top one shows a picture for the media and 'Widget label', the bottom one also shows a picture for the media but includes labels '453- The Book of Tasty and' and 'Roman Mars - 99% Invisible', light mode Two media player widgets, the top one shows a picture for the media and 'Widget label', the bottom one also shows a picture for the media but includes labels '453- The Book of Tasty and' and 'Roman Mars - 99% Invisible', dark mode

Link to pull request in Documentation repository

n/a

Any other notes

 - Also show media player artist if there is only an album artist
 - Also show media player album if there is no artist known
@JBassett JBassett merged commit d6add75 into home-assistant:master Apr 30, 2022
@jpelgrom jpelgrom deleted the media-widget-album-only branch April 30, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants