mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Some cleanup of play URL handling
Move parsing from Song into Stream_URL and make it parse more things. Add the type parameter to all generated URLs instead of adding video to Video URLs.
This commit is contained in:
parent
31afde9fc0
commit
239ea81fdf
7 changed files with 55 additions and 43 deletions
|
@ -496,17 +496,15 @@ class Api {
|
|||
|
||||
/**
|
||||
* url_to_song
|
||||
*
|
||||
* This takes a url and returns the song object in question
|
||||
*/
|
||||
public static function url_to_song($input) {
|
||||
|
||||
// Don't scrub, the function needs her raw and juicy
|
||||
$song_id = Song::parse_song_url($input['url']);
|
||||
|
||||
$data = Stream_URL::parse($input['url']);
|
||||
ob_end_clean();
|
||||
echo XML_Data::songs(array($song_id));
|
||||
|
||||
} // url_to_song
|
||||
echo XML_Data::songs(array($data['id']));
|
||||
}
|
||||
|
||||
/**
|
||||
* playlists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue