예제 #1
0
* @author Ross Carlson
* @version 01/25/05
* @since 01/25/05
* @param $node The node we are looking at
*/
global $row_colors, $jzSERVICES, $jzUSER, $lame_opts, $root_dir, $allow_filesystem_modify, $allow_id3_modify, $backend, $short_date;
$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'];