Add ranges to funscript heatmaps (#3373)

* Add range to funscript heatmaps
* Add config to draw heatmap range
* Add setting to UI
* Apply draw range setting

Includes some refactoring

---------

Co-authored-by: kermieisinthehouse <kermie@isinthe.house>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
pornstasche
2023-02-23 02:33:22 +01:00
committed by GitHub
parent 2b84392df7
commit 75a8d572cc
10 changed files with 145 additions and 31 deletions

View File

@@ -29,10 +29,11 @@ func (t *GenerateInteractiveHeatmapSpeedTask) Start(ctx context.Context) {
videoChecksum := t.Scene.GetHash(t.fileNamingAlgorithm)
funscriptPath := video.GetFunscriptPath(t.Scene.Path)
heatmapPath := instance.Paths.Scene.GetInteractiveHeatmapPath(videoChecksum)
drawRange := instance.Config.GetDrawFunscriptHeatmapRange()
generator := NewInteractiveHeatmapSpeedGenerator(funscriptPath, heatmapPath, t.Scene.Files.Primary().Duration)
generator := NewInteractiveHeatmapSpeedGenerator(drawRange)
err := generator.Generate()
err := generator.Generate(funscriptPath, heatmapPath, t.Scene.Files.Primary().Duration)
if err != nil {
logger.Errorf("error generating heatmap: %s", err.Error())