From c93613813d191f7955dc74d74c8b8dcabc6c7de7 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Wed, 6 May 2009 21:00:42 +0000 Subject: sync stats fix from 3.5 branch --- play/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'play/index.php') diff --git a/play/index.php b/play/index.php index d3596699..b63ba7b6 100644 --- a/play/index.php +++ b/play/index.php @@ -317,8 +317,10 @@ else { } } // else not downsampling -// Put this song in the now_playing table -Stream::insert_now_playing($media->id,$uid,$media->time,$sid,get_class($media)); +// Put this song in the now_playing table only if it's a song for now... +if (get_class($media) == 'song') { + Stream::insert_now_playing($media->id,$uid,$media->time,$sid,get_class($media)); +} if ($start > 0) { @@ -371,7 +373,7 @@ if($bytes_streamed < $stream_size AND (connection_status() == 0)) { } // Make sure that a good chunk of the song has been played -if ($bytes_streamed > $min_bytes_streamed) { +if ($bytes_streamed > $min_bytes_streamed AND get_class($media) == 'song') { debug_event('Play','Registering stats for ' . $media->title,'5'); $user->update_stats($media->id); -- cgit