Ajout de la gestion de l'édition des commandes Twitch et des logs de modération. Implémentation d'un endpoint pour modifier les commandes existantes avec validation des données et gestion des permissions. Ajout d'un endpoint pour récupérer les logs de modération récents, améliorant ainsi la traçabilité des actions. Mise à jour de l'interface pour intégrer un système de notifications et des animations.
This commit is contained in:
@@ -47,7 +47,13 @@ async def checkOnlineStreamer(twitch: Twitch) :
|
||||
global _live_alert_first_check
|
||||
with webapp.app_context() :
|
||||
alerts : list[LiveAlert] = LiveAlert.query.all()
|
||||
streams = await _retreiveStreams(twitch, alerts)
|
||||
|
||||
try:
|
||||
streams = await _retreiveStreams(twitch, alerts)
|
||||
except Exception as e:
|
||||
logger.error(f'Erreur lors de la récupération des streams, on conserve l\'état actuel : {e}')
|
||||
return
|
||||
|
||||
watch_stream = None
|
||||
|
||||
# Récupération du statut du live principal (channel configuré)
|
||||
@@ -69,7 +75,7 @@ async def checkOnlineStreamer(twitch: Twitch) :
|
||||
if _live_alert_first_check:
|
||||
logger.info('Live Alert: première vérification, synchronisation sans notification')
|
||||
for alert in alerts:
|
||||
stream = next((s for s in streams if s.user_login == alert.login), None)
|
||||
stream = next((s for s in streams if s.user_login.lower() == (alert.login or '').lower()), None)
|
||||
if stream:
|
||||
alert.online = True
|
||||
if alert.watch_activity and alert.enable:
|
||||
@@ -83,7 +89,7 @@ async def checkOnlineStreamer(twitch: Twitch) :
|
||||
|
||||
# Vérifications normales ensuite
|
||||
for alert in alerts :
|
||||
stream = next((s for s in streams if s.user_login == alert.login), None)
|
||||
stream = next((s for s in streams if s.user_login.lower() == (alert.login or '').lower()), None)
|
||||
if stream :
|
||||
logger.info(f'Streamer en ligne : {alert.login}')
|
||||
if not alert.online and alert.enable :
|
||||
|
||||
Reference in New Issue
Block a user