mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Fix chapters extract
This commit is contained in:
parent
76dbe843d1
commit
6495764268
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ function isLastWeek (d: Date) {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export const timecodeRegexString = `((\\d+)[h:])?((\\d+)[m:])?((\\d+)s?)?`
|
||||
export const timecodeRegexString = `((\\d+)[h:])?((\\d+)[m:])?((\\d+)s?)`
|
||||
|
||||
function timeToInt (time: number | string) {
|
||||
if (!time) return 0
|
||||
|
@ -53,7 +53,6 @@ function timeToInt (time: number | string) {
|
|||
|
||||
const reg = new RegExp(`^${timecodeRegexString}$`)
|
||||
const matches = time.match(reg)
|
||||
|
||||
if (!matches) return 0
|
||||
|
||||
const hours = parseInt(matches[2] || '0', 10)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue