From 2c337852cff31297d681fb87d3098cc3d9041101 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Fri, 29 Feb 2008 06:14:46 +0000 Subject: major corrections to reading of preferences and a few misc fixes which I have now forgotten --- play/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'play') 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 { -- cgit