Protect from re-downloading files
This commit is contained in:
parent
2d54442b8e
commit
4b907962d1
|
@ -132,6 +132,10 @@ function dl_track_from_json {
|
||||||
output="${dir}/${title}"
|
output="${dir}/${title}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -e "${output}.mp3"; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if test ! -e "${dir}/cover.jpg"; then
|
if test ! -e "${dir}/cover.jpg"; then
|
||||||
fetch_page "$(cat "$json" | jq -r '.cover.large_url' 2>/dev/null)" \
|
fetch_page "$(cat "$json" | jq -r '.cover.large_url' 2>/dev/null)" \
|
||||||
> "${dir}/cover.jpg"
|
> "${dir}/cover.jpg"
|
||||||
|
|
Ŝarĝante…
Reference in New Issue