Переработка под 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,30 @@
{###########################################################################
# 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
###########################################################################}
{% extends "template.twig" %}
{% block header %}
<p class="text-muted small">
Обновлено:&nbsp;{{ updated_at }}&nbsp;МСК<br/>
Плейлистов в списке:&nbsp;<strong>{{ count }}</strong>
</p>
<div class="row text-muted small">
<div class="col-md">
Состояние проверки:<br />
<span class="me-1">
<span class="badge me-1 bg-success text-dark">online</span>{{ onlineCount }}
</span>
<span class="me-1">
<span class="badge me-1 bg-danger text-dark">offline</span>{{ offlineCount }}
</span>
<span class="me-1">
<span class="badge me-1 bg-secondary text-dark">unknown</span>{{ uncheckedCount }}
</span>
</div>
<div class="col-md">
Обновлено:&nbsp;{{ updatedAt }}&nbsp;МСК<br/>
Плейлистов в списке:&nbsp;<strong>{{ count }}</strong>
</div>
</div>
<hr/>
{% endblock %}
@@ -15,34 +35,58 @@
<tr>
<th class="text-center">ID</th>
<th>Информация о плейлисте</th>
<th class="text-center">Каналов</th>
<th class="d-none d-sm-table-cell">Ссылка для ТВ</th>
</tr>
</thead>
<tbody>
{% for id, playlist in playlists %}
<tr class="pls" data-playlist-id="{{ id }}">
<td class="text-center font-monospace id">{{ id }}</td>
{% for code, playlist in playlists %}
<tr class="pls" data-playlist-code="{{ code }}">
<td class="text-center font-monospace code">{{ code }}</td>
<td class="info">
<a href="{{ base_url(id ~ '/details') }}" class="text-light fw-bold text-decoration-none">{{ playlist.name }}</a>
{% if playlist.isOnline is same as(true) %}
<span class="badge small bg-success text-dark">online</span>
{% elseif playlist.isOnline is same as(false) %}
<span class="badge small bg-danger text-dark">offline</span>
{% elseif playlist.isOnline is same as(null) %}
<span class="badge small bg-secondary text-dark" title="Не проверялся">unknown</span>
{% endif %}
<a href="{{ base_url(code ~ '/details') }}" class="text-light fw-bold text-decoration-none">{{ playlist.name }}</a>
<div class="small mt-2">
{% if playlist.desc|length > 0 %}
<p class="my-1 d-none d-lg-block">{{ playlist.desc }}</p>
{% if playlist.description|length > 0 %}
<p class="my-1 d-none d-lg-block">{{ playlist.description }}</p>
{% endif %}
<a href="{{ base_url(id ~ '/details') }}" class="text-light">Подробнее...</a>
{% if playlist.tags|length > 0 %}
<p class="my-1 d-none d-lg-block text-muted" title="Теги, присвоенные каналам при проверке">
<ion-icon name="pricetag-outline" class="me-1"></ion-icon>
{% for tag in playlist.tags %}
<span class="chtag">#{{ tag }}</span>
{% endfor %}
</p>
{% endif %}
<a href="{{ base_url(code ~ '/details') }}" class="text-light">Подробнее...</a>
</div>
</td>
<td class="text-center">
{% if (playlist.isOnline is not same as(null)) %}
{{ playlist.channels|length }}
{% else %}
?
{% endif %}
</td>
<td class="col-3 d-none d-sm-table-cell">
<span onclick="prompt('Скопируй адрес плейлиста', '{{ playlist.url }}')"
<span onclick="prompt('Скопируй адрес плейлиста', 'm3u.su/{{ playlist.code }}')"
title="Нажми на ссылку, чтобы скопировать её в буфер обмена"
class="font-monospace cursor-pointer">
{{ playlist.url }}
class="font-monospace cursor-pointer"
>
m3u.su/{{ playlist.code }}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if pageCount > 0 %}
{% if pageCount > 1 %}
<div aria-label="pages">
<ul class="pagination justify-content-center">
{% for page in range(1, pageCount) %}