youtube-rss: youtube-dl seems to produce faulty data once in a while - fail then

This commit is contained in:
gutmet 2020-11-01 20:38:45 +01:00
parent cbf2a24250
commit e08e1da514

View File

@ -8,6 +8,11 @@ set -e
playlistJSON=`youtube-dl "$playlistURL" --flat-playlist -J --playlist-end "$noItems"`
uploader=`echo "$playlistJSON" | jq -r '.uploader'`
if [ "$uploader" = "null" ]; then
exit 1
fi
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">
<channel>