Commit 4b907962 authored by detruota's avatar detruota
Browse files

Protect from re-downloading files

parent 2d54442b
......@@ -132,6 +132,10 @@ function dl_track_from_json {
output="${dir}/${title}"
fi
if test -e "${output}.mp3"; then
return
fi
if test ! -e "${dir}/cover.jpg"; then
fetch_page "$(cat "$json" | jq -r '.cover.large_url' 2>/dev/null)" \
> "${dir}/cover.jpg"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment