andyjsmith / SmugMug-Downloader

Download all the images from a SmugMug user
49 stars 20 forks source link

Doesn't seem to handle absent or duplicate filenames #10

Open mdmbkr opened 3 years ago

mdmbkr commented 3 years ago

Edit: I originally described this issue as "improper handling of duplicate filenames" but it also doesn't handle images with no filename. Somehow I have several galleries containing numerous images with no filename. When I download those galleries via SmugMug's web interface, the resulting zipfile contains images named .jpg, -1.jpg, -2.jpg etc.

I did an Extremely Crude Hack to add an incrementing number to every filename and it does allow the script to get past this problem. However, this also means that there's no file extension on images with a blank filename.

2nd edit: A separate but possibly related issue is that it's possible to have more than one gallery with the same name. Trying to use smdl to retrieve such a gallery leads to a crash. I thought there might be an issue with multiple identically named galleries, but it's really just the empty filename issue happening. However, there's no way to download just one of those multiple galleries - perhaps it would be possible to specify the "URL name" for the gallery, just like what's used for creating the image directories on disk?

andyjsmith commented 3 years ago

If you let me know an example user and album with empty filenames I can see what I can do to address this