Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save some time on restarting aborted indexing #47

Closed
gilesknap opened this issue Jan 28, 2019 · 1 comment
Closed

Save some time on restarting aborted indexing #47

gilesknap opened this issue Jan 28, 2019 · 1 comment

Comments

@gilesknap
Copy link
Owner

gilesknap commented Jan 28, 2019

Currently, because the mediaItem results are only delivered in reverse date order I do not save the 'most recently indexed' date unless a complete index has occurred (i.e. back to the earliest file in the photos library).

However, all subsequent scans could do the following to make sure all items are eventually scanned.

  • Search the database for the earliest file and latest file
  • Use the earliest file date to do a scan for all files before earliest
  • Use the newest file date to do a scan for all files after the latest

This double scan approach negates the need for a completed scan before any incremental scans.
CAVEAT: I have noticed there is a difference between using mediaItems.list() and mediaItems.find() with no filters. For some reason, the latter misses a few (obscure format?) files.
CAVEAT2: I have also seen an issue with my library that a date range search always stops at 2010/09 (probably some strange meta on a photo)
TODO - try this approach and investigate how many files I miss in my photos library.

@gilesknap gilesknap changed the title Ave some time on restarting aborted indexing Save some time on restarting aborted indexing Jan 28, 2019
@gilesknap gilesknap added this to the v2.2 milestone Jan 30, 2019
@gilesknap
Copy link
Owner Author

updated the description with an additional caveat. This is a low impact enhancement which is likely crippled by some weird behaviour in the API. Won't fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant