mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-24 00:51:24 -04:00
fix: safely access "label" key (#5282)
This commit is contained in:
commit
6bfb61e9b4
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ private module Parsers
|
|||
badges = VideoBadges::None
|
||||
item_contents["badges"]?.try &.as_a.each do |badge|
|
||||
b = badge["metadataBadgeRenderer"]
|
||||
case b["label"].as_s
|
||||
case b["label"]?.try &.as_s
|
||||
when "LIVE"
|
||||
badges |= VideoBadges::LiveNow
|
||||
when "New"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue