missing session stop command

session.stop(reason=KILL_MESSAGE)
This commit is contained in:
blacktwin 2017-11-06 10:25:28 -05:00 committed by GitHub
parent ce97452382
commit 5dbcb48093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,9 +92,9 @@ def kill_stream(session, xtime, ntime):
title = (session.grandparentTitle + ' - ' if session.type == 'episode' else '') + session.title
if state == 'paused' and xtime == ntime:
session.stop(reason=KILL_MESSAGE)
if AGENT_ID:
send_notification(SUBJECT_TEXT, BODY_TEXT.format(user=username, title=title))
session.stop(reason=KILL_MESSAGE)
return ntime
elif state in ('playing', 'buffering'):
sys.stdout.write("{user}'s stream of {title} is now {state}".format(user=username, title=title,