public static function settingsTest($app)
 {
     $socket = openMpdSocket('/run/mpd.sock');
     sendMpdCommand($socket, 'status');
     $song = readMpdResponse($socket);
     //        var_dump(self::parsePlaylist($song));
     echo json_encode(playerController::parsePlaylist($song));
 }
Beispiel #2
0
        playlistController::filesystem($app);
    })->name('filesystem');
    $app->get('/network', function () use($app) {
        networkController::getNetwork($app);
    })->name('network');
    $app->post('/network', function () use($app) {
        networkController::setNetwork($app);
    })->name('ModifNetwork');
    $app->get('/network/edit/:net', function ($net) use($app) {
        networkController::ChooseNetwork($net, $app);
    })->name('setNetwork');
    $app->get('/runes', function () use($app) {
        runeController::runes($app);
    });
    $app->put('/runes', function () use($app) {
        runeController::runesUpdate($app);
    });
    $app->get('/debug', function () use($app) {
        debugController::debug($app);
    });
    $app->get('/song', function () use($app) {
        playerController::currentSong($app);
    });
    $app->get('/playerStatus', function () use($app) {
        playerController::playerStatus($app);
    });
    $app->get('/test', function () use($app) {
        testController::test($app);
    })->name('test');
    $app->run();
}