diff options
| author | Fijxu <fijxu@nadeko.net> | 2025-05-09 02:58:29 -0400 |
|---|---|---|
| committer | Fijxu <fijxu@nadeko.net> | 2025-05-09 02:58:29 -0400 |
| commit | b120abdcc550060fc414390c7c06a879f3bea348 (patch) | |
| tree | 6bab6b0d45ccb9bc82261eecf1d24c619b44ba28 /spec/helpers | |
| parent | d1bc15b8bffe7afad6000208dfe2cbd5601b4786 (diff) | |
| download | invidious-b120abdcc550060fc414390c7c06a879f3bea348.tar.gz invidious-b120abdcc550060fc414390c7c06a879f3bea348.tar.bz2 invidious-b120abdcc550060fc414390c7c06a879f3bea348.zip | |
fix: safely access "label" key
Fixes https://github.com/iv-org/invidious/issues/5095
On some videos, `label` is missing from the video information. Invidious
assumed that the `label` key existed.
Videos with label have this inside `metadataBadgeRenderer`:
```
{"style" => "BADGE_STYLE_TYPE_SIMPLE",
"label" => "4K",
"trackingParams" => "COMDENwwGAoiEwiCrebe6JWNAxWIxz8EHSQRFTU="}
```
but other videos, for some reason, look like this:
```
{"icon" => {"iconType" => "PERSON_RADAR"},
"style" => "BADGE_STYLE_TYPE_SIMPLE",
"trackingParams" => "CM4DENwwGAsiEwiCrebe6JWNAxWIxz8EHSQRFTU="}
```
Diffstat (limited to 'spec/helpers')
0 files changed, 0 insertions, 0 deletions
