photoprism/internal/photoprism/index_options.go
Michael Mayer 3ccad67622 Index and import subdirectories #258
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-06 15:53:47 +02:00

29 lines
531 B
Go

package photoprism
type IndexOptions struct {
Path string
Rescan bool
Convert bool
}
func (o *IndexOptions) SkipUnchanged() bool {
return !o.Rescan
}
// IndexOptionsAll returns new index options with all options set to true.
func IndexOptionsAll() IndexOptions {
result := IndexOptions{
Path: "/",
Rescan: true,
Convert: true,
}
return result
}
// IndexOptionsNone returns new index options with all options set to false.
func IndexOptionsNone() IndexOptions {
result := IndexOptions{}
return result
}