3ccad67622
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
29 lines
531 B
Go
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
|
|
}
|