From 92f511cc53cd0b6652117cf432a7ed3700443d81 Mon Sep 17 00:00:00 2001 From: Mikhail Epifanov Date: Sat, 1 Apr 2023 20:13:32 +0200 Subject: [PATCH] Remove line numbers from grep to remove the cut Allow production code to contain `-` characters --- root/scripts/Youtube-Series-Downloader.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/scripts/Youtube-Series-Downloader.bash b/root/scripts/Youtube-Series-Downloader.bash index e5f353e..dd14133 100644 --- a/root/scripts/Youtube-Series-Downloader.bash +++ b/root/scripts/Youtube-Series-Downloader.bash @@ -99,7 +99,7 @@ for id in $(echo $sonarrSeriesIds); do if [ -z $downloadUrl ]; then network="$(echo "$tvdbPageData" | grep -i "/companies/youtube")" if [ ! -z "$network" ]; then - downloadUrl=$(echo "$tvdbPageData" | grep -iwns "production code" -A 2 | sed 's/\ //g' | cut -d "-" -f2 | tail -n1) + downloadUrl=$(echo "$tvdbPageData" | grep -iws "production code" -A 2 | sed 's/\ //g' | tail -n1) if [ ! -z $downloadUrl ]; then downloadUrl="https://www.youtube.com/watch?v=$downloadUrl" fi