Catch ValueError when getting string form of LastPlayed time, to catch times before 1970

This commit is contained in:
David Vierra 2015-04-03 07:51:37 -10:00
parent 49f7ce5f6e
commit bb87a8740d

View File

@ -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