aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Mangatown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Mangatown.cpp')
-rw-r--r--src/plugins/Mangatown.cpp20
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);