From 53c07d4b506756fe3fe8bbe4e2eb6e3b41bad1bf Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 13 Mar 2016 14:50:29 +0100 Subject: [PATCH] Fix Recently Added Plex time was not converted to Kodi time --- resources/lib/PlexAPI.py | 2 +- resources/lib/utils.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index b65e9e4d..00567cfa 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1513,7 +1513,7 @@ class API(): """ Returns the date when this library item was created """ - return utils.DateToKodi(self.item.attrib.get('addedAt', None)) + return utils.DateToKodi(self.item.attrib.get('addedAt')) def getUserData(self): """ diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 53ac5c38..343efd05 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -7,7 +7,8 @@ import inspect import json import pstats import sqlite3 -from datetime import datetime, time, timedelta +from datetime import datetime, timedelta +import time import unicodedata import xml.etree.ElementTree as etree from functools import wraps @@ -545,7 +546,7 @@ def startProfiling(): return pr def stopProfiling(pr, profileName): - + from datetime import time pr.disable() ps = pstats.Stats(pr)