diff options
| author | 138138138 <78271024+138138138@users.noreply.github.com> | 2022-07-10 16:54:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-10 16:54:56 +0800 |
| commit | cbcf31a4f98706ea675cafb7509b37dc2b0ceace (patch) | |
| tree | 6b5a09176aeb8a2b6f489882e248575082668f84 | |
| parent | b19beac5b40bd1efbef1882b2160252ebf9a3134 (diff) | |
| download | invidious-cbcf31a4f98706ea675cafb7509b37dc2b0ceace.tar.gz invidious-cbcf31a4f98706ea675cafb7509b37dc2b0ceace.tar.bz2 invidious-cbcf31a4f98706ea675cafb7509b37dc2b0ceace.zip | |
Skip OTF streams in DASH audio
Skip OTF streams, prevent creating empty AdaptationSet in DASH audio
| -rw-r--r-- | src/invidious/routes/api/manifest.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/routes/api/manifest.cr b/src/invidious/routes/api/manifest.cr index ca72be26..52b94175 100644 --- a/src/invidious/routes/api/manifest.cr +++ b/src/invidious/routes/api/manifest.cr @@ -61,10 +61,10 @@ module Invidious::Routes::API::Manifest next if mime_streams.empty? mime_streams.each do |fmt| - xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true, label: fmt["bitrate"].to_s + "k") do - # OTF streams aren't supported yet (See https://github.com/TeamNewPipe/NewPipe/issues/2415) - next if !(fmt.has_key?("indexRange") && fmt.has_key?("initRange")) + # OTF streams aren't supported yet (See https://github.com/TeamNewPipe/NewPipe/issues/2415) + next if !(fmt.has_key?("indexRange") && fmt.has_key?("initRange")) + xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true, label: fmt["bitrate"].to_s + "k") do codecs = fmt["mimeType"].as_s.split("codecs=")[1].strip('"') bandwidth = fmt["bitrate"].as_i itag = fmt["itag"].as_i |
