summaryrefslogtreecommitdiffstats
path: root/play/index.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-06 17:26:00 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-06 17:26:00 +0000
commitf175c68f5de5631846084ef6159896d596ebc299 (patch)
tree033725ca3dfddc700b2b24baf3154275181574b2 /play/index.php
parentc449c7a71d5424f3968ecf8873f2588d1bce77af (diff)
downloadampache-f175c68f5de5631846084ef6159896d596ebc299.tar.gz
ampache-f175c68f5de5631846084ef6159896d596ebc299.tar.bz2
ampache-f175c68f5de5631846084ef6159896d596ebc299.zip
moved the delete of now playing before stat collection
Diffstat (limited to 'play/index.php')
-rw-r--r--play/index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/play/index.php b/play/index.php
index 1e6d9fd4..07504b80 100644
--- a/play/index.php
+++ b/play/index.php
@@ -254,6 +254,9 @@ while (!feof($fp) && (connection_status() == 0)) {
$bytesStreamed += strlen($buf);
}
+/* Delete the Now Playing Entry */
+delete_now_playing($lastid);
+
if ($bytesStreamed > $minBytesStreamed) {
$user->update_stats($song_id);
/* If this is a voting tmp playlist remove the entry */
@@ -267,9 +270,6 @@ if ($bytesStreamed > $minBytesStreamed) {
/* Set the Song as Played if it isn't already */
$song->set_played();
-/* Delete the Now Playing Entry */
-delete_now_playing($lastid);
-
/* Clean up any open ends */
if ($GLOBALS['user']->prefs['play_type'] == 'downsample' || !$song->native_stream()) {
@pclose($fp);