From 917e70f85570b8b9b0ee80ee6fb20a90697200b5 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 2 Jan 2021 08:23:29 +0100 Subject: [PATCH] only prints wrong channel format if some channels present --- .local/bin/tools/ripper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/tools/ripper b/.local/bin/tools/ripper index 3fcd80a..f105fc7 100755 --- a/.local/bin/tools/ripper +++ b/.local/bin/tools/ripper @@ -33,7 +33,7 @@ echo "Scanning for new Videos to download" echo "Scanning on Youtube:" IDs="$( grep 'youtube' "$CHANNELSFILE" | grep -v '^#' | grep 'channel' | sed 's/https:\/\/www\.youtube\.com\/channel\///')" not_correctly_formatted="$(grep 'youtube' "$CHANNELSFILE" | grep -v '^#' | grep -v 'channel')" -if [ "$( echo "$not_correctly_formatted" | wc -l )" -gt 0 ]; then +if [ -n "$not_correctly_formatted" ]; then echo Please fix the following channel urls to be scannable: echo "$not_correctly_formatted" echo "They need to be in the 'https://www.youtube.com/channel/...' format"