aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-28 17:18:07 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-28 17:18:07 +0200
commit3ccd8021b7fdc6028a9eb6db1f265572759dca26 (patch)
tree64fa01f63fb2cd815e3dfded91ee2cd93be64039 /src/plugins
parent517119dfc65a185062b473499988ddea13959fcd (diff)
Fix youtube comment like count after youtube update
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Youtube.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index a93dcb6..e4f152f 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -812,11 +812,11 @@ namespace QuickMedia {
body_item->thumbnail_size = body_item->thumbnail_size;
}
- const Json::Value &like_count_json = comment_renderer_json["likeCount"];
- if(like_count_json.isInt64()) {
+ std::optional<std::string> vote_count = yt_json_get_text(comment_renderer_json, "voteCount");
+ if(vote_count) {
if(!description.empty())
description += '\n';
- description += "👍 " + std::to_string(like_count_json.asInt64());
+ description += "👍 " + vote_count.value();
}
const Json::Value &reply_count_json = comment_renderer_json["replyCount"];