aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-03-11 00:38:10 +0100
committerdec05eba <dec05eba@protonmail.com>2021-03-11 00:38:10 +0100
commit041696ab8513e1aecc3e1c95598644dac150fc88 (patch)
tree682e4f35b500ae1282c33e425ed0998a71d726d5 /src
parent82794c7fbfc0b8b6d043375551a11ea3eafd446c (diff)
Youtube: fix comments not updating when going to the next video
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Youtube.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index ade73ff..c31a0c3 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -748,10 +748,14 @@ namespace QuickMedia {
}
const Json::Value &reply_count_json = comment_renderer_json["replyCount"];
- if(reply_count_json.isInt64()) {
+ if(reply_count_json.isInt64() && reply_count_json.asInt64() > 0) {
if(!description.empty())
description += '\n';
- description += std::to_string(reply_count_json.asInt64()) + " replies";
+
+ if(reply_count_json.asInt64() == 1)
+ description += "1 reply";
+ else
+ description += std::to_string(reply_count_json.asInt64()) + " replies";
}
std::string hearted_tooltip = comment_renderer_get_hearted_tooltip(comment_renderer_json);
@@ -1178,6 +1182,8 @@ namespace QuickMedia {
return result_items;
std::unordered_set<std::string> added_videos;
+ xsrf_token.clear();
+ comments_continuation_token.clear();
for(const Json::Value &json_item : json_root) {
if(!json_item.isObject())