mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-16 21:10:37 +01:00
continuer de scanner meme si la chaine est désactivé
This commit is contained in:
@@ -9,12 +9,12 @@ from webapp import webapp
|
|||||||
|
|
||||||
async def checkOnlineStreamer(twitch: Twitch) :
|
async def checkOnlineStreamer(twitch: Twitch) :
|
||||||
with webapp.app_context() :
|
with webapp.app_context() :
|
||||||
alerts : list[LiveAlert] = LiveAlert.query.filter_by(enable = True).all()
|
alerts : list[LiveAlert] = LiveAlert.query.all()
|
||||||
streams = await _retreiveStreams(twitch, alerts)
|
streams = await _retreiveStreams(twitch, alerts)
|
||||||
for alert in alerts :
|
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 == alert.login), None)
|
||||||
if stream :
|
if stream :
|
||||||
if not alert.online :
|
if not alert.online and alert.enable :
|
||||||
await _notifyAlert(alert, stream)
|
await _notifyAlert(alert, stream)
|
||||||
alert.online = True
|
alert.online = True
|
||||||
else :
|
else :
|
||||||
|
|||||||
Reference in New Issue
Block a user