diff options
-rw-r--r-- | src/QuickMedia.cpp | 4 | ||||
-rw-r--r-- | src/plugins/Mangadex.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index ff792e4..9defcb7 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1103,12 +1103,12 @@ namespace QuickMedia { } else if(strcmp(plugin_name, "mangakatana") == 0) { auto search_page = std::make_unique<MangaGenericSearchPage>(this, plugin_name, "https://mangakatana.com/", false); add_mangakatana_handlers(search_page.get()); - tabs.push_back(Tab{create_body(false, true), std::move(search_page), create_search_bar("Search...", 400)}); + tabs.push_back(Tab{create_body(), std::move(search_page), create_search_bar("Search...", 400)}); auto history_page = std::make_unique<HistoryPage>(this, tabs.front().page.get(), HistoryType::MANGA); tabs.push_back(Tab{create_body(), std::move(history_page), create_search_bar("Search...", SEARCH_DELAY_FILTER)}); } else if(strcmp(plugin_name, "mangadex") == 0) { - tabs.push_back(Tab{create_body(false, true), std::make_unique<MangadexSearchPage>(this), create_search_bar("Search...", 400)}); + tabs.push_back(Tab{create_body(), std::make_unique<MangadexSearchPage>(this), create_search_bar("Search...", 400)}); upgrade_legacy_mangadex_ids(this, tabs.back().page.get()); auto history_page = std::make_unique<HistoryPage>(this, tabs.front().page.get(), HistoryType::MANGA); diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index 0178c1e..3953215 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -86,6 +86,9 @@ namespace QuickMedia { } PluginResult MangadexSearchPage::get_cover_urls(BodyItems &body_items) { + if(body_items.empty()) + return PluginResult::OK; + std::string url = "https://api.mangadex.org/cover?"; for(size_t i = 0; i < body_items.size(); ++i) { if(i > 0) |