Avoid killing a non-WebStudio show if the connection drops (#135)

This commit is contained in:
Marks Polakovs 2020-06-16 12:05:47 +02:00 committed by GitHub
parent 87efff75cd
commit 36fadf7e58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -389,6 +389,8 @@ def post_wsSessions() -> Any:
if currentShow and currentShow["connid"] == conn["connid"]:
# they should be on air now, but they've just died. go to jukebox.
# but don't kill it during the news, or after the end time, to avoid unexpected jukeboxing
# Also, avoid killing them if they're on a non-WS source
if currentShow["sourceid"] == SOURCE_WS:
now = datetime.datetime.now().timestamp()
if now < (currentShow["endTimestamp"] - 15):
print("jukeboxing due to their disappearance...")