diff --git a/images/add.gif b/images/add.gif
new file mode 100644
index 0000000..44432b9
Binary files /dev/null and b/images/add.gif differ
diff --git a/images/add.png b/images/add.png
new file mode 100644
index 0000000..89f8c11
Binary files /dev/null and b/images/add.png differ
diff --git a/images/addall.gif b/images/addall.gif
new file mode 100644
index 0000000..1b3eada
Binary files /dev/null and b/images/addall.gif differ
diff --git a/images/crumb_trail.gif b/images/crumb_trail.gif
new file mode 100644
index 0000000..f28a198
Binary files /dev/null and b/images/crumb_trail.gif differ
diff --git a/images/del.gif b/images/del.gif
new file mode 100644
index 0000000..ddbfe3c
Binary files /dev/null and b/images/del.gif differ
diff --git a/images/del.png b/images/del.png
new file mode 100644
index 0000000..8fb4a9a
Binary files /dev/null and b/images/del.png differ
diff --git a/images/delall.gif b/images/delall.gif
new file mode 100644
index 0000000..5f9371c
Binary files /dev/null and b/images/delall.gif differ
diff --git a/images/dir.gif b/images/dir.gif
new file mode 100644
index 0000000..47c12fb
Binary files /dev/null and b/images/dir.gif differ
diff --git a/images/home.gif b/images/home.gif
new file mode 100644
index 0000000..f9cfaeb
Binary files /dev/null and b/images/home.gif differ
diff --git a/images/next_button.gif b/images/next_button.gif
new file mode 100644
index 0000000..638f3df
Binary files /dev/null and b/images/next_button.gif differ
diff --git a/images/next_button.png b/images/next_button.png
new file mode 100644
index 0000000..c6a7a28
Binary files /dev/null and b/images/next_button.png differ
diff --git a/images/note.gif b/images/note.gif
new file mode 100644
index 0000000..57336f0
Binary files /dev/null and b/images/note.gif differ
diff --git a/images/pause_button.gif b/images/pause_button.gif
new file mode 100644
index 0000000..c95e508
Binary files /dev/null and b/images/pause_button.gif differ
diff --git a/images/pause_button.png b/images/pause_button.png
new file mode 100644
index 0000000..9568365
Binary files /dev/null and b/images/pause_button.png differ
diff --git a/images/play.gif b/images/play.gif
new file mode 100644
index 0000000..af1ca97
Binary files /dev/null and b/images/play.gif differ
diff --git a/images/play.png b/images/play.png
new file mode 100644
index 0000000..917ddcd
Binary files /dev/null and b/images/play.png differ
diff --git a/images/play_button.gif b/images/play_button.gif
new file mode 100644
index 0000000..8f88e70
Binary files /dev/null and b/images/play_button.gif differ
diff --git a/images/play_button.png b/images/play_button.png
new file mode 100644
index 0000000..84d23c7
Binary files /dev/null and b/images/play_button.png differ
diff --git a/images/playall.gif b/images/playall.gif
new file mode 100644
index 0000000..367185b
Binary files /dev/null and b/images/playall.gif differ
diff --git a/images/prev_button.gif b/images/prev_button.gif
new file mode 100644
index 0000000..c75a0c1
Binary files /dev/null and b/images/prev_button.gif differ
diff --git a/images/prev_button.png b/images/prev_button.png
new file mode 100644
index 0000000..4af01d5
Binary files /dev/null and b/images/prev_button.png differ
diff --git a/images/stop_button.gif b/images/stop_button.gif
new file mode 100644
index 0000000..bf7661c
Binary files /dev/null and b/images/stop_button.gif differ
diff --git a/images/stop_button.png b/images/stop_button.png
new file mode 100644
index 0000000..11886b3
Binary files /dev/null and b/images/stop_button.png differ
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..7a2ca61
--- /dev/null
+++ b/index.php
@@ -0,0 +1,16 @@
+display('default/index.html');
+
+?>
\ No newline at end of file
diff --git a/lib/actions.php b/lib/actions.php
new file mode 100644
index 0000000..b1bd4cf
--- /dev/null
+++ b/lib/actions.php
@@ -0,0 +1,97 @@
+SkipTo($_GET['skipto']);
+ }
+
+ switch($_GET['action']) {
+ case "clear":
+ $mympd->PLClear();
+ break;
+
+ case "remove":
+ $mympd->PLRemove($_GET['id']);
+ break;
+
+ case "fileadd":
+ $mympd->PLAdd($_GET['file']);
+ break;
+
+ case "addall":
+ /* create the array of files for the playlist add */
+ if ($browse == '/') {
+ $browse = '';
+ }
+
+ $browselist = $mympd->GetDir($browse);
+
+ foreach($browselist as $browselist_item) {
+ if ($browselist_item['file']) {
+ $addlist[] = $browselist_item['file'];
+ }
+ }
+
+ $mympd->PLAddBulk($addlist);
+ $page = 'playlist';
+ setcookie('page', $page);
+ header("Location: index.php");
+ break;
+
+ case "playall":
+ $mympd->PLClear();
+ /* create the array of files for the playlist add */
+ if ($browse == '/') {
+ $browse = '';
+ }
+
+ $browselist = $mympd->GetDir($browse);
+
+ foreach($browselist as $browselist_item) {
+ if ($browselist_item['file']) {
+ $addlist[] = $browselist_item['file'];
+ }
+ }
+
+ $mympd->PLAddBulk($addlist);
+ $page = 'control';
+ setcookie('page', $page);
+ $mympd->Play();
+ header("Location: index.php");
+ break;
+
+ case "fileplay":
+ $mympd->PLClear();
+ $mympd->PLAdd($_GET['file']);
+ $page = 'control';
+ setcookie('page', $page);
+ $mympd->Play();
+ header("Location: index.php");
+ break;
+
+ case "play":
+ $mympd->Play();
+ header("Location: index.php");
+ break;
+
+ case "stop":
+ $mympd->Stop();
+ header("Location: index.php");
+ break;
+
+ case "pause":
+ $mympd->Pause();
+ header("Location: index.php");
+ break;
+
+ case "prev":
+ $mympd->Previous();
+ header("Location: index.php");
+ break;
+
+ case "next":
+ $mympd->Next();
+ header("Location: index.php");
+ break;
+ }
+?>
\ No newline at end of file
diff --git a/lib/global.php b/lib/global.php
new file mode 100644
index 0000000..46f7df1
--- /dev/null
+++ b/lib/global.php
@@ -0,0 +1,52 @@
+template_dir = 'templates/';
+ $smarty->compile_dir = 'smarty/templates_c/';
+ $smarty->config_dir = 'smarty/configs/';
+ $smarty->cache_dir = 'smarty/cache/';
+
+ include('lib/mpd.class.php');
+ $mympd = new mpd('localhost',6600);
+
+ if (!$mympd->connected) {
+ echo "
Problem connecting to MPD!
";
+ exit;
+ }
+
+ /* setup some global vars */
+ $smarty->assign('browse_link', 'index.php?page=browse');
+ $smarty->assign('playlist_link', 'index.php?page=playlist');
+ $smarty->assign('browselist_play_link', 'index.php?action=fileplay&file=');
+ $smarty->assign('browselist_add_link', 'index.php?action=fileadd&file=');
+ $smarty->assign('playlist_remove_link', 'index.php?action=remove&id=');
+ $smarty->assign('control_link', 'index.php?page=control');
+ $smarty->assign('playlist_play_link', 'index.php?page=control&action=play&skipto=');
+ $smarty->assign('playlist_clear_link', 'index.php?action=clear');
+
+ /* first check for a page cookie, and default to displaying the playlist */
+ if ($_GET['page']) {
+ $page = $_GET['page'];
+ setcookie('page', $page);
+ }
+ else {
+ $page = $_COOKIE['page'];
+ }
+
+ if (!$page) {
+ $page = 'playlist';
+ }
+
+ /* do the same with the current browse position */
+ if ($_GET['browse']) {
+ $browse = $_GET['browse'];
+ setcookie('browse', $browse);
+ }
+ else {
+ $browse = $_COOKIE['browse'];
+ }
+
+?>
\ No newline at end of file
diff --git a/lib/mpd.class.php b/lib/mpd.class.php
new file mode 100644
index 0000000..4179fdb
--- /dev/null
+++ b/lib/mpd.class.php
@@ -0,0 +1,968 @@
+host = $srv;
+ $this->port = $port;
+ $this->password = $pwd;
+
+ $resp = $this->Connect();
+ if ( is_null($resp) ) {
+ $this->errStr = "Could not connect";
+ return;
+ } else {
+ list ( $this->mpd_version ) = sscanf($resp, MPD_RESPONSE_OK . " MPD %s\n");
+ if ( ! is_null($pwd) ) {
+ if ( is_null($this->SendCommand(MPD_CMD_PASSWORD,$pwd)) ) {
+ $this->connected = FALSE;
+ return; // bad password or command
+ }
+ if ( is_null($this->RefreshInfo()) ) { // no read access -- might as well be disconnected!
+ $this->connected = FALSE;
+ $this->errStr = "Password supplied does not have read access";
+ return;
+ }
+ } else {
+ if ( is_null($this->RefreshInfo()) ) { // no read access -- might as well be disconnected!
+ $this->connected = FALSE;
+ $this->errStr = "Password required to access server";
+ return;
+ }
+ }
+ }
+ }
+
+ /* Connect()
+ *
+ * Connects to the MPD server.
+ *
+ * NOTE: This is called automatically upon object instantiation; you should not need to call this directly.
+ */
+ function Connect() {
+ if ( $this->debugging ) echo "mpd->Connect() / host: ".$this->host.", port: ".$this->port."\n";
+ $this->mpd_sock = fsockopen($this->host,$this->port,$errNo,$errStr,10);
+ if (!$this->mpd_sock) {
+ $this->errStr = "Socket Error: $errStr ($errNo)";
+ return NULL;
+ } else {
+ while(!feof($this->mpd_sock)) {
+ $response = fgets($this->mpd_sock,1024);
+ if (strncmp(MPD_RESPONSE_OK,$response,strlen(MPD_RESPONSE_OK)) == 0) {
+ $this->connected = TRUE;
+ return $response;
+ break;
+ }
+ if (strncmp(MPD_RESPONSE_ERR,$response,strlen(MPD_RESPONSE_ERR)) == 0) {
+ $this->errStr = "Server responded with: $response";
+ return NULL;
+ }
+ }
+ // Generic response
+ $this->errStr = "Connection not available";
+ return NULL;
+ }
+ }
+
+ /* SendCommand()
+ *
+ * Sends a generic command to the MPD server. Several command constants are pre-defined for
+ * use (see MPD_CMD_* constant definitions above).
+ */
+ function SendCommand($cmdStr,$arg1 = "",$arg2 = "") {
+ if ( $this->debugging ) echo "mpd->SendCommand() / cmd: ".$cmdStr.", args: ".$arg1." ".$arg2."\n";
+ if ( ! $this->connected ) {
+ echo "mpd->SendCommand() / Error: Not connected\n";
+ } else {
+ // Clear out the error String
+ $this->errStr = "";
+ $respStr = "";
+
+ // Check the command compatibility:
+ if ( ! $this->_checkCompatibility($cmdStr) ) {
+ return NULL;
+ }
+
+ if (strlen($arg1) > 0) $cmdStr .= " \"$arg1\"";
+ if (strlen($arg2) > 0) $cmdStr .= " \"$arg2\"";
+ fputs($this->mpd_sock,"$cmdStr\n");
+ while(!feof($this->mpd_sock)) {
+ $response = fgets($this->mpd_sock,1024);
+
+ // An OK signals the end of transmission -- we'll ignore it
+ if (strncmp(MPD_RESPONSE_OK,$response,strlen(MPD_RESPONSE_OK)) == 0) {
+ break;
+ }
+
+ // An ERR signals the end of transmission with an error! Let's grab the single-line message.
+ if (strncmp(MPD_RESPONSE_ERR,$response,strlen(MPD_RESPONSE_ERR)) == 0) {
+ list ( $junk, $errTmp ) = split(MPD_RESPONSE_ERR . " ",$response );
+ $this->errStr = strtok($errTmp,"\n");
+ }
+
+ if ( strlen($this->errStr) > 0 ) {
+ return NULL;
+ }
+
+ // Build the response string
+ $respStr .= $response;
+ }
+ if ( $this->debugging ) echo "mpd->SendCommand() / response: '".$respStr."'\n";
+ }
+ return $respStr;
+ }
+
+ /* QueueCommand()
+ *
+ * Queues a generic command for later sending to the MPD server. The CommandQueue can hold
+ * as many commands as needed, and are sent all at once, in the order they are queued, using
+ * the SendCommandQueue() method. The syntax for queueing commands is identical to SendCommand().
+ */
+ function QueueCommand($cmdStr,$arg1 = "",$arg2 = "") {
+ if ( $this->debugging ) echo "mpd->QueueCommand() / cmd: ".$cmdStr.", args: ".$arg1." ".$arg2."\n";
+ if ( ! $this->connected ) {
+ echo "mpd->QueueCommand() / Error: Not connected\n";
+ return NULL;
+ } else {
+ if ( strlen($this->command_queue) == 0 ) {
+ $this->command_queue = MPD_CMD_START_BULK . "\n";
+ }
+ if (strlen($arg1) > 0) $cmdStr .= " \"$arg1\"";
+ if (strlen($arg2) > 0) $cmdStr .= " \"$arg2\"";
+
+ $this->command_queue .= $cmdStr ."\n";
+
+ if ( $this->debugging ) echo "mpd->QueueCommand() / return\n";
+ }
+ return TRUE;
+ }
+
+ /* SendCommandQueue()
+ *
+ * Sends all commands in the Command Queue to the MPD server. See also QueueCommand().
+ */
+ function SendCommandQueue() {
+ if ( $this->debugging ) echo "mpd->SendCommandQueue()\n";
+ if ( ! $this->connected ) {
+ echo "mpd->SendCommandQueue() / Error: Not connected\n";
+ return NULL;
+ } else {
+ $this->command_queue .= MPD_CMD_END_BULK . "\n";
+ if ( is_null($respStr = $this->SendCommand($this->command_queue)) ) {
+ return NULL;
+ } else {
+ $this->command_queue = NULL;
+ if ( $this->debugging ) echo "mpd->SendCommandQueue() / response: '".$respStr."'\n";
+ }
+ }
+ return $respStr;
+ }
+
+ /* AdjustVolume()
+ *
+ * Adjusts the mixer volume on the MPD by , which can be a positive (volume increase),
+ * or negative (volume decrease) value.
+ */
+ function AdjustVolume($modifier) {
+ if ( $this->debugging ) echo "mpd->AdjustVolume()\n";
+ if ( ! is_numeric($modifier) ) {
+ $this->errStr = "AdjustVolume() : argument 1 must be a numeric value";
+ return NULL;
+ }
+
+ $this->RefreshInfo();
+ $newVol = $this->volume + $modifier;
+ $ret = $this->SetVolume($newVol);
+
+ if ( $this->debugging ) echo "mpd->AdjustVolume() / return\n";
+ return $ret;
+ }
+
+ /* SetVolume()
+ *
+ * Sets the mixer volume to , which should be between 1 - 100.
+ */
+ function SetVolume($newVol) {
+ if ( $this->debugging ) echo "mpd->SetVolume()\n";
+ if ( ! is_numeric($newVol) ) {
+ $this->errStr = "SetVolume() : argument 1 must be a numeric value";
+ return NULL;
+ }
+
+ // Forcibly prevent out of range errors
+ if ( $newVol < 0 ) $newVol = 0;
+ if ( $newVol > 100 ) $newVol = 100;
+
+ // If we're not compatible with SETVOL, we'll try adjusting using VOLUME
+ if ( $this->_checkCompatibility(MPD_CMD_SETVOL) ) {
+ if ( ! is_null($ret = $this->SendCommand(MPD_CMD_SETVOL,$newVol))) $this->volume = $newVol;
+ } else {
+ $this->RefreshInfo(); // Get the latest volume
+ if ( is_null($this->volume) ) {
+ return NULL;
+ } else {
+ $modifier = ( $newVol - $this->volume );
+ if ( ! is_null($ret = $this->SendCommand(MPD_CMD_VOLUME,$modifier))) $this->volume = $newVol;
+ }
+ }
+
+ if ( $this->debugging ) echo "mpd->SetVolume() / return\n";
+ return $ret;
+ }
+
+ /* GetDir()
+ *
+ * Retrieves a database directory listing of the directory and places the results into
+ * a multidimensional array. If no directory is specified, the directory listing is at the
+ * base of the MPD music path.
+ */
+ function GetDir($dir = "") {
+ if ( $this->debugging ) echo "mpd->GetDir()\n";
+ $resp = $this->SendCommand(MPD_CMD_LSDIR,$dir);
+ $dirlist = $this->_parseFileListResponse($resp);
+ if ( $this->debugging ) echo "mpd->GetDir() / return ".print_r($dirlist)."\n";
+ return $dirlist;
+ }
+
+ /* PLAdd()
+ *
+ * Adds each track listed in a single-dimensional , which contains filenames
+ * of tracks to add, to the end of the playlist. This is used to add many, many tracks to
+ * the playlist in one swoop.
+ */
+ function PLAddBulk($trackArray) {
+ if ( $this->debugging ) echo "mpd->PLAddBulk()\n";
+ $num_files = count($trackArray);
+ for ( $i = 0; $i < $num_files; $i++ ) {
+ $this->QueueCommand(MPD_CMD_PLADD,$trackArray[$i]);
+ }
+ $resp = $this->SendCommandQueue();
+ $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLAddBulk() / return\n";
+ return $resp;
+ }
+
+ /* PLAdd()
+ *
+ * Adds the file to the end of the playlist. must be a track in the MPD database.
+ */
+ function PLAdd($fileName) {
+ if ( $this->debugging ) echo "mpd->PLAdd()\n";
+ if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLADD,$fileName))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLAdd() / return\n";
+ return $resp;
+ }
+
+ /* PLMoveTrack()
+ *
+ * Moves track number to position in the playlist. This is used to reorder
+ * the songs in the playlist.
+ */
+ function PLMoveTrack($origPos, $newPos) {
+ if ( $this->debugging ) echo "mpd->PLMoveTrack()\n";
+ if ( ! is_numeric($origPos) ) {
+ $this->errStr = "PLMoveTrack(): argument 1 must be numeric";
+ return NULL;
+ }
+ if ( $origPos < 0 or $origPos > $this->playlist_count ) {
+ $this->errStr = "PLMoveTrack(): argument 1 out of range";
+ return NULL;
+ }
+ if ( $newPos < 0 ) $newPos = 0;
+ if ( $newPos > $this->playlist_count ) $newPos = $this->playlist_count;
+
+ if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLMOVETRACK,$origPos,$newPos))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLMoveTrack() / return\n";
+ return $resp;
+ }
+
+ /* PLShuffle()
+ *
+ * Randomly reorders the songs in the playlist.
+ */
+ function PLShuffle() {
+ if ( $this->debugging ) echo "mpd->PLShuffle()\n";
+ if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLSHUFFLE))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLShuffle() / return\n";
+ return $resp;
+ }
+
+ /* PLLoad()
+ *
+ * Retrieves the playlist from .m3u and loads it into the current playlist.
+ */
+ function PLLoad($file) {
+ if ( $this->debugging ) echo "mpd->PLLoad()\n";
+ if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLLOAD,$file))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLLoad() / return\n";
+ return $resp;
+ }
+
+ /* PLSave()
+ *
+ * Saves the playlist to .m3u for later retrieval. The file is saved in the MPD playlist
+ * directory.
+ */
+ function PLSave($file) {
+ if ( $this->debugging ) echo "mpd->PLSave()\n";
+ $resp = $this->SendCommand(MPD_CMD_PLSAVE,$file);
+ if ( $this->debugging ) echo "mpd->PLSave() / return\n";
+ return $resp;
+ }
+
+ /* PLClear()
+ *
+ * Empties the playlist.
+ */
+ function PLClear() {
+ if ( $this->debugging ) echo "mpd->PLClear()\n";
+ if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLCLEAR))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLClear() / return\n";
+ return $resp;
+ }
+
+ /* PLRemove()
+ *
+ * Removes track from the playlist.
+ */
+ function PLRemove($id) {
+ if ( $this->debugging ) echo "mpd->PLRemove()\n";
+ if ( ! is_numeric($id) ) {
+ $this->errStr = "PLRemove() : argument 1 must be a numeric value";
+ return NULL;
+ }
+ if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLREMOVE,$id))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->PLRemove() / return\n";
+ return $resp;
+ }
+
+ /* SetRepeat()
+ *
+ * Enables 'loop' mode -- tells MPD continually loop the playlist. The parameter
+ * is either 1 (on) or 0 (off).
+ */
+ function SetRepeat($repVal) {
+ if ( $this->debugging ) echo "mpd->SetRepeat()\n";
+ $rpt = $this->SendCommand(MPD_CMD_REPEAT,$repVal);
+ $this->repeat = $repVal;
+ if ( $this->debugging ) echo "mpd->SetRepeat() / return\n";
+ return $rpt;
+ }
+
+ /* SetRandom()
+ *
+ * Enables 'randomize' mode -- tells MPD to play songs in the playlist in random order. The
+ * parameter is either 1 (on) or 0 (off).
+ */
+ function SetRandom($rndVal) {
+ if ( $this->debugging ) echo "mpd->SetRandom()\n";
+ $resp = $this->SendCommand(MPD_CMD_RANDOM,$rndVal);
+ $this->random = $rndVal;
+ if ( $this->debugging ) echo "mpd->SetRandom() / return\n";
+ return $resp;
+ }
+
+ /* Shutdown()
+ *
+ * Shuts down the MPD server (aka sends the KILL command). This closes the current connection,
+ * and prevents future communication with the server.
+ */
+ function Shutdown() {
+ if ( $this->debugging ) echo "mpd->Shutdown()\n";
+ $resp = $this->SendCommand(MPD_CMD_SHUTDOWN);
+
+ $this->connected = FALSE;
+ unset($this->mpd_version);
+ unset($this->errStr);
+ unset($this->mpd_sock);
+
+ if ( $this->debugging ) echo "mpd->Shutdown() / return\n";
+ return $resp;
+ }
+
+ /* DBRefresh()
+ *
+ * Tells MPD to rescan the music directory for new tracks, and to refresh the Database. Tracks
+ * cannot be played unless they are in the MPD database.
+ */
+ function DBRefresh() {
+ if ( $this->debugging ) echo "mpd->DBRefresh()\n";
+ $resp = $this->SendCommand(MPD_CMD_REFRESH);
+
+ // Update local variables
+ $this->RefreshInfo();
+
+ if ( $this->debugging ) echo "mpd->DBRefresh() / return\n";
+ return $resp;
+ }
+
+ /* Play()
+ *
+ * Begins playing the songs in the MPD playlist.
+ */
+ function Play() {
+ if ( $this->debugging ) echo "mpd->Play()\n";
+ if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PLAY) )) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->Play() / return\n";
+ return $rpt;
+ }
+
+ /* Stop()
+ *
+ * Stops playing the MPD.
+ */
+ function Stop() {
+ if ( $this->debugging ) echo "mpd->Stop()\n";
+ if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_STOP) )) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->Stop() / return\n";
+ return $rpt;
+ }
+
+ /* Pause()
+ *
+ * Toggles pausing on the MPD. Calling it once will pause the player, calling it again
+ * will unpause.
+ */
+ function Pause() {
+ if ( $this->debugging ) echo "mpd->Pause()\n";
+ if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PAUSE) )) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->Pause() / return\n";
+ return $rpt;
+ }
+
+ /* SeekTo()
+ *
+ * Skips directly to the song in the MPD playlist.
+ */
+ function SkipTo($idx) {
+ if ( $this->debugging ) echo "mpd->SkipTo()\n";
+ if ( ! is_numeric($idx) ) {
+ $this->errStr = "SkipTo() : argument 1 must be a numeric value";
+ return NULL;
+ }
+ if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PLAY,$idx))) $this->RefreshInfo();
+ if ( $this->debugging ) echo "mpd->SkipTo() / return\n";
+ return $idx;
+ }
+
+ /* SeekTo()
+ *
+ * Skips directly to a given position within a track in the MPD playlist. The argument,
+ * given in seconds, is the track position to locate. The