diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-30 08:29:23 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-30 08:29:23 +0000 |
commit | 4e716204e84fc7546372bdae79121e47b92412bc (patch) | |
tree | 2f1ff4913d6363111cea36b7dbaf0d2f8266a3b9 /lib | |
parent | 5975361e038e17e5f91fd69da4f5df2d3e5af259 (diff) | |
download | ampache-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')
-rw-r--r-- | lib/class/album.class.php | 8 | ||||
-rw-r--r-- | lib/class/stream.class.php | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index ca6f1b10..ea39c9aa 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -351,6 +351,13 @@ class Album { foreach ($coverart as $key=>$value) { $i++; $url = $coverart[$key]; + + // We need to check the URL for the /noimage/ stuff + if (strstr($url,"/noimage/")) { + debug_event('LastFM','Detected as noimage, skipped ' . $url,'3'); + continue; + } + $results = pathinfo($url); $mime = 'image/' . $results['extension']; $data[] = array('url'=>$url,'mime'=>$mime); @@ -358,6 +365,7 @@ class Album { } // end foreach return $data; + } // get_lastfm_art /*! 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) { |