From 3182f865097f6db8288a6fde51cb20b4a24bf4c0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 22 May 2018 18:57:01 +0200 Subject: ... --- odin/strm/download_youtube | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'odin') diff --git a/odin/strm/download_youtube b/odin/strm/download_youtube index bb8835de..4024155a 100644 --- a/odin/strm/download_youtube +++ b/odin/strm/download_youtube @@ -228,12 +228,13 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" local j=0 for formatKey (${(k)fileInfo}); do [[ ${formatKey} =~ "stream.([0-9]+).codec_type" ]] || continue - # local i=$match[1] - local i=$j - j=$((j + 1)) + local i=$match[1] local cType=${fileInfo[${formatKey}]} local cName=${fileInfo[stream.${i}.codec_name]} + local i=$j + j=$((j + 1)) + printf "Stream %d: %s (%s)\n" ${i} ${cName} ${cType} if [[ ${cType} == "video" ]]; then -- cgit v1.2.3