aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
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"];