agross / immich-duplicates

Find image and video duplicates in Immich.
136 stars 5 forks source link

Preload setup fields when available via HTTP GET #22

Closed davidecavestro closed 4 months ago

davidecavestro commented 4 months ago

Would it make sense an automatic check for the dupes.json availability at a well known location from the same webserver serving this app?

Especially when containerized, we already have a web server which could be easily configured to expose contents mounted from volumes. Clearly avoiding collisions with the app router, the browser could issue an HTTP GET looking for any/path/to/preload/dupes.json and propose its content on the UI if available.

Potentially the same stands for other config fields...

agross commented 4 months ago

I'd say it would make things more complicated without providing a real benefit. Since the local dupes.json array is modified when you "Keep best asset" or ignore a group, the file from the webserver would deviate from the local array once you performed these actions. Under which circumstances would dupes.json be fetched again from the web server? If your local array is empty? When you refresh the browser? Every 5 minutes?

davidecavestro commented 4 months ago

I see... I meant to use it just at first load, not syncing it. OTOH other config would be static (api key and urls) so the whole thing wouldn't be so straightforward.