Fix #307 - Nonsense value for LastPlayed?
This commit is contained in:
parent
9c2b991289
commit
6234f25226
@ -70,7 +70,12 @@ class WorldListItemWidget(QtGui.QWidget):
|
||||
def setWorldInfo(self, (name, lastPlayed, versionInfo)):
|
||||
self.displayNameLabel.setText(name)
|
||||
if lastPlayed:
|
||||
try:
|
||||
lastPlayedText = arrow.Arrow.fromtimestamp(lastPlayed / 1000.0).humanize()
|
||||
except ValueError:
|
||||
# Nonsense value for LastPlayed?
|
||||
lastPlayedText = "Unknown (Timestamp %s)" % (lastPlayed / 1000.0,)
|
||||
|
||||
self.lastPlayedLabel.setText(lastPlayedText)
|
||||
else:
|
||||
self.lastPlayedLabel.setText("")
|
||||
|
Reference in New Issue
Block a user