Example #1
0
 if ($_GET['action'] == "getRandomPlaylist") {
     if (isset($_GET['station']) && $_GET['station'] != null && $_GET['station'] != "undefined") {
         $o = $streams->getRandomPlaylistJson($_GET['num'], "{$auth->userDir}/stations/{$_GET['station']}.files.db");
     } else {
         if (isset($_GET['personal']) && $_GET['personal'] == "yes") {
             $o = $streams->getRandomPlaylistJson($_GET['num'], "{$auth->userDir}/{$cfg->personalRadioDatabase}");
         } else {
             $o = $streams->getRandomPlaylistJson($_GET['num']);
         }
     }
     print $o;
     $streams->print_gzipped_page();
     die;
 } else {
     if ($_GET['action'] == "playRadio") {
         print $streams->playRadio($_GET['num']);
         $streams->print_gzipped_page();
         die;
     } else {
         if ($_GET['action'] == "logout") {
             print $streams->logout();
             die;
         } else {
             if ($_GET['action'] == "getAlbumArt") {
                 $id3 = $streams->id3($_GET['dir'], $_GET['file']);
                 print json_encode(array("albumart" => $id3['albumart']));
                 $streams->print_gzipped_page();
                 die;
             } else {
                 if ($_GET['action'] == "getHomeIndex") {
                     print $streams->getHomeIndex();