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()
|
||||
return redirect(url_for('UserView:dashboard'))
|
||||
|
||||
@login_required
|
||||
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>'''
|
||||
|
||||
@route('/playlist/<sid>/master.m3u', methods=['GET'])
|
||||
def playlist(self, sid):
|
||||
server = ServiceSettings.objects(id=sid).first()
|
||||
if server:
|
||||
|
|
|
@ -45,8 +45,6 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
|||
width: 25%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
{{super()}}
|
||||
{% endblock %}
|
||||
|
@ -128,7 +126,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
|||
</a>
|
||||
</div>
|
||||
<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 %}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -802,5 +800,6 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue