summaryrefslogtreecommitdiffstats
path: root/play
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-17 05:03:04 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-17 05:03:04 +0000
commit629efec5fa1a55f9284fa8acdc3333b442e9635e (patch)
treec72fa74f70a3af712a8e6b43f096aebb94fafad0 /play
parent30d5ec2c63ebcb4b131d83770aede629ebb80e69 (diff)
downloadampache-629efec5fa1a55f9284fa8acdc3333b442e9635e.tar.gz
ampache-629efec5fa1a55f9284fa8acdc3333b442e9635e.tar.bz2
ampache-629efec5fa1a55f9284fa8acdc3333b442e9635e.zip
slight tweak, do not impose play % restrictions on democratic play items
Diffstat (limited to 'play')
-rw-r--r--play/index.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/play/index.php b/play/index.php
index 4aaf6465..87d09fb5 100644
--- a/play/index.php
+++ b/play/index.php
@@ -337,15 +337,6 @@ if ($bytes_streamed > $min_bytes_streamed) {
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 ($demo_id) {
- $row_id = $democratic->get_uid_from_object_id($song_id,'song');
- if ($row_id) {
- debug_event('Democratic','Removing ' . $song->title . ' from Democratic Playlist','1');
- $democratic->delete_votes($row_id);
- }
- } // if tmp_playlist
-
/* Set the Song as Played if it isn't already */
$song->set_played();
@@ -355,6 +346,15 @@ else {
}
+/* If this is a voting tmp playlist remove the entry, we do this regardless of play amount */
+if ($demo_id) {
+ $row_id = $democratic->get_uid_from_object_id($song_id,'song');
+ if ($row_id) {
+ debug_event('Democratic','Removing ' . $song->title . ' from Democratic Playlist','1');
+ $democratic->delete_votes($row_id);
+ }
+} // if tmp_playlist
+
/* Clean up any open ends */
if (Config::get('play_type') == 'downsample' || !$song->native_stream()) {
@pclose($fp);