fix map error when new server plugin is not installed

This commit is contained in:
Shaun 2016-02-05 10:02:04 +11:00
parent 01ab7c7a29
commit d75af5009b

View file

@ -112,7 +112,7 @@ class LibrarySync(threading.Thread):
url = "{server}/Emby.Kodi.SyncQueue/GetServerDateTime?format=json" url = "{server}/Emby.Kodi.SyncQueue/GetServerDateTime?format=json"
result = self.doUtils.downloadUrl(url) result = self.doUtils.downloadUrl(url)
retention_time = "2010-01-01T00:00:00Z" retention_time = "2010-01-01T00:00:00Z"
if result and result['RetentionDateTime']: if result and result.get("RetentionDateTime"):
self.logMsg("RetentionDateTime Found", 1) self.logMsg("RetentionDateTime Found", 1)
retention_time = result['RetentionDateTime'] retention_time = result['RetentionDateTime']
retention_time = datetime.strptime(retention_time, "%Y-%m-%dT%H:%M:%SZ") retention_time = datetime.strptime(retention_time, "%Y-%m-%dT%H:%M:%SZ")