diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-07-30 04:28:49 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-07-30 04:28:49 +0000 |
commit | 49e9368674124d7fc577e3d9a85210504717f4e6 (patch) | |
tree | 26b79aace9edf43c7db93f5bc0f2daa30269303f /play/index.php | |
parent | f68c1b545f85c0fa8c13f93370fbb9502dc6c2c9 (diff) | |
download | ampache-49e9368674124d7fc577e3d9a85210504717f4e6.tar.gz ampache-49e9368674124d7fc577e3d9a85210504717f4e6.tar.bz2 ampache-49e9368674124d7fc577e3d9a85210504717f4e6.zip |
sync of fixes from branch
Diffstat (limited to 'play/index.php')
-rw-r--r-- | play/index.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/play/index.php b/play/index.php index 794a59ff..41360973 100644 --- a/play/index.php +++ b/play/index.php @@ -61,6 +61,7 @@ if (!isset($uid)) { /* Misc Housework */ $user = new User($uid); +Preference::init(); /* If the user has been disabled (true value) */ if (make_bool($GLOBALS['user']->disabled)) { @@ -198,6 +199,16 @@ if ($catalog->catalog_type == 'remote') { $extra_info = "&xml_rpc=1&sid=$sid"; header("Location: " . $song->file . $extra_info); debug_event('xmlrpc-stream',"Start XML-RPC Stream - " . $song->file . $extra_info,'5'); + + /* 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 + exit; } // end if remote catalog |