From ab36fbffef977b99cc03d0b77ac37bdc1b5705dc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 14 Apr 2021 19:52:21 +0200 Subject: Rework manga plugins downloading.. preparing for parallel downloads --- plugins/Manga.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'plugins/Manga.hpp') diff --git a/plugins/Manga.hpp b/plugins/Manga.hpp index 23e8dd0..60e739b 100644 --- a/plugins/Manga.hpp +++ b/plugins/Manga.hpp @@ -19,15 +19,11 @@ namespace QuickMedia { const char* get_title() const override { return chapter_name.c_str(); } PageTypez get_type() const override { return PageTypez::MANGA_IMAGES; } - virtual ImageResult get_number_of_images(int &num_images) = 0; - virtual ImageResult for_each_page_in_chapter(PageCallback callback) = 0; + virtual ImageResult get_page_image_urls(std::vector &urls) = 0; virtual void change_chapter(std::string new_chapter_name, std::string new_url) { chapter_name = std::move(new_chapter_name); - if(url != new_url) { - url = std::move(new_url); - chapter_image_urls.clear(); - } + url = std::move(new_url); } const std::string& get_chapter_name() const { return chapter_name; } @@ -39,7 +35,6 @@ namespace QuickMedia { protected: std::string chapter_name; std::string url; - std::vector chapter_image_urls; }; class MangaChaptersPage : public TrackablePage { -- cgit v1.2.3