mirror of
https://github.com/lutris/lutris
synced 2024-09-19 07:41:33 +00:00
Support seconds in formatted playtime
This commit is contained in:
parent
68d7fade47
commit
0c29b11427
|
@ -124,4 +124,10 @@ def get_formatted_playtime(playtime):
|
|||
else:
|
||||
minutes_text = ""
|
||||
|
||||
return " and ".join([text for text in (hours_text, minutes_text) if text]) or "0 minute"
|
||||
formatted_time = " and ".join([text for text in (hours_text, minutes_text) if text])
|
||||
if formatted_time:
|
||||
return formatted_time
|
||||
seconds = int(hours * 3600)
|
||||
if seconds:
|
||||
return "%d seconds" % seconds
|
||||
return "No play time recorded"
|
||||
|
|
Loading…
Reference in a new issue