From 0b4e8ed38c7543f14b703600be165b68f999a4db Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 28 Dec 2006 02:01:46 +0000 Subject: fixed WMP11 Now Playing, broke Album Art gathering, re-writing to fix some serious logic flaws --- lib/stream.lib.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/stream.lib.php') diff --git a/lib/stream.lib.php b/lib/stream.lib.php index bd306c48..8049be8b 100644 --- a/lib/stream.lib.php +++ b/lib/stream.lib.php @@ -52,6 +52,9 @@ function delete_now_playing($insert_id) { */ function gc_now_playing() { + /* Account for WMP11's Initial Streaming */ + if (strstr($_SERVER['HTTP_USER_AGENT'],"WMFSDK/11")) { return false; } + $time = time(); $expire = $time - 3200; // 86400 seconds = 1 day $session_id = sql_escape($_REQUEST['sid']); @@ -80,6 +83,9 @@ function insert_now_playing($song_id,$uid,$song_length) { /* Windows Media Player is evil and it makes multiple requests per song */ if (stristr($user_agent,"Windows-Media-Player")) { return false; } + /* Check for Windows Media Player 11 */ + if (strstr($user_agent,"WMFSDK/11")) { return false; } + /* Set the Expire Time */ // If they are using Windows media player -- cgit