From 89c1a9ef17f2eb49d09e5e2b1459e1c58668ab6b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 31 May 2020 15:36:13 +0200 Subject: Only append chapter title to chapter number if not empty (mangadex) --- src/plugins/Mangadex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/Mangadex.cpp') diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index 235e709..0ef7e74 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -103,7 +103,7 @@ namespace QuickMedia { Json::Value &chapter_title_json = chapter["title"]; std::string chapter_url = mangadex_url + "/chapter/" + chapter_id; std::string chapter_name = std::string("Ch. ") + chapter_number_str; - if(chapter_title_json.isString()) + if(chapter_title_json.isString() && strlen(chapter_title_json.asCString()) > 0) chapter_name += std::string(" - ") + chapter_title_json.asCString(); auto item = std::make_unique(std::move(chapter_name)); -- cgit v1.2.3