diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-05-06 21:00:42 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-05-06 21:00:42 +0000 |
commit | c93613813d191f7955dc74d74c8b8dcabc6c7de7 (patch) | |
tree | 8232a85ef063f4f203615357e7fe3bf1dce939d4 /play/index.php | |
parent | 28a25eb9e232bcac0942f4e9da250fdbe7d76268 (diff) | |
download | ampache-c93613813d191f7955dc74d74c8b8dcabc6c7de7.tar.gz ampache-c93613813d191f7955dc74d74c8b8dcabc6c7de7.tar.bz2 ampache-c93613813d191f7955dc74d74c8b8dcabc6c7de7.zip |
sync stats fix from 3.5 branch
Diffstat (limited to 'play/index.php')
-rw-r--r-- | play/index.php | 8 |
1 files changed, 5 insertions, 3 deletions
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); |