Xerbo / furaffinity-dl

FurAffinity Downloader, now with 100% more Python
BSD 3-Clause "New" or "Revised" License
91 stars 17 forks source link

Wrong filename for setting metadata when -r is used #23

Closed teleportingtortoise closed 5 years ago

teleportingtortoise commented 5 years ago

Pretty much what is says on the tin. It didn't crop up till many files into an update I was running but eventually it got to a file where it tried to update the exif but the exif section always uses $file so it causes an error when using the -r option.

I like the idea of names based on titles by the way, it's a nice touch! I just don't want to redownload everything cause it's a lot. On that note, when I first ran it with the option it made duplicates ending in numbers instead of skipping existing files if they're up to date. I manually added the -N flag to the wget lines and that seemed to fix it though.

Thank you for the work you've done on this script it's been very useful!

Xerbo commented 5 years ago

Hopefully fixed, let me know if it doesn't work for you.

teleportingtortoise commented 5 years ago

Seems to work great now, thank you!

In case you're interested here's the change I made to handle duplicate files, since -O overrides -N:

# Check if the file already exists
if [ -f "$file" ]; then
    echo "$file exists. Skipping."
else
    # Download the image
    wget "$image_url" -O "$file"
fi