mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
- 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
This commit is contained in:
parent
84eca6a3d5
commit
216e691dfa
22 changed files with 563 additions and 59 deletions
24
stream.php
24
stream.php
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue