mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Backend: Set NSFW flag while indexing
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user