fixed CurrentPlace being bellow 1
This commit is contained in:
1 parent
3e07ef0806
commit
d601d11e4b
1 file changed
+4
@@ -896,6 +896,10 @@ class CurrentPlace(Static):
|
|||||||
def render(self) -> RenderResult:
|
def render(self) -> RenderResult:
|
||||||
place_in_seconds = self.place // 1000
|
place_in_seconds = self.place // 1000
|
||||||
place_min, place_sec = divmod(place_in_seconds, 60)
|
place_min, place_sec = divmod(place_in_seconds, 60)
|
||||||
|
|
||||||
|
place_min = max(0, place_min)
|
||||||
|
place_sec = max(0, place_sec)
|
||||||
|
|
||||||
place_formatted = f"{place_min:02d}:{place_sec:02d}"
|
place_formatted = f"{place_min:02d}:{place_sec:02d}"
|
||||||
|
|
||||||
return place_formatted
|
return place_formatted
|
||||||
|
|||||||
Reference in new issue
Block a user