<?php

require_once '../server/common.php';
use Ministra\Lib\w13ec15f0067ea75861e61e27c990e4ba\k8281faec2a4a41f470b00112682ddabf;
use Ministra\Lib\RESTAPI\v1\RESTManager;
if (!\Ministra\Lib\w13ec15f0067ea75861e61e27c990e4ba\k8281faec2a4a41f470b00112682ddabf::getSafe('enable_api', \false) && \strpos($_SERVER['QUERY_STRING'], 'tv_archive') != 2 && \strpos($_SERVER['QUERY_STRING'], 'stream_recorder') != 2 && \strpos($_SERVER['QUERY_STRING'], 'monitoring_links') != 2 && \strpos($_SERVER['QUERY_STRING'], 'tv_tmp_link') != 2) {
    \header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
    echo 'API not enabled';
    exit;
}
\Ministra\Lib\RESTAPI\v1\RESTManager::setAuthParams(\Ministra\Lib\w13ec15f0067ea75861e61e27c990e4ba\k8281faec2a4a41f470b00112682ddabf::getSafe('api_auth_login', ''), \Ministra\Lib\w13ec15f0067ea75861e61e27c990e4ba\k8281faec2a4a41f470b00112682ddabf::getSafe('api_auth_password', ''));
\Ministra\Lib\RESTAPI\v1\RESTManager::enableLogger(\Ministra\Lib\w13ec15f0067ea75861e61e27c990e4ba\k8281faec2a4a41f470b00112682ddabf::getSafe('enable_api_log', \false));
\Ministra\Lib\RESTAPI\v1\RESTManager::handleRequest();
