repeat youtube playlist extraction once on error

This commit is contained in:
gutmet 2020-11-09 18:55:47 +01:00
parent 8c6b815d32
commit 5d5b66a1cd

View File

@ -9,7 +9,11 @@ playlistJSON=`youtube-dl "$playlistURL" --flat-playlist -J --playlist-end "$noIt
uploader=`echo "$playlistJSON" | jq -r '.uploader'` uploader=`echo "$playlistJSON" | jq -r '.uploader'`
if [ "$uploader" = "null" ]; then if [ "$uploader" = "null" ]; then
playlistJSON=`youtube-dl "$playlistURL" --flat-playlist -J --playlist-end "$noItems"`
uploader=`echo "$playlistJSON" | jq -r '.uploader'`
if [ "$uploader" = "null" ]; then
exit 1 exit 1
fi
fi fi