mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-20 11:58:48 +00:00
Fix 'adaptiveFormats' not available for livestreams in videos API
This commit is contained in:
@@ -62,6 +62,9 @@ module Invidious::Routes::API::Manifest
|
||||
|
||||
xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true) do
|
||||
mime_streams.each do |fmt|
|
||||
# OFT streams aren't supported yet (See https://github.com/TeamNewPipe/NewPipe/issues/2415)
|
||||
next if !(fmt.has_key?("indexRange") && fmt.has_key?("initRange"))
|
||||
|
||||
codecs = fmt["mimeType"].as_s.split("codecs=")[1].strip('"')
|
||||
bandwidth = fmt["bitrate"].as_i
|
||||
itag = fmt["itag"].as_i
|
||||
@@ -90,6 +93,9 @@ module Invidious::Routes::API::Manifest
|
||||
heights = [] of Int32
|
||||
xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true, scanType: "progressive") do
|
||||
mime_streams.each do |fmt|
|
||||
# OFT streams aren't supported yet (See https://github.com/TeamNewPipe/NewPipe/issues/2415)
|
||||
next if !(fmt.has_key?("indexRange") && fmt.has_key?("initRange"))
|
||||
|
||||
codecs = fmt["mimeType"].as_s.split("codecs=")[1].strip('"')
|
||||
bandwidth = fmt["bitrate"].as_i
|
||||
itag = fmt["itag"].as_i
|
||||
|
||||
Reference in New Issue
Block a user