diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-22 18:57:01 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-22 18:57:01 +0200 |
| commit | 3182f865097f6db8288a6fde51cb20b4a24bf4c0 (patch) | |
| tree | baa8d9ddf25bba2c8aa832a83cca14d15f652598 /odin/strm/download_youtube | |
| parent | bd0bb5d76c37c4258b8dab5c26286ff27f04143a (diff) | |
| download | nixos-3182f865097f6db8288a6fde51cb20b4a24bf4c0.tar nixos-3182f865097f6db8288a6fde51cb20b4a24bf4c0.tar.gz nixos-3182f865097f6db8288a6fde51cb20b4a24bf4c0.tar.bz2 nixos-3182f865097f6db8288a6fde51cb20b4a24bf4c0.tar.xz nixos-3182f865097f6db8288a6fde51cb20b4a24bf4c0.zip | |
...
Diffstat (limited to 'odin/strm/download_youtube')
| -rw-r--r-- | odin/strm/download_youtube | 7 |
1 files changed, 4 insertions, 3 deletions
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}" | |||
| 228 | local j=0 | 228 | local j=0 |
| 229 | for formatKey (${(k)fileInfo}); do | 229 | for formatKey (${(k)fileInfo}); do |
| 230 | [[ ${formatKey} =~ "stream.([0-9]+).codec_type" ]] || continue | 230 | [[ ${formatKey} =~ "stream.([0-9]+).codec_type" ]] || continue |
| 231 | # local i=$match[1] | 231 | local i=$match[1] |
| 232 | local i=$j | ||
| 233 | j=$((j + 1)) | ||
| 234 | local cType=${fileInfo[${formatKey}]} | 232 | local cType=${fileInfo[${formatKey}]} |
| 235 | local cName=${fileInfo[stream.${i}.codec_name]} | 233 | local cName=${fileInfo[stream.${i}.codec_name]} |
| 236 | 234 | ||
| 235 | local i=$j | ||
| 236 | j=$((j + 1)) | ||
| 237 | |||
| 237 | printf "Stream %d: %s (%s)\n" ${i} ${cName} ${cType} | 238 | printf "Stream %d: %s (%s)\n" ${i} ${cName} ${cType} |
| 238 | 239 | ||
| 239 | if [[ ${cType} == "video" ]]; then | 240 | if [[ ${cType} == "video" ]]; then |
