Compare commits
3 Commits
c47481795b
...
ba8d59644c
| Author | SHA1 | Date | |
|---|---|---|---|
|
ba8d59644c
|
|||
|
3b0e1d8f18
|
|||
|
a93e427bb0
|
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -126,16 +126,63 @@ class IniFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['hasCatchup'] = str_contains($data['content'] ?? '', 'catchup');
|
$data['hasCatchup'] = str_contains($data['content'] ?? '', 'catchup');
|
||||||
$data['hasTvg'] = !empty($data['attributes']['url-tvg'])
|
$data['hasTvg'] = !empty($data['attributes']['url-tvg']) || !empty($data['attributes']['x-tvg-url']);
|
||||||
|| !empty($data['attributes']['x-tvg-url']);
|
$data['hasTokens'] = $this->hasTokens($data);
|
||||||
|
|
||||||
$data['tags'] = [];
|
$data['tags'] = [];
|
||||||
foreach ($data['channels'] as $channel) {
|
foreach ($data['channels'] as &$channel) {
|
||||||
$data['tags'] = array_merge($data['tags'], $channel['tags']);
|
$data['tags'] = array_merge($data['tags'], $channel['tags']);
|
||||||
|
$channel['hasToken'] = $this->hasTokens($channel);
|
||||||
}
|
}
|
||||||
$data['tags'] = array_values(array_unique($data['tags']));
|
$data['tags'] = array_values(array_unique($data['tags']));
|
||||||
sort($data['tags']);
|
sort($data['tags']);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Проверяет наличие токенов в плейлисте
|
||||||
|
*
|
||||||
|
* Сделано именно так, а не через тег unstable, чтобы разделить логику: есть заведомо нестабильные каналы,
|
||||||
|
* которые могут не транслироваться круглосуточно, а есть платные круглосуточные, которые могут оборваться
|
||||||
|
* в любой момент.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function hasTokens(array $data): bool
|
||||||
|
{
|
||||||
|
$string = ($data['url'] ?? '') . ($data['content'] ?? '');
|
||||||
|
if (empty($string)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$badAttributes = [
|
||||||
|
// токены и ключи
|
||||||
|
'[?&]token=',
|
||||||
|
'[?&]drmreq=',
|
||||||
|
// логины
|
||||||
|
'[?&]u=',
|
||||||
|
'[?&]user=',
|
||||||
|
'[?&]username=',
|
||||||
|
// пароли
|
||||||
|
'[?&]p=',
|
||||||
|
'[?&]pwd=',
|
||||||
|
'[?&]password=',
|
||||||
|
// неизвестные
|
||||||
|
// 'free=true',
|
||||||
|
// 'uid=',
|
||||||
|
// 'c_uniq_tag=',
|
||||||
|
// 'rlkey=',
|
||||||
|
// '?s=',
|
||||||
|
// '&s=',
|
||||||
|
// '?q=',
|
||||||
|
// '&q=',
|
||||||
|
];
|
||||||
|
|
||||||
|
return array_any(
|
||||||
|
$badAttributes,
|
||||||
|
static fn (string $badAttribute) => preg_match_all("/$badAttribute/", $string) >= 1,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -86,6 +86,6 @@ class TwigExtention extends AbstractExtension
|
|||||||
*/
|
*/
|
||||||
public function toDate(?float $timestamp, string $format = 'd.m.Y H:i:s'): string
|
public function toDate(?float $timestamp, string $format = 'd.m.Y H:i:s'): string
|
||||||
{
|
{
|
||||||
return $timestamp === null ? '(неизвестно)' : date($format, (int)$timestamp);
|
return $timestamp === null ? '' : date($format, (int)$timestamp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2025, Антон Аксенов
|
* Copyright (c) 2025, Антон Аксенов
|
||||||
* This file is part of iptv.axenov.dev web interface
|
* This file is part of m3u.su project
|
||||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{###########################################################################
|
{###########################################################################
|
||||||
# Copyright (c) 2025, Антон Аксенов
|
# Copyright (c) 2025, Антон Аксенов
|
||||||
# This file is part of iptv.axenov.dev web interface
|
# This file is part of m3u.su project
|
||||||
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
###########################################################################}
|
###########################################################################}
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<h2>О плейлисте: {{ playlist.name }}</h2>
|
<h2>О плейлисте: {{ playlist.name }}</h2>
|
||||||
{% if playlist.isOnline is same as(false) %}
|
{% if playlist.isOnline is same as (false) %}
|
||||||
<div class="alert alert-danger small" role="alert">
|
<div class="alert alert-danger small" role="alert">
|
||||||
Ошибка плейлиста: {{ playlist.content }}
|
Ошибка плейлиста: {{ playlist.content }}
|
||||||
</div>
|
</div>
|
||||||
@@ -80,18 +80,19 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="w-25" scope="row">Код</th>
|
<th class="w-25" scope="row">Код</th>
|
||||||
<th class="text-break">
|
<th class="text-break">
|
||||||
{% if playlist.isOnline is same as(true) %}
|
<span class="pe-3 font-monospace">{{ playlist.code }}</span>
|
||||||
<span class="font-monospace text-success">{{ playlist.code }}</span>
|
{% if playlist.isOnline is same as (true) %}
|
||||||
<span class="badge small text-dark bg-success">online</span>
|
<span class="cursor-help badge small text-dark bg-success"
|
||||||
{% elseif playlist.isOnline is same as(false) %}
|
title="Вероятно, работает"
|
||||||
<span class="font-monospace text-danger">{{ playlist.code }}</span>
|
>online</span>
|
||||||
<span class="badge small text-dark bg-danger">offline</span>
|
{% elseif playlist.isOnline is same as (false) %}
|
||||||
{% elseif playlist.isOnline is same as(null) %}
|
<span class="cursor-help badge small text-dark bg-danger"
|
||||||
<span class="font-monospace">{{ playlist.code }}</span>
|
title="Вероятно, не работает"
|
||||||
<span class="badge small text-dark bg-secondary" title="Не проверялся">unknown</span>
|
>offline</span>
|
||||||
{% endif %}
|
{% elseif playlist.isOnline is same as (null) %}
|
||||||
{% if "adult" in playlist.tags %}
|
<span class="cursor-help badge small text-dark bg-secondary"
|
||||||
<span class="badge small bg-warning text-dark" title="Есть каналы для взрослых!">18+</span>
|
title="Не проверялся"
|
||||||
|
>unknown</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -102,11 +103,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Ccылка для ТВ</th>
|
<th scope="row">Ccылка для ТВ</th>
|
||||||
<td>
|
<td>
|
||||||
<b onclick="prompt('Скопируй адрес плейлиста. Если не работает, добавь \'.m3u\' в конец.', '{{ base_url(playlist.code) }}')"
|
<span onclick="copyPlaylistUrl('{{ playlist.code }}')"
|
||||||
data-bs-toggle="tooltip"
|
class="cursor-pointer"
|
||||||
data-bs-placement="top"
|
|
||||||
title="Нажми на ссылку, чтобы скопировать её в буфер обмена"
|
title="Нажми на ссылку, чтобы скопировать её в буфер обмена"
|
||||||
class="font-monospace cursor-pointer text-break">{{ base_url(playlist.code) }}</b>
|
>
|
||||||
|
<b class="cursor-pointer font-monospace text-break">{{ base_url(playlist.code) }}</b>
|
||||||
|
<ion-icon name="copy-outline"></ion-icon>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -116,18 +119,37 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Наполнение</th>
|
<th scope="row">Наполнение</th>
|
||||||
<td class="text-break">
|
<td class="text-break">
|
||||||
<ion-icon name="folder-open-outline"></ion-icon> группы: {{ playlist.groups|length }}<br>
|
{% if playlist.isOnline is same as (true) %}
|
||||||
<ion-icon name="videocam-outline"></ion-icon> каналы: {{ playlist.channels|length }}:
|
{% if playlist.hasTokens is same as (true) %}
|
||||||
<span class="text-success"
|
<span class="cursor-help badge bg-info text-dark">
|
||||||
>{{ playlist.onlineCount }} ({{ playlist.onlinePercent }}%)</span> + <span class="text-danger"
|
<ion-icon name="paw"></ion-icon>
|
||||||
>{{ playlist.offlineCount }} ({{ playlist.offlinePercent }}%)</span>
|
</span> могут быть нестабильные каналы<br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if "adult" in playlist.tags %}
|
||||||
|
<span class="cursor-help badge small bg-warning text-dark">18+</span> есть каналы для взрослых<br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<ion-icon name="folder-open-outline"></ion-icon> группы: {{ playlist.groups|length }}<br>
|
||||||
|
<ion-icon name="videocam-outline"></ion-icon> каналы:
|
||||||
|
<span class="cursor-help text-success" title="Возможно, рабочие каналы">
|
||||||
|
{{ playlist.onlineCount }} ({{ playlist.onlinePercent }}%)
|
||||||
|
</span>
|
||||||
|
+
|
||||||
|
<span class="cursor-help text-danger" title="Возможно, НЕрабочие каналы">
|
||||||
|
{{ playlist.offlineCount }} ({{ playlist.offlinePercent }}%)
|
||||||
|
</span>
|
||||||
|
= {{ playlist.channels|length }}
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Возможности</th>
|
<th scope="row">Возможности</th>
|
||||||
<td class="text-break">
|
<td class="text-break">
|
||||||
|
{% if playlist.isOnline is same as (true) %}
|
||||||
<ion-icon name="newspaper-outline"></ion-icon> Программа передач: {{ playlist.hasTvg ? 'есть' : 'нет' }}<br>
|
<ion-icon name="newspaper-outline"></ion-icon> Программа передач: {{ playlist.hasTvg ? 'есть' : 'нет' }}<br>
|
||||||
<ion-icon name="play-back"></ion-icon> Перемотка (архив): {{ playlist.hasCatchup ? 'есть' : 'нет' }}
|
<ion-icon name="play-back"></ion-icon> Перемотка (архив): {{ playlist.hasCatchup ? 'есть' : 'нет' }}
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="text-secondary">
|
<tr class="text-secondary">
|
||||||
@@ -142,7 +164,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if playlist.isOnline is same as(false) %}
|
{% if playlist.isOnline is same as (false) %}
|
||||||
<tr class="text-secondary">
|
<tr class="text-secondary">
|
||||||
<th class="w-25" scope="row">Ошибка проверки</th>
|
<th class="w-25" scope="row">Ошибка проверки</th>
|
||||||
<td class="text-break">{{ playlist.content }}</td>
|
<td class="text-break">{{ playlist.content }}</td>
|
||||||
@@ -286,7 +308,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
id="search-field"
|
id="search-field"
|
||||||
class="form-control form-control-sm border-secondary bg-dark text-light fuzzy-search"
|
class="cursor-help form-control form-control-sm border-secondary bg-dark text-light fuzzy-search"
|
||||||
placeholder="Поиск каналов..."
|
placeholder="Поиск каналов..."
|
||||||
title="Начни вводить название"
|
title="Начни вводить название"
|
||||||
/>
|
/>
|
||||||
@@ -392,31 +414,52 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="text-break">
|
<td class="text-break">
|
||||||
|
{% if channel.isOnline is same as (true) %}
|
||||||
<ion-icon name="radio-button-on-outline"
|
<ion-icon name="radio-button-on-outline"
|
||||||
{% if (channel.isOnline) %}
|
class="cursor-help me-1 text-success"
|
||||||
class="me-1 text-success"
|
title="Состояние: онлайн (возможно, работает прямо сейчас)"
|
||||||
title="Состояние: онлайн"
|
></ion-icon>
|
||||||
{% else %}
|
{% else %}
|
||||||
class="me-1 text-danger"
|
<ion-icon name="radio-button-on-outline"
|
||||||
title="Состояние: оффлайн"
|
class="cursor-help me-1 text-danger"
|
||||||
|
title="Состояние: оффлайн (не работал в момент проверки или не удалось проверить)"
|
||||||
|
></ion-icon>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
></ion-icon>{% if "adult" in channel.tags %}
|
{% if "adult" in channel.tags %}
|
||||||
<span class="badge small bg-warning text-dark" title="Канал для взрослых!">18+</span>
|
<span class="badge small bg-warning text-dark"
|
||||||
{% endif %}<span class="chname">{{ channel.title }}</span>
|
title="Канал для взрослых!"
|
||||||
|
>18+</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if channel.hasToken is same as (true) %}
|
||||||
|
<span class="cursor-help badge small bg-info text-dark"
|
||||||
|
title="Может быть нестабилен"
|
||||||
|
>
|
||||||
|
<ion-icon name="paw"></ion-icon>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<span class="chname">{{ channel.title }}</span>
|
||||||
|
|
||||||
<div class="text-secondary small">
|
<div class="text-secondary small">
|
||||||
{% if (channel.attributes['tvg-id']) %}
|
{% if (channel.attributes['tvg-id']) %}
|
||||||
<div title="tvg-id">
|
<div title="Идентификатор канала для телепрограммы (tvg-id)" class="cursor-help">
|
||||||
<ion-icon name="star-outline" class="me-1"></ion-icon> {{ channel.attributes['tvg-id'] }}
|
<ion-icon name="star-outline" class="me-1"></ion-icon> {{ channel.attributes['tvg-id'] }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if (channel.contentType != null) %}
|
{% if (channel.contentType != null) %}
|
||||||
<div title="MIME type">
|
<div title="Тип контента (mime-type)" class="cursor-help">
|
||||||
<ion-icon name="eye-outline" class="me-1"></ion-icon> {{ channel.contentType }}
|
<ion-icon name="eye-outline" class="me-1"></ion-icon> {{ channel.contentType }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if channel.tags|length > 0 %}
|
{% if channel.tags|length > 0 %}
|
||||||
<ion-icon name="pricetag-outline" class="me-1"></ion-icon>
|
<ion-icon name="pricetag-outline"
|
||||||
|
class="cursor-help me-1"
|
||||||
|
title="Теги"
|
||||||
|
></ion-icon>
|
||||||
{% for tag in channel.tags %}
|
{% for tag in channel.tags %}
|
||||||
<span class="chtag">#{{ tag }}</span>
|
<span class="chtag">#{{ tag }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -434,8 +477,8 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
<script src="/js/list.min.js"></script>
|
<script src="/js/list.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const options = {
|
const options = {
|
||||||
valueNames: [
|
valueNames: [
|
||||||
'chname',
|
'chname',
|
||||||
@@ -513,5 +556,5 @@
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{###########################################################################
|
{###########################################################################
|
||||||
# Copyright (c) 2025, Антон Аксенов
|
# Copyright (c) 2025, Антон Аксенов
|
||||||
# This file is part of iptv.axenov.dev web interface
|
# This file is part of m3u.su project
|
||||||
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
###########################################################################}
|
###########################################################################}
|
||||||
|
|
||||||
@@ -11,27 +11,27 @@
|
|||||||
{% block metakeywords %}самообновляемые,бесплатные,iptv-плейлисты,iptv,плейлисты{% endblock %}
|
{% block metakeywords %}самообновляемые,бесплатные,iptv-плейлисты,iptv,плейлисты{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<style>
|
<style>
|
||||||
.card {transition: box-shadow .2s, transform .2s}
|
.card {transition: box-shadow .2s, transform .2s}
|
||||||
.card.hover-success:hover {transform: translateY(-7px); box-shadow: rgba(var(--bs-success-rgb), 1) 0 5px 20px -5px}
|
.card.hover-success:hover {transform: translateY(-7px); box-shadow: rgba(var(--bs-success-rgb), 1) 0 5px 20px -5px}
|
||||||
.card.hover-danger:hover {transform: translateY(-7px); box-shadow: rgba(var(--bs-danger-rgb), 1) 0 5px 20px -5px}
|
.card.hover-danger:hover {transform: translateY(-7px); box-shadow: rgba(var(--bs-danger-rgb), 1) 0 5px 20px -5px}
|
||||||
.card.hover-secondary:hover {transform: translateY(-7px); box-shadow: rgba(var(--bs-secondary-rgb), 1) 0 5px 20px -5px}
|
.card.hover-secondary:hover {transform: translateY(-7px); box-shadow: rgba(var(--bs-secondary-rgb), 1) 0 5px 20px -5px}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function setDefaultLogo(imgtag) {
|
function setDefaultLogo(imgtag) {
|
||||||
imgtag.onerror = null
|
imgtag.onerror = null
|
||||||
imgtag.src = '/no-tvg-logo.png'
|
imgtag.src = '/no-tvg-logo.png'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="d-flex flex-wrap justify-content-between align-items-center mb-4">
|
<div class="d-flex flex-wrap justify-content-between align-items-center mb-4">
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<h2 class="mb-0">Список плейлистов ({{ count }})</h2>
|
<h2 class="mb-0">Список плейлистов ({{ count }})</h2>
|
||||||
<div class="text-muted small">Изменён {{ updatedAt }} МСК</div>
|
<div class="text-muted small">Изменён {{ updatedAt }} МСК</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@@ -49,17 +49,37 @@
|
|||||||
<a href="/{{ code }}/details" class="text-decoration-none">
|
<a href="/{{ code }}/details" class="text-decoration-none">
|
||||||
<div class="card-header d-flex align-items-center gap-2">
|
<div class="card-header d-flex align-items-center gap-2">
|
||||||
<span class="font-monospace text-{{ statusClass }}">{{ code }}</span>
|
<span class="font-monospace text-{{ statusClass }}">{{ code }}</span>
|
||||||
<span class="badge bg-{{ statusClass }} ms-auto">
|
|
||||||
{% if playlist.isOnline is same as(true) %}online
|
|
||||||
{% elseif playlist.isOnline is same as(false) %}offline
|
|
||||||
{% elseif playlist.isOnline is same as(null) %}unknown
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
{% if playlist.isOnline is same as(true) %}
|
{% if playlist.isOnline is same as(true) %}
|
||||||
<span class="badge border border-success" title="Процент рабочих каналов">{{ playlist.onlinePercent }}%</span>
|
<span class="cursor-help badge bg-{{ statusClass }} ms-auto"
|
||||||
|
title="Возможно, этот плейлист рабочий"
|
||||||
|
>online</span>
|
||||||
|
{% elseif playlist.isOnline is same as(false) %}
|
||||||
|
<span class="cursor-help badge bg-{{ statusClass }} ms-auto"
|
||||||
|
title="Этот плейлист нерабочий или его не удалось проверить"
|
||||||
|
>offline</span>
|
||||||
|
{% elseif playlist.isOnline is same as(null) %}
|
||||||
|
<span class="cursor-help badge bg-{{ statusClass }} ms-auto"
|
||||||
|
title="Плейлист ещё не проверялся, придётся подождать"
|
||||||
|
>unknown</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if playlist.isOnline is same as(true) %}
|
||||||
|
<span class="cursor-help badge border border-success"
|
||||||
|
title="Процент рабочих каналов"
|
||||||
|
>{{ playlist.onlinePercent }}%</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if "adult" in playlist.tags %}
|
{% if "adult" in playlist.tags %}
|
||||||
<span class="badge bg-warning text-dark" title="Есть каналы для взрослых!">18+</span>
|
<span class="cursor-help badge bg-warning text-dark"
|
||||||
|
title="Есть каналы для взрослых!"
|
||||||
|
>18+</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if playlist.hasTokens is same as(true) %}
|
||||||
|
<span class="cursor-help badge bg-info text-dark"
|
||||||
|
title="В плейлисте есть каналы, которые могут быть нестабильны"
|
||||||
|
><ion-icon name="paw"></ion-icon></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@@ -96,8 +116,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer cursor-pointer"
|
<div class="card-footer cursor-pointer"
|
||||||
onclick="prompt('Скопируй адрес плейлиста. Если не работает, добавь \'.m3u\' в конец.', '{{ base_url(playlist.code) }}')"
|
onclick="copyPlaylistUrl('{{ playlist.code }}')"
|
||||||
title="Нажми чтобы скопировать"
|
title="Нажми на ссылку, чтобы скопировать её в буфер обмена"
|
||||||
>
|
>
|
||||||
<div class="d-flex justify-content-between align-items-center small">
|
<div class="d-flex justify-content-between align-items-center small">
|
||||||
<span class="font-monospace text-truncate">
|
<span class="font-monospace text-truncate">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{###########################################################################
|
{###########################################################################
|
||||||
# Copyright (c) 2025, Антон Аксенов
|
# Copyright (c) 2025, Антон Аксенов
|
||||||
# This file is part of iptv.axenov.dev web interface
|
# This file is part of m3u.su project
|
||||||
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
###########################################################################}
|
###########################################################################}
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<p class="text-muted small">
|
<p class="text-muted small">
|
||||||
Если хочешь, чтобы здесь был плейлист, предложи его к добавлению.
|
Если хочешь, чтобы здесь был плейлист, предложи его к добавлению.
|
||||||
<br />
|
<br />
|
||||||
<a href="https://iptv.axenov.dev/docs/support.html#participate">Как это сделать?</a>
|
<a href="/docs/support.html#participate">Как это сделать?</a>
|
||||||
</p>
|
</p>
|
||||||
<a class="btn btn-outline-light" href="/" title="На главную">
|
<a class="btn btn-outline-light" href="/" title="На главную">
|
||||||
<ion-icon name="list-outline" class="me-1"></ion-icon>Перейти к списку плейлистов
|
<ion-icon name="list-outline" class="me-1"></ion-icon>Перейти к списку плейлистов
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{###########################################################################
|
{###########################################################################
|
||||||
# Copyright (c) 2025, Антон Аксенов
|
# Copyright (c) 2025, Антон Аксенов
|
||||||
# This file is part of iptv.axenov.dev web interface
|
# This file is part of m3u.su project
|
||||||
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||||
###########################################################################}
|
###########################################################################}
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="keywords" content="{% block metakeywords %}{% endblock %}" />
|
<meta name="keywords" content="{% block metakeywords %}{% endblock %}" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<style>.cursor-pointer{cursor:pointer}</style>
|
<style>.cursor-pointer{cursor:pointer}.cursor-help{cursor:help}</style>
|
||||||
<script async type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
|
<script async type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
|
||||||
<script async nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
|
<script async nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
|
||||||
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||||||
@@ -132,6 +132,55 @@
|
|||||||
<script src="/js/bootstrap.bundle.min.js"></script>
|
<script src="/js/bootstrap.bundle.min.js"></script>
|
||||||
{% block footer %}{% endblock %}
|
{% block footer %}{% endblock %}
|
||||||
|
|
||||||
|
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
||||||
|
<div class="toast align-items-center text-bg-success border-0" role="alert" id="clipboardToast">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="toast-body" id="clipboardToastBody"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function showToast(message) {
|
||||||
|
const toastEl = document.getElementById('clipboardToast');
|
||||||
|
const toastBodyEl = document.getElementById('clipboardToastBody');
|
||||||
|
toastBodyEl.innerHTML = message;
|
||||||
|
const toast = new bootstrap.Toast(toastEl, {delay: 5000});
|
||||||
|
toast.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyPlaylistUrl(code) {
|
||||||
|
const url = '{{ base_url() }}/' + code;
|
||||||
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
navigator.clipboard
|
||||||
|
.writeText(url)
|
||||||
|
.then(() => showToast(`Ссылка на плейлист '${code}' скопирована в буфер обмена`))
|
||||||
|
.catch(err => console.error('Failed to copy:', err));
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const textArea = document.createElement("textarea");
|
||||||
|
textArea.value = url;
|
||||||
|
textArea.style.position = "fixed"; // Avoid scrolling to bottom
|
||||||
|
document.body.appendChild(textArea);
|
||||||
|
textArea.focus();
|
||||||
|
textArea.select();
|
||||||
|
|
||||||
|
const successful = document.execCommand('copy');
|
||||||
|
document.body.removeChild(textArea);
|
||||||
|
|
||||||
|
if (successful) {
|
||||||
|
showToast(`Ссылка на плейлист '${code}' скопирована в буфер обмена`);
|
||||||
|
} else {
|
||||||
|
showToast('Ошибка при копировании ссылки', true);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Fallback copy failed:', err);
|
||||||
|
showToast('Ошибка при копировании ссылки', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
{% include("custom.twig") ignore missing %}
|
{% include("custom.twig") ignore missing %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user