don't download already downloaded images
This commit is contained in:
parent
794f868933
commit
428425bab7
1 changed files with 3 additions and 1 deletions
|
@ -97,6 +97,8 @@ if [ "${ITEM_PAGE}" -gt 0 ]; then
|
||||||
fi
|
fi
|
||||||
IMAGE_URL="$(echo "${RESULT}" | jq -r ".data[${ITEM_NUMBER}].path")"
|
IMAGE_URL="$(echo "${RESULT}" | jq -r ".data[${ITEM_NUMBER}].path")"
|
||||||
FILENAME="${IMAGE_URL##*/}"
|
FILENAME="${IMAGE_URL##*/}"
|
||||||
|
if [ ! -f "${DIR}/${FILENAME}" ]; then
|
||||||
curl --silent -L --output-dir "${DIR}" -o "${FILENAME}" "${IMAGE_URL}"
|
curl --silent -L --output-dir "${DIR}" -o "${FILENAME}" "${IMAGE_URL}"
|
||||||
|
fi
|
||||||
echo "${DIR}/${FILENAME}"
|
echo "${DIR}/${FILENAME}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue