Read media metadata from player current media in Music Assistant (#175465)

Co-authored-by: Artur Pragacz <artur@pragacz.com>
This commit is contained in:
Marvin Schenkel
2026-08-21 17:06:08 +02:00
committed by GitHub
co-authored by Artur Pragacz
parent 5a754a1e08
commit 0be0fc24ed
3 changed files with 49 additions and 103 deletions
@@ -374,16 +374,19 @@
"active_source": "test_group_player_1",
"active_group": null,
"current_media": {
"uri": "http://192.168.1.1:8097/single/test_group_player_1/5d95dc5be77e4f7eb4939f62cfef527b.flac?ts=1730313038",
"media_type": "unknown",
"title": null,
"artist": null,
"album": null,
"uri": "spotify://track/3YRCqOhFifThpSRFJ1VWFM",
"media_type": "track",
"title": "November Rain",
"artist": "Guns N' Roses",
"album": "Use Your Illusion I",
"album_artist": "Guns N' Roses",
"image_url": null,
"duration": null,
"duration": 536,
"queue_id": "test_group_player_1",
"queue_item_id": "5d95dc5be77e4f7eb4939f62cfef527b",
"custom_data": null
"custom_data": null,
"elapsed_time": 232,
"elapsed_time_last_updated": 1730313109.5659513
},
"synced_to": null,
"enabled_by_default": true,
@@ -55,7 +55,6 @@
<MediaPlayerEntityStateAttribute.MEDIA_CONTENT_ID: 'media_content_id'>: 'spotify://track/5d95dc5be77e4f7eb4939f62cfef527b',
<MediaPlayerEntityStateAttribute.MEDIA_CONTENT_TYPE: 'media_content_type'>: <MediaType.MUSIC: 'music'>,
<MediaPlayerEntityStateAttribute.MEDIA_DURATION: 'media_duration'>: 300,
<MediaPlayerEntityStateAttribute.MEDIA_POSITION: 'media_position'>: 0,
<MediaPlayerEntityStateAttribute.MEDIA_TITLE: 'media_title'>: 'Test Track',
<MediaPlayerEntityStateAttribute.INPUT_SOURCE: 'source'>: 'Spotify Connect',
<EntityStateAttribute.SUPPORTED_FEATURES: 'supported_features'>: <MediaPlayerEntityFeature: 8320959>,
@@ -122,6 +121,7 @@
<EntityStateAttribute.ICON: 'icon'>: 'mdi:speaker-multiple',
<MediaPlayerEntityStateAttribute.MEDIA_VOLUME_MUTED: 'is_volume_muted'>: False,
'mass_player_type': 'group',
<MediaPlayerEntityStateAttribute.MEDIA_ALBUM_ARTIST: 'media_album_artist'>: "Guns N' Roses",
<MediaPlayerEntityStateAttribute.MEDIA_ALBUM_NAME: 'media_album_name'>: 'Use Your Illusion I',
<MediaPlayerEntityStateAttribute.MEDIA_ARTIST: 'media_artist'>: "Guns N' Roses",
<MediaPlayerEntityStateAttribute.MEDIA_CONTENT_ID: 'media_content_id'>: 'spotify://track/3YRCqOhFifThpSRFJ1VWFM',