mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Playlist button
This commit is contained in:
parent
5e10d75651
commit
4603e99aec
2 changed files with 3 additions and 10 deletions
|
@ -116,13 +116,7 @@ class ServiceView(FlaskView):
|
||||||
server.get_log_service()
|
server.get_log_service()
|
||||||
return redirect(url_for('UserView:dashboard'))
|
return redirect(url_for('UserView:dashboard'))
|
||||||
|
|
||||||
@login_required
|
@route('/playlist/<sid>/master.m3u', methods=['GET'])
|
||||||
def view_playlist(self):
|
|
||||||
server = current_user.get_current_server()
|
|
||||||
if server:
|
|
||||||
return '<pre>{0}</pre>'.format(server.view_playlist())
|
|
||||||
return '''<pre>Not found, please create server firstly.</pre>'''
|
|
||||||
|
|
||||||
def playlist(self, sid):
|
def playlist(self, sid):
|
||||||
server = ServiceSettings.objects(id=sid).first()
|
server = ServiceSettings.objects(id=sid).first()
|
||||||
if server:
|
if server:
|
||||||
|
|
|
@ -45,8 +45,6 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
{{super()}}
|
{{super()}}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -128,7 +126,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<a href="{{ url_for('ServiceView:view_playlist') }}" class="btn btn-success" role="button">
|
<a href="{{ url_for('ServiceView:playlist', sid=service.id) }}" class="btn btn-success" role="button">
|
||||||
{% trans %}Playlist{% endtrans %}
|
{% trans %}Playlist{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -802,5 +800,6 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue