Am at a bit of a loss to understand how the media player interacts with forked-daadp. I want to be able to script a track for playback.
From the api call I can see a track id from api/library/tracks/62 gives me:
{ "id": 62, "title": "Not Over Yet", "title_sort": "Not Over Yet", "artist": "Grace", "artist_sort": "Grace", "album": "Savage Meltdown Vol. 1", "album_sort": "Savage Meltdown Vol. 00001", "album_id": "6123511396315858213", "album_artist": "Gavin Campbell", "album_artist_sort": "Gavin Campbell", "album_artist_id": "1702076477525592772", "genre": "Electronica", "year": 1995, "track_number": 1, "disc_number": 1, "length_ms": 696064, "rating": 0, "play_count": 0, "skip_count": 0, "time_added": "2021-01-31T08:35:59Z", "seek_ms": 0, "type": "m4a", "samplerate": 44100, "bitrate": 275, "channels": 2, "media_kind": "music", "data_kind": "file", "path": "\/music\/itunes music\/Savage Meltdown Vol. 1\/01 Not Over Yet.m4a", "uri": "library:track:62", "artwork_url": "\/artwork\/item\/62" }
I gather the “uri” is used for track selection. Within developer tools / services I call media_payer.pay_media:
entity_id: media_player.forked_daapd_server
media_content_id: 'library:track:62'
media_content_type: music
I’ve tried this with and without “&” in the media_content_id field.
But the track does not play. Looking at the forled-daapd web-ui I see the player goes briefly to “shair” (assume that’s the shairport-sync pipe?). Then it resumes playing the previous track.
I am able to play play lists via the custom:mini-media-player lovelace card, so the connection seems to be working.
What am I missing? Is there another way to play a track? Say with MPD?
Any help appreciated.