diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-05 07:32:38 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-05 07:32:38 +0000 |
commit | e07f720bbcb5aa4f1539a0edeeb8c737ae2abf94 (patch) | |
tree | e44ba25c36a55fb9c9cb327ebc9d5c70782a82a7 /play/index.php | |
parent | 83c7a25a76efaf74467c6654f20be3a8029040d9 (diff) | |
download | ampache-e07f720bbcb5aa4f1539a0edeeb8c737ae2abf94.tar.gz ampache-e07f720bbcb5aa4f1539a0edeeb8c737ae2abf94.tar.bz2 ampache-e07f720bbcb5aa4f1539a0edeeb8c737ae2abf94.zip |
semi-fixed lastfm
Diffstat (limited to 'play/index.php')
-rw-r--r-- | play/index.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/play/index.php b/play/index.php index 846c86a4..fe26e8e1 100644 --- a/play/index.php +++ b/play/index.php @@ -259,14 +259,14 @@ while (!feof($fp) && (connection_status() == 0)) { $buf = fread($fp, $chunk_size); print($buf); if ($GLOBALS['user']->prefs['rate_limit'] > 0) { sleep (1); } - $bytesStreamed += strlen($buf); + $bytesStreamed += $chunk_size; } /* Delete the Now Playing Entry */ delete_now_playing($lastid); if ($bytesStreamed > $minBytesStreamed) { - $user->update_stats($song_id); + $user->update_stats($song->id); /* If this is a voting tmp playlist remove the entry */ if (is_object($tmp_playlist)) { if ($tmp_playlist->type == 'vote') { @@ -274,6 +274,9 @@ if ($bytesStreamed > $minBytesStreamed) { } } } +else { + debug_event('stream',$bytesStreamed .' of ' . $song->size . ' streamed, less then ' . $minBytesStreamed . ' not collecting stats','5'); +} /* Set the Song as Played if it isn't already */ $song->set_played(); |