From c6e635b39b3315631f597c5ae4f2cd2f9073b1dc Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 16 Mar 2019 17:34:47 +0100 Subject: [PATCH] Fix float() argument must be a string or a number --- resources/lib/library_sync/time.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/library_sync/time.py b/resources/lib/library_sync/time.py index 197a084b..55ccb7b2 100644 --- a/resources/lib/library_sync/time.py +++ b/resources/lib/library_sync/time.py @@ -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