Hi!

if a special playlist named "Radio" is called by a MPD client, the MPD
server should (before loading the special playlist into queue) save the
current queue as a playlist named "Default".

Background: http://musicpd.org/mantis/view.php?id=3134

For that i patched the src file playlist_queue.c. I can save a empty
playlist and can clear the playlist, but how to save the actual queue to
the playlist in src file playlist_queue.c? Especially i don't know how
to get access to the queue.
A example is very appreciated.



enum playlist_result
playlist_open_into_queue(const char *uri,
                         struct playlist *dest, struct player_control *pc,
                         bool secure)
{
        if  (strcmp(uri, "Radio") == 0) {
        spl_clear("Default"); /* clear the old playlist */

        /* loop ? */
        spl_append_uri(song_get_uri(queue_get(&g_playlist->queue, i)),
"Default");  /* doesnt work */
}

...

Many thanks.

Markus
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to