Don't assume the isShortsEligible is always availble

This commit is contained in:
Harm 2026-01-24 23:00:18 +01:00
parent ea8e3b7d22
commit 073396ce33

View File

@ -218,7 +218,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
post_live_dvr = video_details.dig?("isPostLiveDvr")
.try &.as_bool || false
is_short = microformat["isShortsEligible"].try &.as_bool || false
is_short = microformat.dig?("isShortsEligible").try &.as_bool || false
# Extra video infos