mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Restructure ffmpeg (#2392)
* Refactor transcode generation * Move phash generation into separate package * Refactor image thumbnail generation * Move JSONTime to separate package * Ffmpeg refactoring * Refactor live transcoding * Refactor scene marker preview generation * Refactor preview generation * Refactor screenshot generation * Refactor sprite generation * Change ffmpeg.IsStreamable to return error * Move frame rate calculation into ffmpeg * Refactor file locking * Refactor title set during scan * Add missing lockmanager instance * Return error instead of logging in MatchContainer
This commit is contained in:
@@ -126,34 +126,6 @@ func (s *singleton) RunSingleTask(ctx context.Context, t Task) int {
|
||||
return s.JobManager.Add(ctx, t.GetDescription(), j)
|
||||
}
|
||||
|
||||
func setGeneratePreviewOptionsInput(optionsInput *models.GeneratePreviewOptionsInput) {
|
||||
config := config.GetInstance()
|
||||
if optionsInput.PreviewSegments == nil {
|
||||
val := config.GetPreviewSegments()
|
||||
optionsInput.PreviewSegments = &val
|
||||
}
|
||||
|
||||
if optionsInput.PreviewSegmentDuration == nil {
|
||||
val := config.GetPreviewSegmentDuration()
|
||||
optionsInput.PreviewSegmentDuration = &val
|
||||
}
|
||||
|
||||
if optionsInput.PreviewExcludeStart == nil {
|
||||
val := config.GetPreviewExcludeStart()
|
||||
optionsInput.PreviewExcludeStart = &val
|
||||
}
|
||||
|
||||
if optionsInput.PreviewExcludeEnd == nil {
|
||||
val := config.GetPreviewExcludeEnd()
|
||||
optionsInput.PreviewExcludeEnd = &val
|
||||
}
|
||||
|
||||
if optionsInput.PreviewPreset == nil {
|
||||
val := config.GetPreviewPreset()
|
||||
optionsInput.PreviewPreset = &val
|
||||
}
|
||||
}
|
||||
|
||||
func (s *singleton) Generate(ctx context.Context, input models.GenerateMetadataInput) (int, error) {
|
||||
if err := s.validateFFMPEG(); err != nil {
|
||||
return 0, err
|
||||
|
||||
Reference in New Issue
Block a user