From 3ccd8021b7fdc6028a9eb6db1f265572759dca26 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 28 May 2021 17:18:07 +0200 Subject: Fix youtube comment like count after youtube update --- src/plugins/Youtube.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins') 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 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"]; -- cgit v1.2.3