doOutput($r, "mpdcurrent"); } break; case "getfolderpic": if (!isset($_GET["id"])) { doError("No id specified"); } $folder = getFolderPic($_GET["id"]); header('Content-type:image/png'); echo $folder->picture; break; case "browse-folders": if (!isset($_GET["id"])) { doError("No id specified"); } doOutput(getBrowseFolder(intval($_GET["id"])), "browse-folders"); break; case "browse-artists": if (!isset($_POST["name"])) { doError("No post-name specified"); } doOutput(getBrowseArtist($_POST["name"]), "browse-artists"); break; case "browse-albums": if (!isset($_POST["name"])) { doError("No post-name specified"); } doOutput(getBrowseAlbum($_POST["name"]), "browse-albums"); break; case "browse-playlists": if (!isset($_POST["name"])) {
function doVoteFolder($ip, $id, $vote) { $files = getBrowseFolder(strval($id))["files"]; foreach ($files as $file) { $fid = $file->id; if ($vote) { doVote($ip, $fid, false); } else { doRemoveMyVote($ip, $fid, false); } } }