diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-22 01:44:39 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-22 01:44:39 +0100 |
commit | 89c41c1488854858e02ff6bd48a6518161fa05a5 (patch) | |
tree | 2161e26f342c4b2f9579b6521dc347a29e25fa6c /plugins | |
parent | 52bc7111147dd3e87e4bf0ae57241c2b81892f78 (diff) |
Allow launching directly into 4chan thread
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Fourchan.hpp | 2 | ||||
-rw-r--r-- | plugins/ImageBoard.hpp | 12 |
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 |