Read actual playlist

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
StefWe
Posts: 7
Joined: September 8th, 2018, 8:08 pm

Read actual playlist

Post by StefWe » September 8th, 2018, 8:26 pm

Hello,

i try to build a mpdclient for ubuntu touch. I made my first steps and play, stop or setVolume works.

Now i want to read the actual playlist items. But i have no idea which function i need to call to get this informations.
I use lib version 2.9

I would appreciate any help.

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: Read actual playlist

Post by max » September 9th, 2018, 2:53 pm

mpd_send_list_queue_meta, mpd_recv_entity
Look at the mpc source code for examples.

StefWe
Posts: 7
Joined: September 8th, 2018, 8:08 pm

Re: Read actual playlist

Post by StefWe » September 11th, 2018, 11:00 am

thank you for your fast answer. i will look on the mpc source code

StefWe
Posts: 7
Joined: September 8th, 2018, 8:08 pm

Re: Read actual playlist

Post by StefWe » October 6th, 2018, 11:36 pm

is it correct that in the entity i get with mpd_recv_entity is only the first item? For example a song?
How can i get the rest of the playlist?

thanks for your help.

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: Read actual playlist

Post by max » October 7th, 2018, 8:57 am

Call mpd_recv_entity again until it returns NULL.

StefWe
Posts: 7
Joined: September 8th, 2018, 8:08 pm

Re: Read actual playlist

Post by StefWe » October 18th, 2018, 9:04 pm

Works now! Thank you for this hint!

Post Reply