summaryrefslogtreecommitdiffstats
path: root/play/index.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-14 01:38:50 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-14 01:38:50 +0000
commitd7c3ede9e757dab9889503a415d78c7937a311b3 (patch)
tree4311b7aac78600968bdb151c6873eaca80caee5f /play/index.php
parentfda4bd6deb683fc937f1ae831d9c8ed5b4748eaf (diff)
downloadampache-d7c3ede9e757dab9889503a415d78c7937a311b3.tar.gz
ampache-d7c3ede9e757dab9889503a415d78c7937a311b3.tar.bz2
ampache-d7c3ede9e757dab9889503a415d78c7937a311b3.zip
fixed public/private aspect of playlists, default is to filter out non-owned private playlists now
Diffstat (limited to 'play/index.php')
-rw-r--r--play/index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/play/index.php b/play/index.php
index ff1be7e0..b1e2b3f4 100644
--- a/play/index.php
+++ b/play/index.php
@@ -251,6 +251,8 @@ if (($GLOBALS['user']->prefs['transcode'] == 'always' || !$song->native_stream()
debug_event('downsample','Starting Downsample...','5');
$fp = Stream::start_downsample($song,$lastid,$song_name,$start);
$song_name = $song->f_artist_full . " - " . $song->title . "." . $song->type;
+ // Note that this is downsampling
+ $downsampled_song = true;
} // end if downsampling
else {
// Send file, possible at a byte offset
@@ -278,7 +280,9 @@ if (isset($start)) {
debug_event('seek','Content-Range header recieved, skipping ahead ' . $start . ' bytes out of ' . $song->size,'5');
$browser->downloadHeaders($song_name, $song->mime, false, $song->size);
- fseek( $fp, $start );
+ if (!$downsampled_song) {
+ fseek( $fp, $start );
+ }
$range = $start ."-". $end . "/" . $song->size;
header("HTTP/1.1 206 Partial Content");
header("Content-Range: bytes $range");