Check for existance of "adaptiveFormats" in videos

This commit is contained in:
syeopite 2021-08-09 13:37:32 -07:00
parent 637a5cc14f
commit 0c78d9211f
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82

View File

@ -766,7 +766,7 @@ struct Video
end
def is_vr : Bool
info["streamingData"]?.try &.["adaptiveFormats"].as_a[0]?.try &.["projectionType"].as_s == "MESH" ? true : false || false
info.dig?("streamingData", "adaptiveFormats", 0, "projectionType").try &.as_s == "MESH" ? true : false || false
end
def wilson_score : Float64