fix /live

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-09-23 00:27:38 +02:00
parent ada5ab61a6
commit 495cc60a26
2 changed files with 24 additions and 13 deletions

View File

@ -492,8 +492,8 @@ if SITE == 'pcmemes.net':
g.db.flush() g.db.flush()
if v.id != KIPPY_ID: if v.id != KIPPY_ID:
send_repeatable_notification(KIPPY_ID, f"@{v.username} has added a [new YouTube channel](https://www.youtube.com/channel/{streamer.id})") send_repeatable_notification(KIPPY_ID, f"@{v.username} has added a [new YouTube channel](https://www.youtube.com/channel/{streamer.id})")
cache.delete_memoized(live_cached)
return redirect('/live') return render_template('live.html', v=v, live=live_cached()[0], offline=live_cached()[1], msg="Channel added successfuly!")
@app.post('/live/remove') @app.post('/live/remove')
@admin_level_required(2) @admin_level_required(2)
@ -505,5 +505,5 @@ if SITE == 'pcmemes.net':
if v.id != KIPPY_ID: if v.id != KIPPY_ID:
send_repeatable_notification(KIPPY_ID, f"@{v.username} has removed a [YouTube channel](https://www.youtube.com/channel/{streamer.id})") send_repeatable_notification(KIPPY_ID, f"@{v.username} has removed a [YouTube channel](https://www.youtube.com/channel/{streamer.id})")
g.db.delete(streamer) g.db.delete(streamer)
cache.delete_memoized(live_cached)
return redirect('/live') return render_template('live.html', v=v, live=live_cached()[0], offline=live_cached()[1], msg="Channel removed successfuly!")

View File

@ -21,15 +21,26 @@
</script> </script>
{% if error %} {% if error %}
<div class="alert alert-danger alert-dismissible fade show d-flex my-3" role="alert"> <div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
<i class="fas fa-exclamation-circle my-auto"></i> <i class="fas fa-exclamation-circle my-auto"></i>
<span> <span>
{{error}} {{error}}
</span> </span>
<button class="close" data-bs-dismiss="alert" aria-label="Close"> <button class="close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true"><i class="far fa-times"></i></span> <span aria-hidden="true"><i class="far fa-times"></i></span>
</button> </button>
</div> </div>
{% endif %}
{% if msg %}
<div class="alert alert-success alert-dismissible fade show my-3" role="alert">
<i class="fas fa-check-circle my-auto" aria-hidden="true"></i>
<span>
{{msg}}
</span>
<button class="close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
{% endif %} {% endif %}
<div class="px-2"> <div class="px-2">