summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/invidious.cr6
-rw-r--r--src/invidious/videos.cr2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 16e41d80..3f84cd44 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -1746,7 +1746,7 @@ get "/api/v1/comments/:id" do |env|
if format == "json"
next {"comments" => [] of String}.to_json
else
- next {"contentHtml" => ""}.to_json
+ next {"contentHtml" => "", "commentCount" => 0}.to_json
end
end
ctoken = ctoken["ctoken"]
@@ -1784,7 +1784,7 @@ get "/api/v1/comments/:id" do |env|
if format == "json"
next {"comments" => [] of String}.to_json
else
- next {"contentHtml" => ""}.to_json
+ next {"contentHtml" => "", "commentCount" => 0}.to_json
end
end
@@ -1920,6 +1920,8 @@ get "/api/v1/comments/:id" do |env|
if comments["commentCount"]?
json.field "commentCount", comments["commentCount"]
+ else
+ json.field "commentCount", 0
end
end
end
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index 04474529..7efecebf 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -534,7 +534,7 @@ def process_video_params(query, preferences)
end
video_start ||= 0
if query["time_continue"]?
- video_start = decode_time(query["t"])
+ video_start = decode_time(query["time_continue"])
end
video_start ||= 0
if query["start"]?