photoprism/internal/customize/download.go
Michael Mayer f5a8c5a45d Auth: Session and ACL enhancements #98 #1746
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-28 09:01:17 +02:00

31 lines
905 B
Go

package customize
type DownloadName string
const (
DownloadNameFile DownloadName = "file"
DownloadNameOriginal DownloadName = "original"
DownloadNameShare DownloadName = "share"
)
var DownloadNameDefault = DownloadNameFile
// DownloadSettings represents content download settings.
type DownloadSettings struct {
Name DownloadName `json:"name" yaml:"Name"`
Disabled bool `json:"disabled" yaml:"Disabled"`
Originals bool `json:"originals" yaml:"Originals"`
MediaRaw bool `json:"mediaRaw" yaml:"MediaRaw"`
MediaSidecar bool `json:"mediaSidecar" yaml:"MediaSidecar"`
}
// NewDownloadSettings creates download settings with defaults.
func NewDownloadSettings() DownloadSettings {
return DownloadSettings{
Name: DownloadNameDefault,
Disabled: false,
Originals: true,
MediaRaw: false,
MediaSidecar: false,
}
}