Skip to content

Commit

Permalink
🎨 (movie): Clean up duration calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Apr 12, 2023
1 parent 9761100 commit 9060cca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/movie/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewFromFile(path string, src io.Reader, pad Padding, progressPad Padding) (
return m, err
}

f.Duration = time.Duration(float64(v)*(1000.0/15.0)) * time.Millisecond
f.Duration = time.Duration(v) * time.Second / 15
} else {
if len(scanner.Bytes()) > maxWidth {
maxWidth = len(scanner.Bytes())
Expand Down

0 comments on commit 9060cca

Please sign in to comment.