From 5c952b1d8624e0fe29359ec92429572231d40307 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 9 Feb 2016 17:08:44 -0800 Subject: [PATCH] Fix regression where {stream_duration} not reported --- plexpy/notification_handler.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 7b5ec947..a4234a9f 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -446,10 +446,9 @@ def build_notify_text(session=None, timeline=None, state=None): transcode_decision = 'Direct Play' if state != 'play': - stream_duration = helpers.convert_seconds_to_minutes( - time.time() - - helpers.cast_to_int(session.get('started', 0)) - - helpers.cast_to_int(session.get('paused_counter', 0))) + stream_duration = int((time.time() - + helpers.cast_to_int(session.get('started', 0)) - + helpers.cast_to_int(session.get('paused_counter', 0))) / 60) else: stream_duration = 0