mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Merge branch 'develop' into feature/custom-tf-model-127
This commit is contained in:
@@ -41,8 +41,10 @@ func findAction(ctx *cli.Context) error {
|
||||
|
||||
defer conf.Shutdown()
|
||||
|
||||
filter := strings.TrimSpace(strings.Join(ctx.Args().Slice(), " "))
|
||||
|
||||
frm := form.SearchPhotos{
|
||||
Query: strings.TrimSpace(ctx.Args().First()),
|
||||
Query: filter,
|
||||
Primary: false,
|
||||
Merged: false,
|
||||
Count: ctx.Int("count"),
|
||||
|
||||
@@ -76,7 +76,7 @@ func resetAction(ctx *cli.Context) error {
|
||||
IsConfirm: true,
|
||||
}
|
||||
|
||||
if _, err := removeIndexPrompt.Run(); err == nil {
|
||||
if _, err = removeIndexPrompt.Run(); err == nil {
|
||||
confirmed = true
|
||||
} else {
|
||||
log.Infof("keeping index database")
|
||||
@@ -99,7 +99,7 @@ func resetAction(ctx *cli.Context) error {
|
||||
IsConfirm: true,
|
||||
}
|
||||
|
||||
if _, err := removeCachePrompt.Run(); err == nil {
|
||||
if _, err = removeCachePrompt.Run(); err == nil {
|
||||
resetCache(conf)
|
||||
} else {
|
||||
log.Infof("keeping cache files")
|
||||
@@ -111,7 +111,7 @@ func resetAction(ctx *cli.Context) error {
|
||||
IsConfirm: true,
|
||||
}
|
||||
|
||||
if _, err := removeSidecarJsonPrompt.Run(); err == nil {
|
||||
if _, err = removeSidecarJsonPrompt.Run(); err == nil {
|
||||
resetSidecarJson(conf)
|
||||
} else {
|
||||
log.Infof("keeping *.json sidecar files")
|
||||
@@ -123,7 +123,7 @@ func resetAction(ctx *cli.Context) error {
|
||||
IsConfirm: true,
|
||||
}
|
||||
|
||||
if _, err := removeSidecarYamlPrompt.Run(); err == nil {
|
||||
if _, err = removeSidecarYamlPrompt.Run(); err == nil {
|
||||
resetSidecarYaml(conf)
|
||||
} else {
|
||||
log.Infof("keeping *.yml metadata files")
|
||||
@@ -135,13 +135,13 @@ func resetAction(ctx *cli.Context) error {
|
||||
IsConfirm: true,
|
||||
}
|
||||
|
||||
if _, err := removeAlbumYamlPrompt.Run(); err == nil {
|
||||
if _, err = removeAlbumYamlPrompt.Run(); err == nil {
|
||||
start := time.Now()
|
||||
|
||||
matches, err := filepath.Glob(regexp.QuoteMeta(conf.BackupAlbumsPath()) + "/**/*.yml")
|
||||
matches, globErr := filepath.Glob(regexp.QuoteMeta(conf.BackupAlbumsPath()) + "/**/*.yml")
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
if globErr != nil {
|
||||
return globErr
|
||||
}
|
||||
|
||||
if len(matches) > 0 {
|
||||
|
||||
@@ -41,8 +41,9 @@ var VisionRunCommand = &cli.Command{
|
||||
func visionRunAction(ctx *cli.Context) error {
|
||||
return CallWithDependencies(ctx, func(conf *config.Config) error {
|
||||
worker := workers.NewVision(conf)
|
||||
filter := strings.TrimSpace(strings.Join(ctx.Args().Slice(), " "))
|
||||
return worker.Start(
|
||||
strings.TrimSpace(ctx.Args().First()),
|
||||
filter,
|
||||
vision.ParseTypes(ctx.String("models")),
|
||||
ctx.String("source"),
|
||||
ctx.Bool("force"),
|
||||
|
||||
Reference in New Issue
Block a user