summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-30 08:29:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-30 08:29:23 +0000
commit4e716204e84fc7546372bdae79121e47b92412bc (patch)
tree2f1ff4913d6363111cea36b7dbaf0d2f8266a3b9 /lib/class/stream.class.php
parent5975361e038e17e5f91fd69da4f5df2d3e5af259 (diff)
downloadampache-4e716204e84fc7546372bdae79121e47b92412bc.tar.gz
ampache-4e716204e84fc7546372bdae79121e47b92412bc.tar.bz2
ampache-4e716204e84fc7546372bdae79121e47b92412bc.zip
fixed localplay index problem after track delete, fixed lack of high-light of current playing song, fixed problem were second localplay send would kill session of any existing items
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 7d9092fc..71fd4626 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -153,12 +153,22 @@ class Stream {
/**
* gc_session
* This function performes the garbage collection stuff, run on extend and on now playing refresh
+ * There is an array of agents that we will never GC because of their nature, MPD being the best example
*/
public static function gc_session($ip='',$agent='',$uid='',$sid='') {
+ $append_array = array('MPD');
+
$time = time();
$sql = "DELETE FROM `session_stream` WHERE `expire` < '$time'";
$db_results = Dba::query($sql);
+
+ foreach ($append_array as $append_agent) {
+ if (strstr(strtoupper($agent),$append_agent)) {
+ // We're done here jump ship!
+ return true;
+ }
+ } // end foreach
// We need all of this to run this query
if ($ip AND $agent AND $uid AND $sid) {