mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Check for existance of "adaptiveFormats" in videos
Combined from commits: - Check for existance of "adaptiveFormats" in videos - Remove usage of ternary conditional
This commit is contained in:
parent
3e4fab7070
commit
cea38de4ad
1 changed files with 2 additions and 2 deletions
|
@ -765,8 +765,8 @@ struct Video
|
||||||
info["microformat"]?.try &.["playerMicroformatRenderer"]["isFamilySafe"]?.try &.as_bool || false
|
info["microformat"]?.try &.["playerMicroformatRenderer"]["isFamilySafe"]?.try &.as_bool || false
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_vr : Bool
|
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"
|
||||||
end
|
end
|
||||||
|
|
||||||
def wilson_score : Float64
|
def wilson_score : Float64
|
||||||
|
|
Loading…
Reference in a new issue