Backend: Set NSFW flag while indexing

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2019-12-14 20:35:14 +01:00
parent 78eae2f14e
commit 8cce9f7c8c
16 changed files with 75 additions and 27 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/internal/nsfw"
"github.com/photoprism/photoprism/internal/photoprism"
"github.com/urfave/cli"
)
@@ -39,8 +40,9 @@ func indexAction(ctx *cli.Context) error {
}
tensorFlow := photoprism.NewTensorFlow(conf)
nsfwDetector := nsfw.NewDetector(conf.NSFWModelPath())
indexer := photoprism.NewIndexer(conf, tensorFlow)
indexer := photoprism.NewIndexer(conf, tensorFlow, nsfwDetector)
options := photoprism.IndexerOptionsAll()
files := indexer.IndexOriginals(options)