LibrePhotos / librephotos

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

Duplicated auto albums #462

Open derneuere opened 2 years ago

derneuere commented 2 years ago

A couple of users reported, that they have duplicated auto albums. It is not yet clear how that happened and should be investigated. A temporary fix would be to allow for deletion of auto albums.

WoollyMammal commented 2 years ago

I had a thought about this, untested as yet though. I think the duplicated auto-albums might be because images are added within a date range that was already included as an autoalbum. As in:

The full fix would be to detect new photos and which autoalbums already exist over that time period, then add the photo to that auto-album. The hacky fix would be to just delete all autoalbums and rerun the creation every time the "create autoalbums" button is pushed.

Note that adding a photo to an autoalbum may extend the autoalbum date range, which may result in having to merge two previous autoalbums. E.g: Autoalbum 1 is over the weekend, autoalbum 2 is for tuesday and wednesday. Adding a photo from the monday should merge autoalbum 1 and 2 into one big autoalbum, as every photo is linked by less than 24 hours.