fix other loop

This commit is contained in:
Antonio J. Delgado 2024-11-20 12:58:31 +02:00
parent ef22a931d9
commit 4cb15f701d

View file

@ -24,7 +24,7 @@ do
if [ -n "${video_id}" ]; then if [ -n "${video_id}" ]; then
echo "Video ID: '${video_id}'" echo "Video ID: '${video_id}'"
channel=$(yt-dlp -J -- "${video_id}" | jq '.channel' | sed 's/"//g' | head -n1) channel=$(yt-dlp -J -- "${video_id}" | jq '.channel' | sed 's/"//g' | head -n1)
if [ -n "${channel}" ] && [ "${channel}" != "null" ]; then if [ -z "${channel}" ] && [ "${channel}" == "null" ]; then
channel='Unknwon channel' channel='Unknwon channel'
fi fi
echo "Channel name: '${channel}'" echo "Channel name: '${channel}'"