You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
gilesknap
changed the title
Ave some time on restarting aborted indexing
Save some time on restarting aborted indexing
Jan 28, 2019
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.
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.
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.
The text was updated successfully, but these errors were encountered: