$artist = $album->getNaturalParent("artist"); $desc = $album->getDescription(); while (substr($desc, 0, 4) == "<br>" or substr($desc, 0, 6) == "<br />") { if (substr($desc, 0, 4) == "<br>") { $desc = substr($desc, 5); } if (substr($desc, 0, 6) == "<br />") { $desc = substr($desc, 7); } } // Now let's get the art $art = $album->getMainArt("200x200"); if ($art != "") { $albumArt = $display->returnImage($art, $album->getName(), 150, 150, "limit", false, false, "left", "3", "3"); } else { $art = $jzSERVICES->createImage($web_root . $root_dir . '/style/images/default.jpg', "200x200", $track->getName(), "audio", "true"); $albumArt = '<img src="' . $this_site . $root_dir . "/" . $art . '" border="0" align="left" hspace="3" vspace="3">'; } // Now let's setup Smarty $smarty = smartySetup(); // Let's setup the Smarty variables $smarty->assign('trackName', $track->getName()); $smarty->assign('albumName', $album->getName()); $smarty->assign('artistName', $artist->getName()); $smarty->assign('albumArt', $albumArt); $smarty->assign('lyrics', $meta['lyrics']); $smarty->assign('trackNum', $meta['number']); $smarty->assign('albumDesc', $desc); $smarty->assign('totalTracks', $_GET['totalTracks']); // Now let's display the template $smarty->display(SMARTY_ROOT . 'templates/general/asx-display.tpl');
$track = new jzMediaTrack($_GET['jz_path']); // Ok, now we need to see if they did something with this form if (isset($_POST['justclose'])) { $this->closeWindow(false); } if (isset($_POST['closeupdate']) or isset($_POST['updatedata'])) { // Ok, they are updating this track so let's do it // Let's create our object so we can get the full path and meta $track = new jzMediaTrack($_GET['jz_path']); $fname = $track->getDataPath("String"); if ($allow_id3_modify == "true") { $fileAvailable = @fopen($fname, 'r+'); if (!$fileAvailable) { $writeback_message = word("Could not write to file %s. This track's ID3 tag has not been modified.'", $fname); } else { $writeback_message = word("Metadata for %s has been stored in Jinzora and this file's ID3 tag.'", $track->getName()); } } else { $writeback_message = word("Metadata for %s has been updated in Jinzora. To update ID3 tags, please enable \$allow_id3_modify.", $track->getName()); } $meta = $track->getMeta(); // Now we need to set the meta we want to rewrite $meta['title'] = $_POST['edit_title']; $meta['artist'] = $_POST['edit_artist']; $meta['album'] = $_POST['edit_album']; $meta['number'] = $_POST['edit_number']; $meta['genre'] = $_POST['edit_genre']; $meta['comment'] = $_POST['edit_comment']; $meta['lyrics'] = $_POST['edit_lyrics']; // Now let's write this $track->setMeta($meta);
/** * Gets the track title from * its ID. */ function idToName($id) { $track = new jzMediaTrack($id, 'id'); $meta = $track->getMeta(); $title = ''; if (!isNothing($meta['artist'])) { $title .= $meta['artist']; } if (!isNothing($meta['title'])) { if (!isNothing($title)) { $title .= ' - '; } $title .= $meta['title']; } if (isNothing($title)) { $title = $track->getName(); } return $title; }
/** * Returns the currently playing playlist * * @author Ross Carlson * @version 2/9/05 * @since 2/9/05 * @param return Returns the currently playling playlist */ function getCurPlaylist() { global $jbArr; $val = array(); if (isset($jbArr[$_SESSION['jb_id']]['prefix']) && $jbArr[$_SESSION['jb_id']]['prefix'] == "http") { $arr = httpqRequest('getplaylistfile', array('delim' => ';;;')); $arr = explode(';;;', $arr); foreach ($arr as $i => $url) { if (false != ($id = getTrackIdFromURL($url))) { $track = new jzMediaTrack($id, 'id'); $meta = $track->getMeta(); $title = ''; if (!isNothing($meta['artist'])) { $title .= $meta['artist']; } if (!isNothing($meta['title'])) { if (!isNothing($title)) { $title .= ' - '; } $title .= $meta['title']; } if (isNothing($title)) { $title = $track->getName(); } $val[] = $title; } else { // $val[] = $url; // faster $val[] = httpqRequest('getplaylisttitle', array('index' => $i)); // better } } } else { $val = explode(";;;", @file_get_contents("http://" . $jbArr[$_SESSION['jb_id']]['server'] . ":" . $jbArr[$_SESSION['jb_id']]['port'] . "/getplaylisttitle?p=" . $jbArr[$_SESSION['jb_id']]['password'] . "&delim=;;;")); } writeLogData("messages", "Winamp3: Returning the current playlist"); return $val; }