diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-22 18:44:48 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-22 18:44:48 +0200 |
commit | bd0bb5d76c37c4258b8dab5c26286ff27f04143a (patch) | |
tree | e71fe53e5932cc3ca8a64725284b39f1802bc86b /odin/strm | |
parent | d171ae2eb32f0696606c173d9c3a1052b3913c60 (diff) | |
download | nixos-bd0bb5d76c37c4258b8dab5c26286ff27f04143a.tar nixos-bd0bb5d76c37c4258b8dab5c26286ff27f04143a.tar.gz nixos-bd0bb5d76c37c4258b8dab5c26286ff27f04143a.tar.bz2 nixos-bd0bb5d76c37c4258b8dab5c26286ff27f04143a.tar.xz nixos-bd0bb5d76c37c4258b8dab5c26286ff27f04143a.zip |
enumerate streams ourselves
Diffstat (limited to 'odin/strm')
-rw-r--r-- | odin/strm/download_youtube | 5 |
1 files changed, 4 insertions, 1 deletions
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}" | |||
225 | p1args=() | 225 | p1args=() |
226 | typeset -a p2args | 226 | typeset -a p2args |
227 | p2args=() | 227 | p2args=() |
228 | local j=0 | ||
228 | for formatKey (${(k)fileInfo}); do | 229 | for formatKey (${(k)fileInfo}); do |
229 | [[ ${formatKey} =~ "stream.([0-9]+).codec_type" ]] || continue | 230 | [[ ${formatKey} =~ "stream.([0-9]+).codec_type" ]] || continue |
230 | local i=$match[1] | 231 | # local i=$match[1] |
232 | local i=$j | ||
233 | j=$((j + 1)) | ||
231 | local cType=${fileInfo[${formatKey}]} | 234 | local cType=${fileInfo[${formatKey}]} |
232 | local cName=${fileInfo[stream.${i}.codec_name]} | 235 | local cName=${fileInfo[stream.${i}.codec_name]} |
233 | 236 | ||