Index: Purge orphan file entries #1559

This commit is contained in:
Michael Mayer
2021-09-30 15:50:10 +02:00
parent 46a25548c4
commit 0d772c4dc3
15 changed files with 224 additions and 46 deletions

View File

@@ -75,7 +75,9 @@ func indexAction(ctx *cli.Context) error {
}
indexed = w.Start(opt)
} else if w := service.Purge(); w != nil {
}
if w := service.Purge(); w != nil {
opt := photoprism.PurgeOptions{
Path: subPath,
Ignore: indexed,
@@ -86,7 +88,9 @@ func indexAction(ctx *cli.Context) error {
} else if len(files) > 0 || len(photos) > 0 {
log.Infof("purge: removed %d files and %d photos", len(files), len(photos))
}
} else if ctx.Bool("cleanup") {
}
if ctx.Bool("cleanup") {
w := service.CleanUp()
opt := photoprism.CleanUpOptions{