diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-19 07:34:11 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-19 07:34:11 +0000 |
commit | d560bb1c7b7e675ad72af0731df18757bf9d5700 (patch) | |
tree | 75bb0a543caecb8779280aadb84cf47c8066f94c /lib | |
parent | f92b79ec098ad56690dce0c615a25dcac3955fba (diff) | |
download | ampache-d560bb1c7b7e675ad72af0731df18757bf9d5700.tar.gz ampache-d560bb1c7b7e675ad72af0731df18757bf9d5700.tar.bz2 ampache-d560bb1c7b7e675ad72af0731df18757bf9d5700.zip |
fixed single downloads and that annoying minor css issue with albums of the moment
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/stream.class.php | 21 | ||||
-rw-r--r-- | lib/init.php | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index d13271dd..3f1b4166 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -468,6 +468,27 @@ class Stream { } // create_democratic /** + * create_download + * This prompts for a download of the song, only a single + * element can by in song_ids + */ + private function create_download() { + + // Build up our object + $song_id = $this->songs['0']; + $song = new Song($song_id); + $url = $song->get_url($this->session); + + // Append the fact we are downloading + $url .= '&action=download'; + + // Header redirect baby! + header("Location: $url"); + exit; + + } //create_download + + /** * create_ram *this functions creates a RAM file for use by Real Player */ diff --git a/lib/init.php b/lib/init.php index fdbabe45..147d2581 100644 --- a/lib/init.php +++ b/lib/init.php @@ -23,6 +23,10 @@ * DO NOT EDIT THIS FILE ***/ +// Use output buffering, this gains us a few things and +// fixes some CSS issues +ob_start(); + // Set the Error level manualy... I'm to lazy to fix notices error_reporting(E_ALL ^ E_NOTICE); |