From e05d187a7786727bc77445c4c5b624d264e86b3e Mon Sep 17 00:00:00 2001 From: Stash Dev Date: Tue, 26 Mar 2019 09:45:08 -0700 Subject: [PATCH] Fixes * Added date to release body * Added AVI to the scan task * Fixed index out of bounds when generating sprites --- .travis.yml | 2 ++ pkg/manager/generator_sprite.go | 3 +++ pkg/manager/manager_tasks.go | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 99f2b7627..e39ee6da2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ before_deploy: - sh ./scripts/cross-compile.sh - git tag -f v0.0.0-alpha - git push -f --tags +- export RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z') deploy: provider: releases api_key: @@ -33,6 +34,7 @@ deploy: - dist/stash-linux skip_cleanup: true overwrite: true + body: ${RELEASE_DATE} on: repo: stashapp/stash branch: master diff --git a/pkg/manager/generator_sprite.go b/pkg/manager/generator_sprite.go index de68eea21..2897f8d9e 100644 --- a/pkg/manager/generator_sprite.go +++ b/pkg/manager/generator_sprite.go @@ -90,6 +90,9 @@ func (g *SpriteGenerator) generateSpriteImage(encoder *ffmpeg.Encoder) error { images = append(images, img) } + if len(images) == 0 { + return fmt.Errorf("images slice is empty, failed to generate sprite images for %s", g.Info.VideoFile.Path) + } width := images[0].Bounds().Size().X height := images[0].Bounds().Size().Y canvasWidth := width * g.Columns diff --git a/pkg/manager/manager_tasks.go b/pkg/manager/manager_tasks.go index 4afe5c96e..9e280f1f5 100644 --- a/pkg/manager/manager_tasks.go +++ b/pkg/manager/manager_tasks.go @@ -21,7 +21,7 @@ func (s *singleton) Scan() { var results []string for _, path := range config.GetStashPaths() { - globPath := filepath.Join(path, "**/*.{zip,m4v,mp4,mov,wmv}") + globPath := filepath.Join(path, "**/*.{zip,m4v,mp4,mov,wmv,avi}") globResults, _ := doublestar.Glob(globPath) results = append(results, globResults...) }