Merge pull request #770 from croneter/fix-timesync

Fix float() argument must be a string or a number
This commit is contained in:
croneter 2019-03-17 17:57:35 +01:00 committed by GitHub
commit 0ee65b9f6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,9 +90,9 @@ def sync_pms_time():
# Toggle watched state back
PF.scrobble(plex_id, 'unwatched')
try:
plextime = xml[0].get('lastViewedAt')
except (IndexError, TypeError, AttributeError):
LOG.error('Could not get lastViewedAt - aborting')
plextime = xml[0].attrib['lastViewedAt']
except (IndexError, TypeError, AttributeError, KeyError):
LOG.warn('Could not get lastViewedAt - aborting')
return False
# Calculate time offset Kodi-PMS