LibrePhotos / librephotos

A self-hosted open source photo management service. This is the repository of the backend.
MIT License
7.01k stars 309 forks source link

Modify frontend calls for rebuildfaissindex #121

Closed robertcontois closed 3 years ago

robertcontois commented 3 years ago

Currently, after scanning for photos the front end makes a call to /api/rebuildfaissindex/ on the backend, but that endpoint doesn't exist. This throws a message on the backend "Not Found: /api/rebuildfaissindex/"

librephotos-frontend/src/actions/utilActions.js

Screen Shot 2021-01-09 at 3 33 16 PM Screen Shot 2021-01-09 at 3 25 24 PM

We should either remove the call from the frontend or add it to the backend. It looks like the similarity index is already being built after the scan on the backend already.

derneuere commented 3 years ago

That is correct. Currently, the function call to rebuild the similarity index is after a scan but in the backend only. Should be save to delete. https://github.com/LibrePhotos/librephotos/blob/2e3c4669650b8e3fe8fce59bfbaac871d834671f/api/directory_watcher.py#L179-L189