1
0
Fork 0
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:
Chocobozzz 2023-08-30 19:24:01 +02:00
parent 76dbe843d1
commit 6495764268
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 2 additions and 2 deletions

View file

@ -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)