From 87c8a2986d468a3fc897169c1b00fc4695e09d39 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Sep 2022 05:01:36 +0200 Subject: Add dramacool --- plugins/DramaCool.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 plugins/DramaCool.hpp (limited to 'plugins/DramaCool.hpp') diff --git a/plugins/DramaCool.hpp b/plugins/DramaCool.hpp new file mode 100644 index 0000000..428e632 --- /dev/null +++ b/plugins/DramaCool.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "Page.hpp" + +namespace QuickMedia { + class DramaCoolSearchPage : public Page { + public: + DramaCoolSearchPage(Program *program) : Page(program) {} + const char* get_title() const override { return "Search"; } + bool search_is_filter() override { return false; } + SearchResult search(const std::string &str, BodyItems &result_items) override; + PluginResult submit(const SubmitArgs &args, std::vector &result_tabs) override; + }; + + class DramaCoolEpisodesPage : public Page { + public: + DramaCoolEpisodesPage(Program *program) : Page(program) {} + const char* get_title() const override { return "Search"; } + bool search_is_filter() override { return true; } + PluginResult submit(const SubmitArgs &args, std::vector &result_tabs) override; + }; + + class DramaCoolVideoPage : public VideoPage { + public: + DramaCoolVideoPage(Program *program, std::string url, std::string title, std::string referer) : VideoPage(program, std::move(url), false), title(std::move(title)), referer(std::move(referer)) {} + const char* get_title() const override { return title.c_str(); } + PluginResult load(const SubmitArgs &args, VideoInfo &video_info, std::string &err_str) override; + private: + std::string title; + std::string referer; + }; +} -- cgit v1.2.3