Beispiel #1
0
     if (!isset($_POST["name"])) {
         doError("No post-name specified");
     }
     doOutput(getBrowsePlaylist($_POST["name"]), "browse-playlists");
     break;
 case "browse-often-playlists":
     doOutput(getBrowseOftenPlaylist(), "browse-often-playlists");
     break;
 case "browse-often-played":
     doOutput(getBrowseOftenPlayed(), "browse-often-played");
     break;
 case "browse-often-votes":
     doOutput(getBrowseOftenVote(), "browse-often-votes");
     break;
 case "browse-playlog":
     doOutput(getBrowsePlaylog(), "browse-playlog");
     break;
 case "vote-skip-check":
     doOutput(getVoteSkipCheck(), "vote-skip-check");
     break;
 case "vote-skip-action":
     doOutput(getVoteSkipAction(), "vote-skip-action");
     break;
 case "upload-file":
     doUploadFile();
     break;
 case "download-file":
     doOutput(doDownloadFilelist(), "download-file");
     break;
 case "download-file-do":
     if (!isset($_GET["id"])) {
Beispiel #2
0
function doDownloadFilelist()
{
    $z = getMpdCurrentSong();
    if ($z["state"] != "play" || !isset($z["fileinfos"])) {
        $z = array();
    } else {
        $z = array($z["fileinfos"]);
    }
    $a = array();
    $b = array();
    $c = array();
    $d = array();
    $already = array();
    foreach ($z as $item) {
        if (!in_array($item->id, $already)) {
            $a[] = $item;
            $already[] = $item->id;
        }
    }
    foreach (doGetmyvotes() as $item) {
        if (!in_array($item->id, $already)) {
            $b[] = $item;
            $already[] = $item->id;
        }
    }
    foreach (doShowhighscore() as $item) {
        if (!in_array($item->id, $already)) {
            $c[] = $item;
            $already[] = $item->id;
        }
    }
    foreach (getBrowsePlaylog(10)["files"] as $item) {
        if (!in_array($item->id, $already)) {
            $d[] = $item;
            $already[] = $item->id;
        }
    }
    return array("a" => $a, "b" => $b, "c" => $c, "d" => $d);
}