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
1 changed files with 1 additions and 1 deletions

View File

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