diff options
author | Paul Arthur <flowerysong00@yahoo.com> | 2013-01-14 17:21:34 -0500 |
---|---|---|
committer | Paul Arthur <flowerysong00@yahoo.com> | 2013-01-15 01:26:37 -0500 |
commit | b51b45952ec140b59348ca26e5d9015025a90f08 (patch) | |
tree | 2bc903e7b1aa05b5f752bb21ead7bf95bc3a15b8 /stream.php | |
parent | 4afe4b507b46ee4227baf63aa80d0024b40ebf56 (diff) | |
download | ampache-b51b45952ec140b59348ca26e5d9015025a90f08.tar.gz ampache-b51b45952ec140b59348ca26e5d9015025a90f08.tar.bz2 ampache-b51b45952ec140b59348ca26e5d9015025a90f08.zip |
Some cleanup of the switch in stream.php
Add correct array indices to hand-crafted arrays in single_song and
download cases. Yank unimplemented popular stuff.
Diffstat (limited to 'stream.php')
-rw-r--r-- | stream.php | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -75,13 +75,10 @@ switch ($_REQUEST['action']) { } // end switch on type break; case 'single_song': - $media_ids[] = array('song',scrub_in($_REQUEST['song_id'])); - break; - case 'your_popular_songs': - $media_ids = get_popular_songs($_REQUEST['limit'], 'your', $GLOBALS['user']->id); - break; - case 'popular_songs': - $media_ids = get_popular_songs($_REQUEST['limit'], 'global'); + $media_ids[] = array( + 'object_type' => 'song', + 'object_id' => scrub_in($_REQUEST['song_id']) + ); break; case 'artist': $artist = new Artist($_REQUEST['artist_id']); @@ -124,7 +121,10 @@ switch ($_REQUEST['action']) { $urls = array($democratic->play_url()); break; case 'download': - $media_ids[] = array('song',scrub_in($_REQUEST['song_id'])); + $media_ids[] = array( + 'object_type' => 'song', + 'object_id' => scrub_in($_REQUEST['song_id']) + ); default: break; } // end action switch |