diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2022-06-08 23:23:34 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2022-06-08 23:57:16 +0200 |
| commit | 3593f67eb60d46b4d4503364fe9f52109060cac7 (patch) | |
| tree | 32419f9629ed134166b82cef15201673c3e8f1c3 /src | |
| parent | 1b251264a61e7b29a339cba9defee3e9c22758c3 (diff) | |
| download | invidious-3593f67eb60d46b4d4503364fe9f52109060cac7.tar.gz invidious-3593f67eb60d46b4d4503364fe9f52109060cac7.tar.bz2 invidious-3593f67eb60d46b4d4503364fe9f52109060cac7.zip | |
Fix: related videos is a Hash(String, String)
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/videos.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 8ba667db..1504e390 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -853,6 +853,7 @@ end # the same 11 first entries as the compact rendered. # # TODO: "compactRadioRenderer" (Mix) and +# TODO: Use a proper struct/class instead of a hacky JSON object def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)? return nil if !related["videoId"]? @@ -868,7 +869,7 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)? .try &.dig?("runs", 0) author = channel_info.try &.dig?("text") - author_verified = has_verified_badge?(related["ownerBadges"]?) + author_verified = has_verified_badge?(related["ownerBadges"]?).to_s ucid = channel_info.try { |ci| HelperExtractors.get_browse_id(ci) } |
