Удаление списков.
[mpd-web.git] / system / mpd_class.php
index 38769e38a5297b82e80a3824020e2c8bc6a203b2..d32748d69ee16278d27e806a3d9d182a6ecdeb12 100644 (file)
@@ -52,6 +52,7 @@ define("MPD_CMD_PLMOVETRACK", "move");
 define("MPD_CMD_PASSWORD",    "password");\r
 define("MPD_CMD_TABLE",       "list");\r
 define("MPD_CMD_LISTS",       "listplaylists");\r
+define("MPD_CMD_DELLIST",     "rm");\r
 \r
 // Predefined MPD Response messages\r
 define("MPD_RESPONSE_ERR", "ACK");\r
@@ -441,6 +442,17 @@ class mpd {
                return $resp;\r
        }\r
 \r
+       /* PLDel() \r
+        * \r
+        * Deletes playlist  <file>.m3u in the MPD playlist directory.\r
+        */\r
+       function PLDel($file) {\r
+               if ( $this->debugging ) echo "mpd->PLDel()\n";\r
+               $resp = $this->SendCommand(MPD_CMD_DELLIST,$file);\r
+               if ( $this->debugging ) echo "mpd->PLDel() / return\n";\r
+               return $resp;\r
+       }\r
+\r
        /* PLClear() \r
         * \r
         * Empties the playlist.\r