Catch ValueError when getting string form of LastPlayed time, to catch times before 1970
This commit is contained in:
parent
49f7ce5f6e
commit
bb87a8740d
@ -35,7 +35,7 @@ def lastPlayedTime(adapter):
|
||||
time = adapter.metadata.LastPlayed
|
||||
dt = arrow.Arrow.fromtimestamp(time / 1000.0)
|
||||
return dt
|
||||
except AttributeError as e:
|
||||
except (AttributeError, ValueError) as e: # no lastplayed, or time is before 1970
|
||||
return None
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user