Enable conversion in readonly mode if sidecar path is set #268 #348

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-06-07 10:29:54 +02:00
parent a91206a509
commit aeb889aeff
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ func StartIndexing(router *gin.RouterGroup, conf *config.Config) {
indOpt := photoprism.IndexOptions{
Rescan: f.Rescan,
Convert: f.Convert && !conf.ReadOnly(),
Convert: f.Convert && (!conf.ReadOnly() || filepath.IsAbs(conf.SidecarPath())),
Path: filepath.Clean(f.Path),
}

View file

@ -65,7 +65,7 @@ func indexAction(ctx *cli.Context) error {
indOpt := photoprism.IndexOptions{
Path: subPath,
Rescan: ctx.Bool("all"),
Convert: conf.Settings().Index.Convert && !conf.ReadOnly(),
Convert: conf.Settings().Index.Convert && (!conf.ReadOnly() || filepath.IsAbs(conf.SidecarPath())),
}
indexed := ind.Start(indOpt)