From bd0bb5d76c37c4258b8dab5c26286ff27f04143a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 22 May 2018 18:44:48 +0200 Subject: enumerate streams ourselves --- odin/strm/download_youtube | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'odin') diff --git a/odin/strm/download_youtube b/odin/strm/download_youtube index cd30708b..bb8835de 100644 --- a/odin/strm/download_youtube +++ b/odin/strm/download_youtube @@ -225,9 +225,12 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" p1args=() typeset -a p2args p2args=() + local j=0 for formatKey (${(k)fileInfo}); do [[ ${formatKey} =~ "stream.([0-9]+).codec_type" ]] || continue - local i=$match[1] + # local i=$match[1] + local i=$j + j=$((j + 1)) local cType=${fileInfo[${formatKey}]} local cName=${fileInfo[stream.${i}.codec_name]} -- cgit v1.2.3