From cf19ee36c326f89ebd1835a8dbdae07e56fb4043 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 25 Mar 2021 00:03:35 +0100 Subject: 4chan: fix crash when posting a reply --- src/plugins/Youtube.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/plugins/Youtube.cpp') diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 76f98e2..99227d5 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -712,12 +712,13 @@ namespace QuickMedia { if(!author_text) return nullptr; - std::string title = author_text.value(); + std::string author = author_text.value(); std::optional published_time_text = yt_json_get_text(comment_renderer_json, "publishedTimeText"); if(published_time_text) - title += " - " + published_time_text.value(); + author += " - " + published_time_text.value(); - auto body_item = BodyItem::create(std::move(title)); + auto body_item = BodyItem::create(""); + body_item->set_author(std::move(author)); std::string description; const Json::Value &author_is_channel_owner_json = comment_renderer_json["authorIsChannelOwner"]; -- cgit v1.2.3