diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-30 07:18:46 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-30 07:18:46 +0000 |
commit | 49c1cefcb9a2dc3f81d868655e64d2e357750f9d (patch) | |
tree | 2629a06d26be02de3c936b4ee39c7c6b72615248 /lib | |
parent | 598a200b969da093a99153173129257da080f71b (diff) | |
download | ampache-49c1cefcb9a2dc3f81d868655e64d2e357750f9d.tar.gz ampache-49c1cefcb9a2dc3f81d868655e64d2e357750f9d.tar.bz2 ampache-49c1cefcb9a2dc3f81d868655e64d2e357750f9d.zip |
few tweaks for flash player and a fixed for downsampleing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/init.php | 2 | ||||
-rw-r--r-- | lib/preferences.php | 3 | ||||
-rw-r--r-- | lib/stream.lib.php | 17 |
3 files changed, 4 insertions, 18 deletions
diff --git a/lib/init.php b/lib/init.php index ae4cabbd..d54706b7 100644 --- a/lib/init.php +++ b/lib/init.php @@ -73,7 +73,7 @@ if (!$results = read_config($configfile,0)) { } /** This is the version.... fluf nothing more... **/ -$results['version'] = '3.3.3-Alpha2 Build (001)'; +$results['version'] = '3.3.3-Alpha2 Build (002)'; $results['raw_web_path'] = $results['web_path']; $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; diff --git a/lib/preferences.php b/lib/preferences.php index 0022911b..d3c8ce63 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -265,6 +265,7 @@ function create_preference_input($name,$value) { if ($value == 'downsample') { $is_down = 'selected="selected"'; } elseif ($value == 'localplay') { $is_local = 'selected="selected"'; } elseif ($value == 'democratic') { $is_vote = 'selected="selected"'; } + elseif ($value == 'xspf_player') { $is_xspf_player = 'selected="selected"'; } else { $is_stream = "selected=\"selected\""; } echo "<select name=\"$name\">\n"; echo "\t<option value=\"\">" . _('None') . "</option>\n"; @@ -280,6 +281,7 @@ function create_preference_input($name,$value) { if (conf('allow_localplay_playback')) { echo "\t<option value=\"localplay\" $is_local>" . _('Localplay') . "</option>\n"; } + echo "\t<option value=\"xspf_player\" $is_xspf_player>" . _('XSPF Player') . "</option>\n"; echo "</select>\n"; break; case 'playlist_type': @@ -292,7 +294,6 @@ function create_preference_input($name,$value) { echo "\t<option value=\"asx\" $asx_type>" . _('Asx') . "</option>\n"; echo "\t<option value=\"ram\" $ram_type>" . _('RAM') . "</option>\n"; echo "\t<option value=\"xspf\" $xspf_type>" . _('XSPF') . "</option>\n"; - echo "\t<option value=\"xspf_player\">" . _('Flash') . "</option>\n"; echo "</select>\n"; break; case 'lang': diff --git a/lib/stream.lib.php b/lib/stream.lib.php index bc30d7cb..bd306c48 100644 --- a/lib/stream.lib.php +++ b/lib/stream.lib.php @@ -160,21 +160,6 @@ function start_downsample($song,$now_playing_id=0,$song_name=0) { if ($max_bitrate > 1 AND $min_bitrate < $max_bitrate) { $last_seen_time = $time - 1200; //20 min. - /********************************** - * Commenting out the following, I'd rather have it slightly less accurate and avoid a 4 table join - // Count the users connected in the last 20 min using downsampling - $sql = "SELECT COUNT(DISTINCT session.username) FROM session,user,user_preference,preferences " . - "WHERE user.username = session.username AND session.expire > '$time' AND user.last_seen > $last_seen_time " . - "AND preferences.name = 'play_type' AND user_preference.preference = preferences.id AND " . - "user_preference.user = user.username AND user_preference.value='downsample'"; - $db_result = mysql_query($sql, $dbh); - $results = mysql_fetch_row($db_result); - - // The current number of connected users - $current_users_count = $results[0]; - ************************************/ - - $sql = "SELECT COUNT(*) FROM now_playing, user_preference, preferences " . "WHERE preferences.name = 'play_type' AND user_preference.preference = preferences.id " . "AND now_playing.user = user_preference.user AND user_preference.value='downsample'"; @@ -220,7 +205,7 @@ function start_downsample($song,$now_playing_id=0,$song_name=0) { /* Never Upsample a song */ if (($sample_rate*1000) > $song->bitrate) { - $sample_rate = $song->bitrate/1000; + $sample_rate = validate_bitrate($song->bitrate)/1000; $sample_ratio = '1'; } else { |