diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-29 10:49:46 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-29 10:49:46 -0500 |
| commit | 6aeb508f291eda935cc7077d7faaf9034d5c3270 (patch) | |
| tree | ef990d89c625029ae3275983cd14205e5da56a3c /src | |
| parent | 4cc2cf46aa94f8895fd1287d01614f7ed07348b5 (diff) | |
| download | invidious-6aeb508f291eda935cc7077d7faaf9034d5c3270.tar.gz invidious-6aeb508f291eda935cc7077d7faaf9034d5c3270.tar.bz2 invidious-6aeb508f291eda935cc7077d7faaf9034d5c3270.zip | |
Fix for /comments/ where there is only one comment
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index b1a59dcb..7fdfbcfe 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -568,7 +568,7 @@ get "/api/v1/comments/:id" do |env| comments = JSON.build do |json| json.object do if body["header"]? - comment_count = body["header"]["commentsHeaderRenderer"]["countText"]["simpleText"].as_s.rchop(" Comments").delete(',').to_i + comment_count = body["header"]["commentsHeaderRenderer"]["countText"]["simpleText"].as_s.rchop(" Comment").delete("s,").to_i json.field "commentCount", comment_count end |
