Mac photos app stuck 'analysing photos'
I have my photo library on an external HD which is not always connected, so the photos app seems to forget where the library is. When I opened 'Photos Library.photoslibrary' again, the Photos app is stuck on 'analysing photos' etc. I've left it running, with mac screen on, plugged in, for a solid week but progress bar has not budged. Have tried this various times over the past year and it's never finished this process.
'Photos Library.photoslibrary' is 158GB.
Have seen this asked before and the advice seems to be 'just wait'. But this surely cannot be the answer. Is there another way? Or any advice on a different way to transfer photos from my phone to my Mac to backup and recover all the ones I've saved in Photos before? I don't want to store them all on icloud.
MacOS Sonoma Version 14.6.1
Thanks in advance.
MacBook Pro 13″, macOS 14.6