librephotos
librephotos copied to clipboard
issues with auto-album generation and missing photo deletion
Pull this morning but the problem was existing before! You know I have a problem with auto-album which stops at the middle of the generation. You helped me by creating a button allowing to reset the auto-album base. Using this button, I have been able to restart the generation and to note that the last generated album could be the problem. It looks very large: "24 days with xxx and yyy in zzz 2875 Photos". In order to validate this assumption, I suppressed a photo folder containing about 2600 item and launched a rescan. But now I'm stucked with 1542 "missing photos". The log says:
`2022-08-05 05:35:20,091 : autoalbum.py : delete_missing_photos : 232 : ERROR : An error occured Traceback (most recent call last): File "/code/api/autoalbum.py", line 225, in delete_missing_photos missing_photos.delete() File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py", line 746, in delete collector.collect(del_query) File "/usr/local/lib/python3.9/dist-packages/django/db/models/deletion.py", line 302, in collect raise ProtectedError( django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'Photo' because they are referenced through protected foreign keys: 'Person.cover_photo'.", {<Person: 87>})
Then, as I saw the error related to the cover photo of person 87, I changed the cover photo to point on a picture outside the deleted set of photos. I restarted "delete missing photos" and it worked !!!
Then the "large" auto-album being no more a problem, I restarted auto-album generation. It's now stucked on an other very large album "9 days with xxx and yyy in uuu and vvv 1699 Photos.
Tu sum-up, according to me 2 issues are raised: 1/ when photos are deleted, cover photos should be checked, 2/ generation of auto-album doesn't support large number of pictures (unknown limit for the time being).
I have been able to reproduce 2/ (auto-album generation) using a test base containing many photos taken at the same place (more or less) and at the same period of time. the limit between ok and not ok is between 2100 photos and 2140 photos in my case. Hope this will help!
I have been also easily able to reproduce 1/ (delete missing photos) using a small test base containing at least one known person with several faces. I selected manually a caver face, then I deleted the picture containing the cover in the appropriate folder. Then rescan 1 missing photo detected, then delete missing photos don't work. HTH
issue related to auto-generation should be now closed. "1/ delete missing photos stucked when related to album cover" remains.
I had the same symptoms as you, the latest release fixed it for me.