aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Fourchan.hpp2
-rw-r--r--plugins/ImageBoard.hpp12
2 files changed, 11 insertions, 3 deletions
diff --git a/plugins/Fourchan.hpp b/plugins/Fourchan.hpp
index 83fb293..51fe880 100644
--- a/plugins/Fourchan.hpp
+++ b/plugins/Fourchan.hpp
@@ -60,6 +60,8 @@ namespace QuickMedia {
FourchanThreadPage(Program *program, std::string board_id, std::string thread_id, std::string pass_id) :
ImageBoardThreadPage(program, std::move(board_id), std::move(thread_id)), pass_id(std::move(pass_id)) {}
+ PluginResult lazy_fetch(BodyItems &result_items) override;
+
PostResult post_comment(const std::string &captcha_id, const std::string &captcha_solution, const std::string &comment, const std::string &filepath = "") override;
const std::string& get_pass_id() override;
PluginResult request_captcha_challenge(ImageBoardCaptchaChallenge &challenge_response) override;
diff --git a/plugins/ImageBoard.hpp b/plugins/ImageBoard.hpp
index b324ea9..e135532 100644
--- a/plugins/ImageBoard.hpp
+++ b/plugins/ImageBoard.hpp
@@ -30,15 +30,14 @@ namespace QuickMedia {
int ttl = 0;
};
- class ImageBoardThreadPage : public VideoPage {
+ class ImageBoardThreadPage : public LazyFetchPage {
public:
- ImageBoardThreadPage(Program *program, std::string board_id, std::string thread_id) : VideoPage(program, ""), board_id(std::move(board_id)), thread_id(std::move(thread_id)) {}
+ ImageBoardThreadPage(Program *program, std::string board_id, std::string thread_id) : LazyFetchPage(program), board_id(std::move(board_id)), thread_id(std::move(thread_id)) {}
const char* get_title() const override { return ""; }
PageTypez get_type() const override { return PageTypez::IMAGE_BOARD_THREAD; }
void copy_to_clipboard(const BodyItem *body_item) override;
- bool autoplay_next_item() override { return true; }
// If |filepath| is empty then no file is uploaded
virtual PostResult post_comment(const std::string &captcha_id, const std::string &captcha_solution, const std::string &comment, const std::string &filepath = "") = 0;
virtual const std::string& get_pass_id();
@@ -48,4 +47,11 @@ namespace QuickMedia {
const std::string board_id;
const std::string thread_id;
};
+
+ class ImageBoardVideoPage : public VideoPage {
+ public:
+ ImageBoardVideoPage(Program *program) : VideoPage(program, "") {}
+ const char* get_title() const override { return ""; }
+ bool autoplay_next_item() override { return true; }
+ };
} \ No newline at end of file