1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 10:19:25 +02:00

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.
This commit is contained in:
Paul Arthur 2013-01-14 17:21:34 -05:00
parent 4afe4b507b
commit b51b45952e

View file

@ -75,13 +75,10 @@ switch ($_REQUEST['action']) {
} // end switch on type } // end switch on type
break; break;
case 'single_song': case 'single_song':
$media_ids[] = array('song',scrub_in($_REQUEST['song_id'])); $media_ids[] = array(
break; 'object_type' => 'song',
case 'your_popular_songs': 'object_id' => scrub_in($_REQUEST['song_id'])
$media_ids = get_popular_songs($_REQUEST['limit'], 'your', $GLOBALS['user']->id); );
break;
case 'popular_songs':
$media_ids = get_popular_songs($_REQUEST['limit'], 'global');
break; break;
case 'artist': case 'artist':
$artist = new Artist($_REQUEST['artist_id']); $artist = new Artist($_REQUEST['artist_id']);
@ -124,7 +121,10 @@ switch ($_REQUEST['action']) {
$urls = array($democratic->play_url()); $urls = array($democratic->play_url());
break; break;
case 'download': 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: default:
break; break;
} // end action switch } // end action switch