Skip to content

Commit

Permalink
coerce construcotr argument to float and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mtillmann committed Mar 9, 2024
1 parent da8c843 commit b8b52ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/Formats/Base.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b8b52ae

Please sign in to comment.