Look up a song in MPD's database by song ID

695 Views Asked by At

I'm specifically using python-mpd2, but I can also accept answers in raw MPD command form.

Given only the song's ID in the database (such as "8231"), what is the correct way to query MPD's database to look up that song? mpdcli.find("any", "8231") (translates to find any 8231) returned no results, and I can't find anything in the documentation.

The only solution I can think of is maintaining a copy of the database within the client, which I do not want to do, hopefully for obvious reasons.

I'm aware of the existence of currentsong but it's not suitable (I need to look up songs that aren't currently playing, by ID).

1

There are 1 best solutions below

0
On

playlistid {SONGID}

Displays a list of songs in the playlist. SONGID is optional and specifies a single song to display info for.

From here https://www.musicpd.org/doc/protocol/queue.html