diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-02-03 19:06:23 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-02-03 19:06:23 +0100 |
commit | f7f45ddc492b992cc49a92f620e37316e4d1fed4 (patch) | |
tree | 4269403c18b067c0fb6b5b397ae368d019fabdc2 /plugins | |
parent | 39ab966ebf9c23c8e801a904836a73be56b5ab92 (diff) |
Add thumbnail to bookmarked manga page
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Manga.hpp | 4 | ||||
-rw-r--r-- | plugins/MangaGeneric.hpp | 4 | ||||
-rw-r--r-- | plugins/Mangadex.hpp | 4 | ||||
-rw-r--r-- | plugins/Manganelo.hpp | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/plugins/Manga.hpp b/plugins/Manga.hpp index 74d8ed1..a298c11 100644 --- a/plugins/Manga.hpp +++ b/plugins/Manga.hpp @@ -55,7 +55,8 @@ namespace QuickMedia { class MangaChaptersPage : public Page, public TrackablePage { public: - MangaChaptersPage(Program *program, std::string manga_name, std::string manga_url) : Page(program), TrackablePage(std::move(manga_name), std::move(manga_url)) {} + MangaChaptersPage(Program *program, std::string manga_name, std::string manga_url, const std::string &thumbnail_url) : + Page(program), TrackablePage(std::move(manga_name), std::move(manga_url)), thumbnail_url(thumbnail_url) {} const char* get_title() const override { return content_title.c_str(); } TrackResult track(const std::string &str) override; void on_navigate_to_page(Body *body) override; @@ -64,5 +65,6 @@ namespace QuickMedia { protected: virtual bool extract_id_from_url(const std::string &url, std::string &manga_id) const = 0; virtual const char* get_service_name() const = 0; + std::string thumbnail_url; }; }
\ No newline at end of file diff --git a/plugins/MangaGeneric.hpp b/plugins/MangaGeneric.hpp index 183fbb4..bb7eb65 100644 --- a/plugins/MangaGeneric.hpp +++ b/plugins/MangaGeneric.hpp @@ -155,8 +155,8 @@ namespace QuickMedia { class MangaGenericChaptersPage : public MangaChaptersPage { public: - MangaGenericChaptersPage(Program *program, std::string manga_name, std::string manga_url, const MangaIdExtractor &manga_id_extractor, const char *service_name, const std::string &website_url, const ListPageQuery *list_page_query, bool fail_on_http_error) : - MangaChaptersPage(program, std::move(manga_name), std::move(manga_url)), manga_id_extractor(manga_id_extractor), service_name(service_name), website_url(website_url), list_page_query(list_page_query), fail_on_http_error(fail_on_http_error) {} + MangaGenericChaptersPage(Program *program, std::string manga_name, std::string manga_url, const std::string &thumbnail_url, const MangaIdExtractor &manga_id_extractor, const char *service_name, const std::string &website_url, const ListPageQuery *list_page_query, bool fail_on_http_error) : + MangaChaptersPage(program, std::move(manga_name), std::move(manga_url), thumbnail_url), manga_id_extractor(manga_id_extractor), service_name(service_name), website_url(website_url), list_page_query(list_page_query), fail_on_http_error(fail_on_http_error) {} PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; const char* get_bookmark_name() const override { return service_name; } protected: diff --git a/plugins/Mangadex.hpp b/plugins/Mangadex.hpp index c9f9515..2741f0c 100644 --- a/plugins/Mangadex.hpp +++ b/plugins/Mangadex.hpp @@ -25,8 +25,8 @@ namespace QuickMedia { class MangadexChaptersPage : public MangaChaptersPage { public: - MangadexChaptersPage(Program *program, MangadexSearchPage *search_page, std::string manga_name, std::string manga_url) : - MangaChaptersPage(program, std::move(manga_name), std::move(manga_url)), search_page(search_page) {} + MangadexChaptersPage(Program *program, MangadexSearchPage *search_page, std::string manga_name, std::string manga_url, const std::string &thumbnail_url) : + MangaChaptersPage(program, std::move(manga_name), std::move(manga_url), thumbnail_url), search_page(search_page) {} PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; const char* get_bookmark_name() const override { return "mangadex"; } diff --git a/plugins/Manganelo.hpp b/plugins/Manganelo.hpp index 5012fa3..a96d0c9 100644 --- a/plugins/Manganelo.hpp +++ b/plugins/Manganelo.hpp @@ -15,7 +15,7 @@ namespace QuickMedia { class ManganeloChaptersPage : public MangaChaptersPage { public: - ManganeloChaptersPage(Program *program, std::string manga_name, std::string manga_url) : MangaChaptersPage(program, std::move(manga_name), std::move(manga_url)) {} + ManganeloChaptersPage(Program *program, std::string manga_name, std::string manga_url, const std::string &thumbnail_url) : MangaChaptersPage(program, std::move(manga_name), std::move(manga_url), thumbnail_url) {} PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; const char* get_bookmark_name() const override { return "manganelo"; } protected: |