aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-02-03 21:09:26 +0100
committerdec05eba <dec05eba@protonmail.com>2022-02-03 21:09:26 +0100
commit9f12d8a7f6e4cdf0cb95130b69da2b368cc9cbb5 (patch)
tree6b0c85fca617329a94fc94c0f4a247ff7ecd38fd /plugins
parentf7f45ddc492b992cc49a92f620e37316e4d1fed4 (diff)
Add thumbnail to manga history page. Start on new manga history format (one json file)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Manga.hpp4
-rw-r--r--plugins/MangaGeneric.hpp4
-rw-r--r--plugins/Mangadex.hpp4
-rw-r--r--plugins/Manganelo.hpp3
4 files changed, 9 insertions, 6 deletions
diff --git a/plugins/Manga.hpp b/plugins/Manga.hpp
index a298c11..7b67e13 100644
--- a/plugins/Manga.hpp
+++ b/plugins/Manga.hpp
@@ -20,7 +20,8 @@ namespace QuickMedia {
class MangaImagesPage : public Page {
public:
- MangaImagesPage(Program *program, std::string manga_name, std::string chapter_name, std::string url) : Page(program), manga_name(std::move(manga_name)), chapter_name(std::move(chapter_name)), url(std::move(url)), chapter_num_pages(-1) {}
+ MangaImagesPage(Program *program, std::string manga_name, std::string chapter_name, std::string url, std::string thumbnail_url) :
+ Page(program), manga_name(std::move(manga_name)), thumbnail_url(std::move(thumbnail_url)), chapter_name(std::move(chapter_name)), url(std::move(url)), chapter_num_pages(-1) {}
virtual ~MangaImagesPage() = default;
const char* get_title() const override { return chapter_name.c_str(); }
PageTypez get_type() const override { return PageTypez::MANGA_IMAGES; }
@@ -46,6 +47,7 @@ namespace QuickMedia {
virtual const char* get_website_url() const = 0;
const std::string manga_name;
+ const std::string thumbnail_url;
protected:
std::string chapter_name;
std::string url;
diff --git a/plugins/MangaGeneric.hpp b/plugins/MangaGeneric.hpp
index bb7eb65..439fc19 100644
--- a/plugins/MangaGeneric.hpp
+++ b/plugins/MangaGeneric.hpp
@@ -183,8 +183,8 @@ namespace QuickMedia {
class MangaGenericImagesPage : public MangaImagesPage {
public:
- MangaGenericImagesPage(Program *program, std::string manga_name, std::string chapter_name, std::string url, const char *service_name, const std::string &website_url, const ListPageQuery *list_page_query, bool fail_on_http_error) :
- MangaImagesPage(program, std::move(manga_name), std::move(chapter_name), std::move(url)), service_name(service_name), website_url(website_url), list_page_query(list_page_query), fail_on_http_error(fail_on_http_error) {}
+ MangaGenericImagesPage(Program *program, std::string manga_name, std::string chapter_name, std::string url, const char *service_name, const std::string &website_url, const ListPageQuery *list_page_query, bool fail_on_http_error, std::string thumbnail_url) :
+ MangaImagesPage(program, std::move(manga_name), std::move(chapter_name), std::move(url), std::move(thumbnail_url)), service_name(service_name), website_url(website_url), list_page_query(list_page_query), fail_on_http_error(fail_on_http_error) {}
ImageResult get_number_of_images(int &num_images) override;
ImageResult for_each_page_in_chapter(PageCallback callback) override;
const char* get_service_name() const override { return service_name; }
diff --git a/plugins/Mangadex.hpp b/plugins/Mangadex.hpp
index 2741f0c..d6206cc 100644
--- a/plugins/Mangadex.hpp
+++ b/plugins/Mangadex.hpp
@@ -51,8 +51,8 @@ namespace QuickMedia {
class MangadexImagesPage : public MangaImagesPage {
public:
- MangadexImagesPage(Program *program, MangadexSearchPage *search_page, std::string manga_name, std::string chapter_id, std::string chapter_name) :
- MangaImagesPage(program, std::move(manga_name), std::move(chapter_name), std::move(chapter_id)), search_page(search_page) {}
+ MangadexImagesPage(Program *program, MangadexSearchPage *search_page, std::string manga_name, std::string chapter_id, std::string chapter_name, std::string thumbnail_url) :
+ MangaImagesPage(program, std::move(manga_name), std::move(chapter_name), std::move(chapter_id), std::move(thumbnail_url)), search_page(search_page) {}
ImageResult get_number_of_images(int &num_images) override;
ImageResult for_each_page_in_chapter(PageCallback callback) override;
const char* get_service_name() const override { return "mangadex"; }
diff --git a/plugins/Manganelo.hpp b/plugins/Manganelo.hpp
index a96d0c9..8946447 100644
--- a/plugins/Manganelo.hpp
+++ b/plugins/Manganelo.hpp
@@ -35,7 +35,8 @@ namespace QuickMedia {
class ManganeloImagesPage : public MangaImagesPage {
public:
- ManganeloImagesPage(Program *program, std::string manga_name, std::string chapter_name, std::string url) : MangaImagesPage(program, std::move(manga_name), std::move(chapter_name), std::move(url)) {}
+ ManganeloImagesPage(Program *program, std::string manga_name, std::string chapter_name, std::string url, std::string thumbnail_url) :
+ MangaImagesPage(program, std::move(manga_name), std::move(chapter_name), std::move(url), std::move(thumbnail_url)) {}
ImageResult get_number_of_images(int &num_images) override;
ImageResult for_each_page_in_chapter(PageCallback callback) override;
const char* get_service_name() const override { return "manganelo"; }