mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 01:39:28 +02:00

Fix coding guidelines incoherences. Code should match PSR1/2 now, and php-cs is set to check it on each commit. Also fixed the Git hook to take into account only added, modified, copied and renamed files (preventing errors when trying to check deleted files). Closes #1260.
30 lines
728 B
PHP
30 lines
728 B
PHP
<?php
|
|
define('NO_SESSION', '1');
|
|
require_once '../lib/init.php';
|
|
|
|
if (!AmpConfig::get('upnp_backend')) {
|
|
echo "Disabled.";
|
|
exit;
|
|
}
|
|
|
|
set_time_limit(600);
|
|
|
|
header("Content-Type: text/html; charset=UTF-8");
|
|
|
|
// Parse the request from UPnP player
|
|
$requestRaw = file_get_contents('php://input');
|
|
if ($requestRaw != '') {
|
|
$upnpRequest = Upnp_Api::parseUPnPRequest($requestRaw);
|
|
debug_event('upnp-cm', 'Request: ' . $requestRaw, '5');
|
|
} else {
|
|
echo 'Error: no UPnP request.';
|
|
debug_event('upnp-cm', 'No request', '5');
|
|
exit;
|
|
}
|
|
|
|
switch ($upnpRequest['action']) {
|
|
case 'getprotocolinfo':
|
|
$responseType = 'u:GetProtocolInfoResponse';
|
|
//$items = Upnp_Api::cm_getProtocolInfo();
|
|
break;
|
|
}
|