Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
teleportingtortoise opened this issue Aug 27, 2019 · 2 comments
Closed

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

teleportingtortoise opened this issue Aug 27, 2019 · 2 comments

Comments

@teleportingtortoise
Copy link

teleportingtortoise commented Aug 27, 2019

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 added a commit that referenced this issue Aug 29, 2019
Spaces -> tabs
Stop paramater expansion
@Xerbo
Copy link
Owner

Xerbo commented Aug 29, 2019

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

@teleportingtortoise
Copy link
Author

teleportingtortoise commented Sep 2, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants