Переработка под iptvc

This commit is contained in:
2025-05-12 00:07:43 +08:00
parent f43843bb07
commit 252af50239
29 changed files with 1662 additions and 1268 deletions

View File

@@ -1,10 +1,21 @@
<?php
/*
* Copyright (c) 2025, Антон Аксенов
* This file is part of iptv.axenov.dev web interface
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
*/
use App\Controllers\ApiController;
use App\Controllers\BasicController;
use App\Controllers\WebController;
return [
/*
|--------------------------------------------------------------------------
| Web routes
|--------------------------------------------------------------------------
*/
[
'method' => 'GET',
'path' => '/[page/{page:[0-9]+}]',
@@ -19,13 +30,7 @@ return [
],
[
'method' => 'GET',
'path' => '/logo',
'handler' => [WebController::class, 'logo'],
'name' => 'logo',
],
[
'method' => 'GET',
'path' => '/{code:[0-9a-zA-Z]+}',
'path' => '/{code:[0-9a-zA-Z]+}[.m3u[8]]',
'handler' => [WebController::class, 'redirect'],
'name' => 'redirect',
],
@@ -35,18 +40,43 @@ return [
'handler' => [WebController::class, 'details'],
'name' => 'details',
],
/*
|--------------------------------------------------------------------------
| API routes
|--------------------------------------------------------------------------
*/
[
'method' => 'GET',
'path' => '/{code:[0-9a-zA-Z]+}/json',
'handler' => [ApiController::class, 'json'],
'name' => 'json',
],
[
'method' => 'GET',
'path' => '/{code:[0-9a-zA-Z]+}/qrcode',
'handler' => [ApiController::class, 'makeQrCode'],
'name' => 'api::makeQrCode',
],
// [
// 'method' => 'GET',
// 'path' => '/{code:[0-9a-zA-Z]+}/logo/{hash:[0-9a-z]+}',
// 'handler' => [ApiController::class, 'logo'],
// 'name' => 'api::getChannelLogo',
// ],
/*
|--------------------------------------------------------------------------
| Other routes
|--------------------------------------------------------------------------
*/
[
'method' => '*',
'path' => '/{path:.*}',
'handler' => [BasicController::class, 'notFound'],
'name' => 'not-found',
],
// ...
];