Commit ba9ab301 authored by Matěj Cepl's avatar Matěj Cepl
Browse files

If NPR continues to send badly named files we have some protection.

parent bf5c6b26
......@@ -41,10 +41,15 @@ while read podcast
target_file=$(echo "$url" | awk -F'/' {'print $NF'} | awk -F'=' {'print $NF'} | awk -F'?' {'print $1'})
#curl -q -L --xattr -4 --retry 10 -A BashPodder -C - \
# -o $download_dir/$target_file "$url"
wget -4 --config=/dev/null -t 10 --user-agent=BashPodders \
wget -4 --config=/dev/null -t 10 \
--user-agent=BashPodders \
-c -O $download_dir/$target_file "$url"
setfattr -n user.xdg.origin.url -v "$url" \
"$download_dir/$target_file"
if [ "x${target_file%%.*}" = "x$target_file" ] ; then
mv "$download_dir/$target_file" \
"$download_dir/$target_file.mp3"
fi
fi
done
done < $BP_CONF
......
Supports Markdown
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