diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-23 06:08:14 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-23 06:08:14 +0000 |
commit | 216e691dfa53a28af8beca7aad2bf0ffb71dba2c (patch) | |
tree | 8b371e856d8107832a724f1ee0ad42f270435d0a /lib/class/browse.class.php | |
parent | 84eca6a3d59fc591a7e28b3d7e0c11746dc837fc (diff) | |
download | ampache-216e691dfa53a28af8beca7aad2bf0ffb71dba2c.tar.gz ampache-216e691dfa53a28af8beca7aad2bf0ffb71dba2c.tar.bz2 ampache-216e691dfa53a28af8beca7aad2bf0ffb71dba2c.zip |
- Added Live Stream (Internet Radio) support
- New Database Update corrects some issues and makes internet radio possible
- Fixed ratings
- Added new Transcode preference, doesn't do anything yet
- New "Radio Stations" browse type
Diffstat (limited to 'lib/class/browse.class.php')
-rw-r--r-- | lib/class/browse.class.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index b4c2361a..e86b6786 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -89,6 +89,7 @@ class Browse { case 'album': case 'artist': case 'genre': + case 'live_stream': $_SESSION['browse']['type'] = $type; break; default: @@ -170,6 +171,9 @@ class Browse { case 'user': $sql = "SELECT `user`.`id` FROM `user` "; break; + case 'live_stream': + $sql = "SELECT `live_stream`.`id` FROM `live_stream` "; + break; case 'song': default: $sql = "SELECT `song`.`id` FROM `song` "; @@ -233,8 +237,7 @@ class Browse { break; } // end list of sqlable filters } // if it is a song - - if ($_SESSION['browse']['type'] == 'album') { + elseif ($_SESSION['browse']['type'] == 'album') { switch($filter) { case 'alpha_match': $filter_sql = " `album`.`name` LIKE '" . Dba::escape($value) . "%' AND "; @@ -247,7 +250,7 @@ class Browse { break; } } // end album - if ($_SESSION['browse']['type'] == 'artist') { + elseif ($_SESSION['browse']['type'] == 'artist') { switch($filter) { case 'alpha_match': $filter_sql = " `artist`.`name` LIKE '" . Dba::escape($value) . "%' AND "; @@ -257,6 +260,16 @@ class Browse { break; } // end filter } // end artist + elseif ($_SESSION['browse']['type'] == 'live_stream') { + switch ($filter) { + case 'alpha_match': + $filter_sql = " `live_stream`.`name` LIKE '" . Dba::escape($value) . "%' AND "; + break; + default: + // Rien a faire + break; + } // end filter + } // end live_stream return $filter_sql; @@ -339,6 +352,11 @@ class Browse { require_once Config::get('prefix') . '/templates/show_artists.inc.php'; show_box_bottom(); break; + case 'live_stream': + show_box_top(_('Radion Stations')); + require_once Config::get('prefix') . '/templates/show_live_streams.inc.php'; + show_box_bottom(); + break; default: // Rien a faire break; |