diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-02 18:30:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-02 18:30:26 +0200 |
commit | c47106315ae3c403239cda29c49b4bba51ddccb2 (patch) | |
tree | 526d2f3ba284dde6bc8d83699c0a78e86d7860eb /client/src/assets/player/utils.ts | |
parent | f421fa06ada7bb01d91142cc8211a65e2b390d7b (diff) | |
download | PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.tar.gz PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.tar.zst PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.zip |
tslint update
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r-- | client/src/assets/player/utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 54f131310..0966027ac 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -61,12 +61,12 @@ function secondsToTime (seconds: number, full = false, symbol?: string) { | |||
61 | const minuteSymbol = (symbol || 'm') | 61 | const minuteSymbol = (symbol || 'm') |
62 | const secondsSymbol = full ? '' : 's' | 62 | const secondsSymbol = full ? '' : 's' |
63 | 63 | ||
64 | let hours = Math.floor(seconds / 3600) | 64 | const hours = Math.floor(seconds / 3600) |
65 | if (hours >= 1) time = hours + hourSymbol | 65 | if (hours >= 1) time = hours + hourSymbol |
66 | else if (full) time = '0' + hourSymbol | 66 | else if (full) time = '0' + hourSymbol |
67 | 67 | ||
68 | seconds %= 3600 | 68 | seconds %= 3600 |
69 | let minutes = Math.floor(seconds / 60) | 69 | const minutes = Math.floor(seconds / 60) |
70 | if (minutes >= 1 && minutes < 10 && full) time += '0' + minutes + minuteSymbol | 70 | if (minutes >= 1 && minutes < 10 && full) time += '0' + minutes + minuteSymbol |
71 | else if (minutes >= 1) time += minutes + minuteSymbol | 71 | else if (minutes >= 1) time += minutes + minuteSymbol |
72 | else if (full) time += '00' + minuteSymbol | 72 | else if (full) time += '00' + minuteSymbol |