fix: back off preview on ffmpeg kill

This commit is contained in:
2026-04-18 22:01:15 +02:00
parent c29a69d381
commit e0cc8fbd50
3 changed files with 69 additions and 1 deletions

View File

@@ -28,6 +28,8 @@ type Service struct {
previewRoot string
previewMu sync.Mutex
previewLocks map[string]*sync.Mutex
previewFailMu sync.Mutex
previewFailTTL map[string]time.Time
}
type sourceScore struct {
@@ -47,6 +49,7 @@ func NewService(jikanClient *jikan.Client, db database.Querier) *Service {
db: db,
previewRoot: newPreviewRootDir(),
previewLocks: make(map[string]*sync.Mutex),
previewFailTTL: make(map[string]time.Time),
}
}