summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/class/album.class.php8
-rw-r--r--lib/class/stream.class.php10
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) {