From 6143da5a6a37e7f9651c41664541a800c3cd73a1 Mon Sep 17 00:00:00 2001 From: zobe123 Date: Thu, 17 Dec 2015 23:25:29 +0100 Subject: [PATCH] Update pmsconnect.py some additions to Show readable transcode progress --- plexpy/pmsconnect.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index d52ff65a..2fc84a2f 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -815,7 +815,7 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, - 'transcode_progress': transcode_progress, + 'transcode_progress': int(round(helpers.cast_to_float(transcode_progress), 0)), 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, @@ -937,7 +937,7 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, - 'transcode_progress': transcode_progress, + 'transcode_progress': int(round(helpers.cast_to_float(transcode_progress), 0)), 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, @@ -994,7 +994,7 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, - 'transcode_progress': transcode_progress, + 'transcode_progress': int(round(helpers.cast_to_float(transcode_progress), 0)), 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, @@ -1051,7 +1051,7 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, - 'transcode_progress': transcode_progress, + 'transcode_progress': int(round(helpers.cast_to_float(transcode_progress), 0)), 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, @@ -1141,7 +1141,7 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, - 'transcode_progress': transcode_progress, + 'transcode_progress': int(round(helpers.cast_to_float(transcode_progress), 0)), 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': '', 'audio_channels': '', @@ -1700,4 +1700,4 @@ class PmsConnect(object): 'public_port': helpers.get_xml_attr(a, 'publicPort') } - return server_response \ No newline at end of file + return server_response