Make title from file metadata optional

This commit is contained in:
WithoutPants
2019-10-12 19:20:27 +11:00
parent d8b566250e
commit afcadd941b
12 changed files with 105 additions and 24 deletions

View File

@@ -11,7 +11,7 @@ import (
"github.com/stashapp/stash/pkg/utils"
)
func (s *singleton) Scan() {
func (s *singleton) Scan(nameFromMetadata bool) {
if s.Status != Idle {
return
}
@@ -31,7 +31,7 @@ func (s *singleton) Scan() {
var wg sync.WaitGroup
for _, path := range results {
wg.Add(1)
task := ScanTask{FilePath: path}
task := ScanTask{FilePath: path, NameFromMetadata: nameFromMetadata}
go task.Start(&wg)
wg.Wait()
}