summaryrefslogtreecommitdiffstats
path: root/play
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2011-10-27 21:07:54 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2011-10-27 21:07:54 -0400
commita3a087e4043c64349cad9ea52dffce7a964a5656 (patch)
treecf40d043cd7fd4f92922907f0462c1da710fc7eb /play
parent051805530981acf9ce5e380b790adbb02a234152 (diff)
downloadampache-a3a087e4043c64349cad9ea52dffce7a964a5656.tar.gz
ampache-a3a087e4043c64349cad9ea52dffce7a964a5656.tar.bz2
ampache-a3a087e4043c64349cad9ea52dffce7a964a5656.zip
Update Horde_Browser to latest.
Diffstat (limited to 'play')
-rw-r--r--play/index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/play/index.php b/play/index.php
index 8e41cbc5..506af18f 100644
--- a/play/index.php
+++ b/play/index.php
@@ -244,6 +244,10 @@ ignore_user_abort(true);
// Format the song name
$media_name = $media->f_artist_full . " - " . $media->title . "." . $media->type;
+
+// Generate browser class for sending headers
+$browser = new Horde_Browser();
+
/* If they are just trying to download make sure they have rights
* and then present them with the download file
*/
@@ -253,9 +257,7 @@ if ($_GET['action'] == 'download' AND Config::get('download')) {
$media->format_pattern();
$media_name = str_replace(array('?','/','\\'),"_",$media->f_file);
- // Use Horde's Browser class to send the headers
header("Content-Length: " . $media->size);
- $browser = new Browser();
$browser->downloadHeaders($media_name,$media->mime,false,$media->size);
$fp = fopen($media->file,'rb');
$bytesStreamed = 0;
@@ -289,8 +291,6 @@ if ($_GET['action'] == 'download' AND Config::get('download')) {
} // if they are trying to download and they can
-// Generate browser class for sending headers
-$browser = new Browser();
header("Accept-Ranges: bytes" );
// Prevent the script from timing out