From 89c41c1488854858e02ff6bd48a6518161fa05a5 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 22 Nov 2022 01:44:39 +0100 Subject: Allow launching directly into 4chan thread --- plugins/ImageBoard.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'plugins/ImageBoard.hpp') 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 -- cgit v1.2.3