diff options
| author | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-14 23:03:25 -0500 |
|---|---|---|
| committer | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-14 23:03:25 -0500 |
| commit | 4731480821247a542ff05a8faedefcef55c009d9 (patch) | |
| tree | 647ab62cbcf97ae751aca9c30fc2c043090d5ad1 /src | |
| parent | aecbafbc7beb5c007031c02cfba9f419c58d4545 (diff) | |
| download | invidious-4731480821247a542ff05a8faedefcef55c009d9.tar.gz invidious-4731480821247a542ff05a8faedefcef55c009d9.tar.bz2 invidious-4731480821247a542ff05a8faedefcef55c009d9.zip | |
parse votes as number
Co-Authored-By: syeopite <70992037+syeopite@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/channels/community.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/channels/community.cr b/src/invidious/channels/community.cr index 9f9f3fde..87659c47 100644 --- a/src/invidious/channels/community.cr +++ b/src/invidious/channels/community.cr @@ -191,7 +191,7 @@ def fetch_channel_community(ucid, continuation, locale, format, thin_mode) when .has_key?("pollRenderer") attachment = attachment["pollRenderer"] json.field "type", "poll" - json.field "totalVotes", attachment["totalVotes"]["simpleText"].as_s + json.field "totalVotes", short_text_to_number(attachment["totalVotes"]["simpleText"].as_s.split(" ")[0]) json.field "choices" do json.array do attachment["choices"].as_a.each do |choice| |
