diff --git a/package.json b/package.json index a49e8da..9516f80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mtillmann/chapters", - "version": "0.1.0", + "version": "0.1.1", "description": "library that manages and converts chapters of multiple formats", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/Formats/Base.ts b/src/Formats/Base.ts index aabd455..57f73db 100644 --- a/src/Formats/Base.ts +++ b/src/Formats/Base.ts @@ -1,5 +1,5 @@ import filenamify from 'filenamify' -import { enforceMilliseconds, hash, secondsToTimestamp, toSeconds } from '../util' +import { enforceMilliseconds, hash, secondsToTimestamp, toSeconds, Float } from '../util' import { type MediaItemMeta } from '../Types/MediaItemMeta' import { type Chapter } from '../Types/Chapter' import { type MediaItem } from '../Types/MediaItem' @@ -31,7 +31,7 @@ export abstract class Base implements MediaItem { isChapterFormat: boolean = true constructor (duration: number = 3600) { - this.duration = duration + this.duration = Float(duration) } static create (input?: string | MediaItem, duration?: number): MediaItem {