diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-02-29 06:14:46 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-02-29 06:14:46 +0000 |
commit | 2c337852cff31297d681fb87d3098cc3d9041101 (patch) | |
tree | 9853ce94387c4cc7756575598dfb1e2de44a8589 /play | |
parent | c1f2b35e2a18b0752746f5db5794cf18714bc71d (diff) | |
download | ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.gz ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.bz2 ampache-2c337852cff31297d681fb87d3098cc3d9041101.zip |
major corrections to reading of preferences and a few misc fixes which I have now forgotten
Diffstat (limited to 'play')
-rw-r--r-- | play/index.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/play/index.php b/play/index.php index b1e2b3f4..2750cec5 100644 --- a/play/index.php +++ b/play/index.php @@ -181,7 +181,7 @@ $song_name = $song->f_artist_full . " - " . $song->title . "." . $song->type; /* If they are just trying to download make sure they have rights * and then present them with the download file */ -if ($_GET['action'] == 'download' AND $GLOBALS['user']->prefs['download']) { +if ($_GET['action'] == 'download' AND Config::get('download')) { // STUPID IE $song->format_pattern(); @@ -199,9 +199,9 @@ if ($_GET['action'] == 'download' AND $GLOBALS['user']->prefs['download']) { } // Check to see if we should be throttling because we can get away with it - if ($GLOBALS['user']->prefs['rate_limit'] > 0) { + if (Config::get('rate_limit') > 0) { while (!feof($fp)) { - echo fread($fp,round($GLOBALS['user']->prefs['rate_limit']*1024)); + echo fread($fp,round(Config::get('rate_limit')*1024)); flush(); sleep(1); } @@ -247,7 +247,7 @@ if (Config::get('downsample_remote')) { } // if downsample remote is enabled // If they are downsampling, or if the song is not a native stream or it's non-local -if (($GLOBALS['user']->prefs['transcode'] == 'always' || !$song->native_stream() || $not_local) && $GLOBALS['user']->prefs['transcode'] != 'never') { +if ((Config::get('transcode') == 'always' || !$song->native_stream() || $not_local) && Config::get('transcode') != 'never') { 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; @@ -340,7 +340,7 @@ else { /* Clean up any open ends */ -if ($GLOBALS['user']->prefs['play_type'] == 'downsample' || !$song->native_stream()) { +if (Config::get('play_type') == 'downsample' || !$song->native_stream()) { @pclose($fp); } else { |