astrXbian/www/jukebox/browser/backends/getBeetsInfo.php

15 lines
402 B
PHP

<?php
chdir('../..');
include ("includes/vars.php");
include ("includes/functions.php");
$uri = rawurldecode($_REQUEST['uri']);
$uri = 'http://'.$prefs['beets_server_location'].'/item/'.$uri;
logger::log("GETBEETSINFO", "Getting",$uri);
$d = new url_downloader(array('url' => $uri));
if ($d->get_data_to_string()) {
print $d->get_data();
} else {
header("HTTP/1.1 404 Not Found");
}
?>