mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
[CLI]: Provide the option to skip unchanged files #154
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @linosgian on GitHub (Jan 11, 2020).
Originally assigned to: @linosgian on GitHub.
As shown below in the API's
StartIndexroute, an option can be passed to skip indexing photos that haven't changed and thus reduce indexing time.github.com/photoprism/photoprism@ba9b3cad72/internal/api/index.go (L89-L93)In the CLI's
indexcommand there seems to be no such option:github.com/photoprism/photoprism@ba9b3cad72/internal/commands/index.go (L48-L49)I am syncing photos from multiple devices to a single directory, so I'd like to be able to create a cronjob to periodically index photos, but currently it takes too many resources to do it hourly. If I was able to skip unchanged files, it should be feasible.
@lastzero commented on GitHub (Jan 11, 2020):
You are absolutely right... should be done.
@marcoamorales commented on GitHub (Jan 17, 2020):
I'd like to help with this.. fairly new to the project though @lastzero if you could provide any pointers to find which files have been indexed already, I would really appreciate that :)
@lastzero commented on GitHub (Jan 20, 2020):
@marcoamorales You have to add command flags to https://github.com/photoprism/photoprism/blob/develop/internal/commands/index.go
See https://github.com/photoprism/photoprism/blob/develop/internal/commands/thumbnails.go for how to do that ("force" flag).
Main task is to think about what flags to add and how to name them. Probably "all" (short "a") makes sense. Code would look like:
@lastzero commented on GitHub (Jan 20, 2020):
Make sure to run tests before pushing / committing code:
make test-goShould be described in our Developer Guide (see Wiki). If anything is unclear, let us know!
@lastzero commented on GitHub (Jan 22, 2020):
Used the opportunity to improve our command help... will merge to master now.
If this solves your issue, you can close the ticket :)
@lastzero commented on GitHub (Jan 22, 2020):
Build is running: https://travis-ci.org/photoprism/photoprism/builds/640370213
I'll also start a build for arm64 (using our own hardware)
@linosgian commented on GitHub (Jan 22, 2020):
I've tested this one, it works perfectly! :)