[Player] Fix time display
This commit is contained in:
parent
2b2f1c2b66
commit
ec04ebee66
@ -135,8 +135,9 @@ const PlayerItem = ({ player }: { player: AstalMpris.Player }) => {
|
||||
};
|
||||
|
||||
const secondsToFriendlyTime = (time: number) => {
|
||||
const minutes = Math.floor(time / 60);
|
||||
const hours = Math.floor(minutes / 60);
|
||||
const m = Math.floor(time / 60);
|
||||
const minutes = Math.floor(m % 60);
|
||||
const hours = Math.floor(m / 60 % 24);
|
||||
const seconds = Math.floor(time % 60);
|
||||
if (hours > 0) {
|
||||
return `${hours}:${expandTime(minutes)}:${expandTime(seconds)}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user