mirror of
				https://gitea.invidious.io/iv-org/invidious
				synced 2025-06-05 23:29:12 +02: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:
		| @@ -765,8 +765,8 @@ struct Video | ||||
|     info["microformat"]?.try &.["playerMicroformatRenderer"]["isFamilySafe"]?.try &.as_bool || false | ||||
|   end | ||||
|  | ||||
|   def is_vr : Bool | ||||
|     info["streamingData"]?.try &.["adaptiveFormats"].as_a[0]?.try &.["projectionType"].as_s == "MESH" ? true : false || false | ||||
|   def is_vr : Bool? | ||||
|     info.dig?("streamingData", "adaptiveFormats", 0, "projectionType").try &.as_s == "MESH" | ||||
|   end | ||||
|  | ||||
|   def wilson_score : Float64 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user