photoprism/internal/photoprism/index_options.go

30 lines
531 B
Go
Raw Normal View History

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
}