X-Git-Url: https://git.rvb.name/mpd-web.git/blobdiff_plain/75e2078309389c03d7baa25c2f597b4b42367894..40bb089389b428c836f544e2d94a48dfae415229:/system/mpd_class.php?ds=sidebyside diff --git a/system/mpd_class.php b/system/mpd_class.php index 5cbf0fa..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"); @@ -106,7 +107,7 @@ class mpd { // Misc Other Vars var $mpd_class_version = "1.2"; - var $debugging = TRUE; // Set to TRUE to turn extended debugging on. + var $debugging = FALSE; // Set to TRUE to turn extended debugging on. var $errStr = ""; // Used for maintaining information about the last error message var $command_queue; // The list of commands for bulk command sending @@ -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.