From 05d3242f22565edf772bab880c0647ce45829962 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 18 Apr 2016 12:30:00 +0200 Subject: [PATCH] Include Plex resume data in CreateListItem --- resources/lib/PlexAPI.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 2de47430..4bd1f259 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -2172,6 +2172,11 @@ class API(): 'mpaa': self.getMpaa(), 'aired': self.getPremiereDate() } + try: + except ZeroDivisionError: + PercentPlayed = 0.0 + if PercentPlayed > 0: + metadata['PercentPlayed'] = PercentPlayed if self.getType() == "episode": # Only for tv shows