mtalcott / google-photos-deduper

Locally run web app and Chrome extension to remove duplicates from Google Photos
MIT License
208 stars 18 forks source link

Fix KeyError: storageFilename by deleting mediaItems from collection if unable to download image #36

Closed mtalcott closed 10 months ago

mtalcott commented 10 months ago

Addresses https://github.com/mtalcott/google-photos-deduper/issues/23 and https://github.com/mtalcott/google-photos-deduper/discussions/31#discussioncomment-8034886.

Displaying and processing mediaItems requires we have an actual image file to work with (referenced by storageFilename). If we are unable to obtain an image for a particular mediaItem, we'll delete the mediaItem from the collection (rather than adding logic to handle this case everywhere else).