summaryrefslogtreecommitdiffstats
path: root/play
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-05-06 21:00:42 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-05-06 21:00:42 +0000
commitc93613813d191f7955dc74d74c8b8dcabc6c7de7 (patch)
tree8232a85ef063f4f203615357e7fe3bf1dce939d4 /play
parent28a25eb9e232bcac0942f4e9da250fdbe7d76268 (diff)
downloadampache-c93613813d191f7955dc74d74c8b8dcabc6c7de7.tar.gz
ampache-c93613813d191f7955dc74d74c8b8dcabc6c7de7.tar.bz2
ampache-c93613813d191f7955dc74d74c8b8dcabc6c7de7.zip
sync stats fix from 3.5 branch
Diffstat (limited to 'play')
-rw-r--r--play/index.php8
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);