Skip to content

Commit

Permalink
serve: respect ShowFullAnimation (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
matslina authored Feb 8, 2023
1 parent c092c7d commit 53dc63b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ func (l *Loader) loadApplet(config map[string]string) (string, error) {
return "", fmt.Errorf("error running script: %w", err)
}

webp, err := encode.ScreensFromRoots(roots).EncodeWebP(l.maxDuration)
screens := encode.ScreensFromRoots(roots)

maxDuration := l.maxDuration
if screens.ShowFullAnimation {
maxDuration = 0
}
webp, err := screens.EncodeWebP(maxDuration)
if err != nil {
return "", fmt.Errorf("error rendering: %w", err)
}
Expand Down

0 comments on commit 53dc63b

Please sign in to comment.