summaryrefslogtreecommitdiffstats
path: root/lib/class/api.class.php
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-02-07 14:24:40 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-02-07 14:24:40 -0500
commit239ea81fdf2fa2bda8a8556e19412264396fe52a (patch)
tree0d753486ec6ded74cb4adb1a7e70dd9ce4ccfda6 /lib/class/api.class.php
parent31afde9fc07a766229681a13d2cce0825e9fec93 (diff)
downloadampache-239ea81fdf2fa2bda8a8556e19412264396fe52a.tar.gz
ampache-239ea81fdf2fa2bda8a8556e19412264396fe52a.tar.bz2
ampache-239ea81fdf2fa2bda8a8556e19412264396fe52a.zip
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.
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r--lib/class/api.class.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php
index e48786fd..b913c06d 100644
--- a/lib/class/api.class.php
+++ b/lib/class/api.class.php
@@ -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