From 9126417eabb24f09ea8315bdf5e5728d59810583 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 15 Jun 2021 20:29:14 +0200 Subject: Make mangadex and mangakatana lists instead of grid, to fit descriptions --- src/QuickMedia.cpp | 4 ++-- 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(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(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(this), create_search_bar("Search...", 400)}); + tabs.push_back(Tab{create_body(), std::make_unique(this), create_search_bar("Search...", 400)}); upgrade_legacy_mangadex_ids(this, tabs.back().page.get()); auto history_page = std::make_unique(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) -- cgit v1.2.3