mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Public meta
This commit is contained in:
parent
e4f8e3b3ff
commit
bbec75d225
3 changed files with 9 additions and 8 deletions
|
@ -13,13 +13,11 @@ from pyfastocloud_models.utils.utils import is_valid_http_url
|
||||||
class M3uParseView(FlaskView):
|
class M3uParseView(FlaskView):
|
||||||
route_base = '/m3uparse/'
|
route_base = '/m3uparse/'
|
||||||
|
|
||||||
@login_required
|
|
||||||
def show(self):
|
def show(self):
|
||||||
m3u = M3uParse.objects()
|
m3u = M3uParse.objects()
|
||||||
return render_template('autofill/show.html', m3u=m3u)
|
return render_template('autofill/show.html', m3u=m3u)
|
||||||
|
|
||||||
@route('/search/<sid>', methods=['GET'])
|
@route('/search/<sid>', methods=['GET'])
|
||||||
@login_required
|
|
||||||
def search(self, sid):
|
def search(self, sid):
|
||||||
lines = M3uParse.objects(id=sid)
|
lines = M3uParse.objects(id=sid)
|
||||||
line = lines.first()
|
line = lines.first()
|
||||||
|
@ -50,15 +48,15 @@ class M3uParseView(FlaskView):
|
||||||
line = M3uParse(name=title)
|
line = M3uParse(name=title)
|
||||||
|
|
||||||
tvg_id = file['tvg-id']
|
tvg_id = file['tvg-id']
|
||||||
if len(tvg_id) < constants.MAX_STREAM_TVG_ID_LENGTH:
|
if len(tvg_id) and len(tvg_id) < constants.MAX_STREAM_TVG_ID_LENGTH:
|
||||||
line.tvg_id.append(tvg_id)
|
line.tvg_id.append(tvg_id)
|
||||||
|
|
||||||
tvg_group = file['tvg-group']
|
tvg_group = file['tvg-group']
|
||||||
if len(tvg_group) < constants.MAX_STREAM_GROUP_TITLE_LENGTH:
|
if len(tvg_group) and len(tvg_group) < constants.MAX_STREAM_GROUP_TITLE_LENGTH:
|
||||||
line.group.append(tvg_group)
|
line.group.append(tvg_group)
|
||||||
|
|
||||||
tvg_logo = file['tvg-logo']
|
tvg_logo = file['tvg-logo']
|
||||||
if len(tvg_logo) < constants.MAX_URL_LENGTH:
|
if len(tvg_logo) and len(tvg_logo) < constants.MAX_URL_LENGTH:
|
||||||
if is_valid_http_url(tvg_logo, timeout=0.1):
|
if is_valid_http_url(tvg_logo, timeout=0.1):
|
||||||
line.tvg_logo.append(tvg_logo)
|
line.tvg_logo.append(tvg_logo)
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,15 @@
|
||||||
<main>
|
<main>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="jumbotron text-center">
|
<div class="jumbotron text-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<a href={{ url_for('HomeView:signin') }} class="btn btn-warning">Sign In</a>
|
<a href={{ url_for('HomeView:signin') }} class="btn btn-warning">Sign In</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<a href={{ url_for('HomeView:signup') }} class="btn btn-warning">Sign Up</a>
|
<a href={{ url_for('HomeView:signup') }} class="btn btn-warning">Sign Up</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<a href={{ url_for('M3uParseView:show') }} class="btn btn-success">Meta</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h1>IPTV/Video cloud admin panel for <a href="https://github.com/fastogt/iptv">server</a></h1>
|
<h1>IPTV/Video cloud admin panel for <a href="https://github.com/fastogt/iptv">server</a></h1>
|
||||||
|
|
|
@ -87,7 +87,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<a href="{{ url_for('M3uParseView:show') }}" class="btn btn-warning"
|
<a href="{{ url_for('M3uParseView:show') }}" class="btn btn-success"
|
||||||
role="button">
|
role="button">
|
||||||
Meta
|
Meta
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue