|
|
@ -353,10 +353,9 @@ get "/watch" do |env|
|
|
|
|
|
|
|
|
|
|
|
|
player_response = JSON.parse(video.info["player_response"])
|
|
|
|
player_response = JSON.parse(video.info["player_response"])
|
|
|
|
if player_response["captions"]?
|
|
|
|
if player_response["captions"]?
|
|
|
|
captions = player_response["captions"]["playerCaptionsTracklistRenderer"]["captionTracks"].as_a
|
|
|
|
captions = player_response["captions"]["playerCaptionsTracklistRenderer"]["captionTracks"]?.try &.as_a
|
|
|
|
else
|
|
|
|
|
|
|
|
captions = [] of JSON::Any
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
captions ||= [] of JSON::Any
|
|
|
|
|
|
|
|
|
|
|
|
rvs = [] of Hash(String, String)
|
|
|
|
rvs = [] of Hash(String, String)
|
|
|
|
if video.info.has_key?("rvs")
|
|
|
|
if video.info.has_key?("rvs")
|
|
|
|