summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG5
-rw-r--r--lib/init.php2
-rw-r--r--lib/stream.lib.php30
3 files changed, 33 insertions, 4 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 8a5eb7c6..46a042c8 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -3,6 +3,11 @@
--------------------------------------------------------------------------
--------------------------------------------------------------------------
+ v.3.4-Alpha2
+ - Fixed clear now playing
+ - Fixed now playing issues with Audacious 1.3.x office space style
+
+--------------------------------------------------------------------------
v.3.4-Alpha1 07/29/2007
- Improved Albums of the Moment performance on large catalogs
(Thx Vlet)
diff --git a/lib/init.php b/lib/init.php
index d5f7eaa9..698e21da 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -67,7 +67,7 @@ if (!count($results)) {
}
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.4-Alpha1';
+$results['version'] = '3.4-Alpha2 Build (001)';
$results['int_config_version'] = '4';
$results['raw_web_path'] = $results['web_path'];
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index 9b9b19c1..00416a7d 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -79,8 +79,20 @@ function insert_now_playing($song_id,$uid,$song_length) {
$time = time()+$song_length;
$session_id = Dba::escape($_REQUEST['sid']);
+ /* Check for against a list of clients that have abusive traffic patterns causing
+ * faulty now playing data and return without inserting
+ */
+ $banned_clients = array('Audacious/1.3');
+
+ foreach ($banned_clients as $banned_agent) {
+ if (stristr($user_agent,$banned_agent)) {
+ debug_event('Banned Agent',$banned_agent . ' clients now playing data not entered because Ampache is unable to handle its request pattern','5');
+ return false;
+ }
+ }
+
/* Windows Media Player is evil and it makes multiple requests per song */
- if (stristr($user_agent,"Windows-Media-Player") || strstr($user_agent,"Audacious")) { $session_id = ' '; }
+ if (stristr($user_agent,"Windows-Media-Player")) { $session_id = ' '; }
/* Check for Windows Media Player 11 */
if (strstr($user_agent,'NSPlayer/11') AND !strstr($user_agent,'WMFSDK/11')) { $session_id = ' '; }
@@ -100,11 +112,23 @@ function insert_now_playing($song_id,$uid,$song_length) {
} // insert_now_playing
/**
+ * clear_now_playing
+ * There really isn't anywhere else for this function, shouldn't have deleted it in the first
+ * place
+ */
+function clear_now_playing() {
+
+ $sql = "TRUNCATE `now_playing`";
+ $db_results = Dba::query($sql);
+
+ return true;
+
+} // clear_now_playing
+
+/**
* check_lock_songs
* This checks to see if the song is already playing, if it is then it prevents the user
* from streaming it
- * @package General
- * @catagory Security
*/
function check_lock_songs($song_id) {