diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-31 06:55:54 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-31 06:55:54 +0000 |
commit | 00d74cac5a20c26017554b5e6eaef624b48f886e (patch) | |
tree | cfbe1dbf2d9759f9ebbe899728dbe199827b520e /tv.php | |
parent | 49c1cefcb9a2dc3f81d868655e64d2e357750f9d (diff) | |
download | ampache-00d74cac5a20c26017554b5e6eaef624b48f886e.tar.gz ampache-00d74cac5a20c26017554b5e6eaef624b48f886e.tar.bz2 ampache-00d74cac5a20c26017554b5e6eaef624b48f886e.zip |
fixed something I thought I had already fixed, and fiddled with democratic play a tiny bit
Diffstat (limited to 'tv.php')
-rw-r--r-- | tv.php | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -5,9 +5,8 @@ All rights reserved. This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,6 +21,8 @@ require_once('lib/init.php'); +/* Additional Library for tv stuff */ +require_once (conf('prefix') . '/lib/democratic.lib.php'); $dbh = dbh(); $web_path = conf('web_path'); @@ -32,19 +33,22 @@ if (!conf('allow_democratic_playback') || $GLOBALS['user']->prefs['play_type'] ! exit; } -/* Attempt to build the temp playlist */ -$playlist = new tmpPlaylist('-1'); +/* Clean up the stuff we need */ $action = scrub_in($_REQUEST['action']); - switch ($action) { case 'create_playlist': - + /* We need to make ourselfs a new tmp playlist */ + $tmp_playlist = new tmpPlaylist(); + $id = $tmp_playlist->create('-1','vote','song',$_REQUEST['playlist_id']); + + /* Re-generate the playlist */ + $tmp_playlist = new tmpPlaylist($id); + require_once(conf('prefix') . '/templates/show_tv.inc.php'); break; default: - + $tmp_playlist = get_democratic_playlist('-1'); require_once(conf('prefix') . '/templates/show_tv.inc.php'); - break; } // end switch on action |