diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-10-23 07:26:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-10-23 07:26:39 +0200 |
commit | 261b0263f34ffcbe439d68b2e901fd3abbfc1eaf (patch) | |
tree | 735d49f2050b52a414766675e4226f3fa8ef0d08 /src/plugins/Mangatown.cpp | |
parent | 05ce6bac22d498fb2827df72f4c2b86d02826042 (diff) |
Re-add creators page
Diffstat (limited to 'src/plugins/Mangatown.cpp')
-rw-r--r-- | src/plugins/Mangatown.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/plugins/Mangatown.cpp b/src/plugins/Mangatown.cpp index d9013f7..89bf447 100644 --- a/src/plugins/Mangatown.cpp +++ b/src/plugins/Mangatown.cpp @@ -106,16 +106,15 @@ namespace QuickMedia { auto body = create_body(); body->items = std::move(chapters_items); result_tabs.push_back(Tab{std::move(body), std::make_unique<MangatownChaptersPage>(program, title, url), create_search_bar("Search...", SEARCH_DELAY_FILTER)}); + return PluginResult::OK; + } - std::string manga_id; - if(extract_id_from_url(url, manga_id)) { - if(load_manga_content_storage("mangatown", title, manga_id)) - return PluginResult::OK; - } - return PluginResult::ERR; + PluginResult MangatownChaptersPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) { + result_tabs.push_back(Tab{create_body(), std::make_unique<MangatownImagesPage>(program, content_title, title, url), nullptr}); + return PluginResult::OK; } - - bool MangatownSearchPage::extract_id_from_url(const std::string &url, std::string &manga_id) const { + + bool MangatownChaptersPage::extract_id_from_url(const std::string &url, std::string &manga_id) const { size_t start_index = url.find("/manga/"); if(start_index == std::string::npos) return false; @@ -131,11 +130,6 @@ namespace QuickMedia { return true; } - PluginResult MangatownChaptersPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) { - result_tabs.push_back(Tab{create_body(), std::make_unique<MangatownImagesPage>(program, content_title, title, url), nullptr}); - return PluginResult::OK; - } - ImageResult MangatownImagesPage::get_number_of_images(int &num_images) { num_images = 0; ImageResult image_result = get_image_urls_for_chapter(url); |