Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit20d001a

Browse files
authored
fix: better funscript metadata handling (#1742)
Co-authored-by: crwxaj <crwxaj>
1 parent6a39b31 commit20d001a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎pkg/tasks/heatmap.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
// Script is the Funscript container type holding Launch data.
2121
typeScriptstruct {
2222
// Version of Launchscript
23-
Versionstring`json:"version"`
23+
Versioninterface{}`json:"version"`
2424
// Inverted causes up and down movement to be flipped.
2525
Invertedbool`json:"inverted,omitempty"`
2626
// Range is the percentage of a full stroke to use.
@@ -262,6 +262,11 @@ func (funscript Script) getDuration() float64 {
262262

263263
iffunscript.Metadata!=nil&&float64(funscript.Metadata.Duration)>duration {
264264
duration=float64(funscript.Metadata.Duration)
265+
266+
ifduration>50000 {
267+
// large values are likely in milliseconds
268+
duration=duration/1000.0
269+
}
265270
}
266271
returnduration
267272
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp