Remove line numbers from grep to remove the cut

Allow production code to contain `-` characters
pull/30/head
Mikhail Epifanov 2 years ago committed by GitHub
parent 16607665ba
commit 92f511cc53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save