master
Aevann1 2022-01-22 11:15:18 +02:00
parent 17b98ac619
commit 4ff0f6ea99
4 changed files with 5 additions and 13 deletions

View File

@ -397,14 +397,6 @@ def get_profilecss(v, username):
resp.headers.add("Content-Type", "text/css")
return resp
@app.get("/songs/<id>")
def songs(id):
try: id = int(id)
except: return "", 400
user = g.db.query(User).filter_by(id=id).one_or_none()
if user and user.song: return redirect(f"/static/song/{user.song}.mp3")
else: abort(404)
@app.get("/@<username>/song")
def usersong(username):
user = get_user(username)

View File

@ -686,9 +686,9 @@
{% if u.song%}
{% if v and v.id == u.id %}
<div id="vid" class="d-none">{{v.id}}</div>
<div id="v_username" class="d-none">{{v.username}}</div>
{% else %}
<div id="uid" class="d-none">{{u.id}}</div>
<div id="u_username" class="d-none">{{u.username}}</div>
{% endif %}
{% endif %}
@ -698,7 +698,7 @@
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}
<script src="/static/assets/js/userpage.js?a=208"></script>
<script src="/static/assets/js/userpage.js?a=209"></script>
{% endblock %}

View File

@ -114,5 +114,5 @@
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}
<script src="/static/assets/js/userpage.js?a=208"></script>
<script src="/static/assets/js/userpage.js?a=209"></script>
{% endblock %}

View File

@ -48,5 +48,5 @@
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}
<script src="/static/assets/js/userpage.js?a=208"></script>
<script src="/static/assets/js/userpage.js?a=209"></script>
{% endblock %}