1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

Transcoding/streaming cleanup.

Derive our new filesize from the length, not the previous bitrate and
size.  Allow higher bitrates than the source when they're different
formats.  Return HTTP error codes when an error occurs.  Minor cleanup.
This commit is contained in:
Paul Arthur 2011-04-08 23:15:33 -04:00
parent 4aa256cb07
commit f7c1e57cf0
4 changed files with 144 additions and 137 deletions

View file

@ -103,10 +103,11 @@ if (!function_exists('ngettext')) {
* access_denied
* Throws an error if they try to do something that they aren't allowed to.
*/
function access_denied() {
function access_denied($error = "Access Denied") {
// Clear any crap we've got up top
ob_end_clean();
header("HTTP/1.1 403 $error");
require_once Config::get('prefix') . '/templates/show_denied.inc.php';
exit;