X-Git-Url: https://git.rvb.name/mpd-web.git/blobdiff_plain/585224f5dbe2565ed04c97b054e8d8354c21dc5e..40bb089389b428c836f544e2d94a48dfae415229:/system/mpd_class.php?ds=inline diff --git a/system/mpd_class.php b/system/mpd_class.php index 38769e3..d32748d 100644 --- a/system/mpd_class.php +++ b/system/mpd_class.php @@ -52,6 +52,7 @@ define("MPD_CMD_PLMOVETRACK", "move"); define("MPD_CMD_PASSWORD", "password"); define("MPD_CMD_TABLE", "list"); define("MPD_CMD_LISTS", "listplaylists"); +define("MPD_CMD_DELLIST", "rm"); // Predefined MPD Response messages define("MPD_RESPONSE_ERR", "ACK"); @@ -441,6 +442,17 @@ class mpd { return $resp; } + /* PLDel() + * + * Deletes playlist .m3u in the MPD playlist directory. + */ + function PLDel($file) { + if ( $this->debugging ) echo "mpd->PLDel()\n"; + $resp = $this->SendCommand(MPD_CMD_DELLIST,$file); + if ( $this->debugging ) echo "mpd->PLDel() / return\n"; + return $resp; + } + /* PLClear() * * Empties the playlist.