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 /stream.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 'stream.php')
-rw-r--r-- | stream.php | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -50,7 +50,24 @@ switch ($_REQUEST['action']) { if (!count($song_ids)) { header("Location:" . return_referer()); exit; } break; case 'basket': - $song_ids = $GLOBALS['user']->playlist->get_items(); + // Pull in our items (multiple types) + $objects = $GLOBALS['user']->playlist->get_items(); + + //Recurse through the objects + foreach ($objects as $object_data) { + // Switch on the type of object we've got in here + switch ($object_data['1']) { + case 'radio': + $radio = new Radio($object_data['0']); + $urls[] = $radio->url; + break; + case 'song': + default: + $song_ids[] = $object_data['0']; + break; + } // end switch on type + } // end foreach + break; /* This is run if we need to gather info based on a tmp playlist */ case 'tmp_playlist': @@ -163,6 +180,11 @@ switch ($_REQUEST['method']) { /* Start the Stream */ $stream = new Stream($stream_type,$song_ids); + if (is_array($urls)) { + foreach ($urls as $url) { + $stream->manual_url_add($url); + } + } $stream->start(); break; } // end method switch |