mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-28 17:48:30 +00:00
add suggestions from syeopite
This commit is contained in:
parent
b1e7e0c45e
commit
01cdb384e0
@ -146,10 +146,11 @@ def extract_video_info(video_id : String)
|
|||||||
if streaming_data = player_response["streamingData"]?
|
if streaming_data = player_response["streamingData"]?
|
||||||
%w[formats adaptiveFormats].each do |key|
|
%w[formats adaptiveFormats].each do |key|
|
||||||
streaming_data.as_h[key]?.try &.as_a.each do |format|
|
streaming_data.as_h[key]?.try &.as_a.each do |format|
|
||||||
if format.as_h["url"].nil?
|
format = format.as_h
|
||||||
format.as_h["url"] = format.as_h["signatureCipher"]
|
if format["url"]?.nil?
|
||||||
|
format["url"] = format["signatureCipher"]
|
||||||
end
|
end
|
||||||
format.as_h["url"] = JSON::Any.new(convert_url(format))
|
format["url"] = JSON::Any.new(convert_url(format))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user