mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Download: Add Disabled, Originals, MediaRaw & MediaSidecar Flags #2234
Extends DownloadSettings with 4 additional options: - Name: File name pattern for downloaded files (existed) - Disabled: Disables downloads - Originals: Only download files stored in "originals" folder - MediaRaw: Include RAW image files - MediaSidecar: Include metadata sidecar files (JSON, XMP, YAML)
This commit is contained in:
@@ -18,8 +18,8 @@ import (
|
||||
"github.com/photoprism/photoprism/internal/entity"
|
||||
"github.com/photoprism/photoprism/internal/photoprism"
|
||||
"github.com/photoprism/photoprism/internal/service"
|
||||
"github.com/photoprism/photoprism/pkg/clean"
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
"github.com/photoprism/photoprism/pkg/sanitize"
|
||||
)
|
||||
|
||||
const restoreDescription = "A user-defined SQL dump FILENAME can be passed as the first argument. " +
|
||||
@@ -124,7 +124,7 @@ func restoreAction(ctx *cli.Context) error {
|
||||
log.Warnf("replacing existing index with %d photos", counts.Photos)
|
||||
}
|
||||
|
||||
log.Infof("restoring index from %s", sanitize.Log(indexFileName))
|
||||
log.Infof("restoring index from %s", clean.Log(indexFileName))
|
||||
|
||||
sqlBackup, err := os.ReadFile(indexFileName)
|
||||
|
||||
@@ -203,9 +203,9 @@ func restoreAction(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
if !fs.PathExists(albumsPath) {
|
||||
log.Warnf("album files path %s not found", sanitize.Log(albumsPath))
|
||||
log.Warnf("album files path %s not found", clean.Log(albumsPath))
|
||||
} else {
|
||||
log.Infof("restoring albums from %s", sanitize.Log(albumsPath))
|
||||
log.Infof("restoring albums from %s", clean.Log(albumsPath))
|
||||
|
||||
if count, err := photoprism.RestoreAlbums(albumsPath, true); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user