summaryrefslogtreecommitdiffstats
path: root/play
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-05 20:59:45 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-05 20:59:45 +0000
commitad3d2363c4c20d6b5049c8db92d08786650bd2ae (patch)
treeb72355de5d27c9560d22947efd2d43c77c3e7b9e /play
parentaef507d64420f2c82359d5219e83e3e0671522b7 (diff)
downloadampache-ad3d2363c4c20d6b5049c8db92d08786650bd2ae.tar.gz
ampache-ad3d2363c4c20d6b5049c8db92d08786650bd2ae.tar.bz2
ampache-ad3d2363c4c20d6b5049c8db92d08786650bd2ae.zip
year another bump on openstrands, removed redundent files, fixed bug with config gen and started work on playlists
Diffstat (limited to 'play')
-rw-r--r--play/index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/play/index.php b/play/index.php
index cf4d4963..d4aa0710 100644
--- a/play/index.php
+++ b/play/index.php
@@ -295,7 +295,7 @@ else {
/* Let's force them to actually play a portion of the song before
* we count it in the statistics
*/
-$bytesStreamed = $start;
+$bytesStreamed = 0;
$minBytesStreamed = $song->size / 2;
// Actually do the streaming
@@ -305,7 +305,9 @@ while (!feof($fp) && (connection_status() == 0)) {
$bytesStreamed += $chunk_size;
}
+// Make sure that a good chunk of the song has been played
if ($bytesStreamed > $minBytesStreamed) {
+ debug_event('Stats','Registering stats for ' . $song->title,'5');
$user->update_stats($song->id);
/* If this is a voting tmp playlist remove the entry */
if (is_object($tmp_playlist)) {