diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-15 16:16:04 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-15 16:16:04 +0000 |
commit | fdb7c58cb160c5f8f0f0327c11cba93226e062f6 (patch) | |
tree | 6cf57a740799a3a9b9dc9a035ccb66e1e54b053f /lib/stream.lib.php | |
parent | 86ff429b366080b9203e5ddb1740339c64013853 (diff) | |
download | ampache-fdb7c58cb160c5f8f0f0327c11cba93226e062f6.tar.gz ampache-fdb7c58cb160c5f8f0f0327c11cba93226e062f6.tar.bz2 ampache-fdb7c58cb160c5f8f0f0327c11cba93226e062f6.zip |
fix typo causing height to not display on art retrival, update to db allowing gc of tmp_browse, add extension to api album art image urls
Diffstat (limited to 'lib/stream.lib.php')
-rw-r--r-- | lib/stream.lib.php | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/lib/stream.lib.php b/lib/stream.lib.php deleted file mode 100644 index 8cc92d50..00000000 --- a/lib/stream.lib.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/* - - Copyright Ampache.org - 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 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 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/** - * show_now_playing - * shows the now playing template - */ -function show_now_playing() { - - // GC! - Stream::gc_session(); - Stream::gc_now_playing(); - - $web_path = Config::get('web_path'); - $results = get_now_playing(); - require Config::get('prefix') . '/templates/show_now_playing.inc.php'; - -} // show_now_playing - -/** - * get_now_playing - * gets the now playing information - */ -function get_now_playing($filter='') { - - $sql = "SELECT `session_stream`.`agent`,`now_playing`.`song_id`,`now_playing`.`user`,`now_playing`.`expire` " . - "FROM `now_playing` " . - "LEFT JOIN `session_stream` ON `session_stream`.`id`=`now_playing`.`id` " . - "ORDER BY `now_playing`.`expire` DESC"; - $db_results = Dba::query($sql); - - $results = array(); - - /* While we've got stuff playing */ - while ($r = Dba::fetch_assoc($db_results)) { - $song = new Song($r['song_id']); - $song->format(); - $np_user = new User($r['user']); - $results[] = array('song'=>$song,'user'=>$np_user,'agent'=>$r['agent'],'expire'=>$r['expire']); - } // end while - - return $results; - -} // get_now_playing - - -/** - * check_lock_songs - * This checks to see if the song is already playing, if it is then it prevents the user - * from streaming it - */ -function check_lock_songs($song_id) { - - $sql = "SELECT `song_id` FROM `now_playing` " . - "WHERE `song_id` = '$song_id'"; - $db_results = Dba::query($sql); - - if (Dba::num_rows($db_results)) { - debug_event('lock_songs','Song Already Playing, skipping...','5'); - return false; - } - - return true; - -} // check_lock_songs - -?> |