diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Mangadex.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index a402bb2..48ab23f 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -138,6 +138,7 @@ namespace QuickMedia { if(!results_json.isArray()) return PluginResult::OK; + const char *prev_chapter = nullptr; for(const Json::Value &result_item_json : results_json) { if(!result_item_json.isObject()) continue; @@ -166,6 +167,10 @@ namespace QuickMedia { if(!chapter_json.isString()) continue; + if(prev_chapter && strcmp(prev_chapter, chapter_json.asCString()) == 0) + continue; + + prev_chapter = chapter_json.asCString(); std::string title = "Ch. " + chapter_json.asString(); const Json::Value &title_json = attributes_json["title"]; if(title_json.isString() && title_json.asCString()[0] != '\0') |