aboutsummaryrefslogtreecommitdiff
path: root/plugins/DramaCool.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-09-04 05:01:36 +0200
committerdec05eba <dec05eba@protonmail.com>2022-09-04 08:44:51 +0200
commit87c8a2986d468a3fc897169c1b00fc4695e09d39 (patch)
treebfd1d39d84680389a2bd30c9e1cdde5e844a3a5b /plugins/DramaCool.hpp
parent84f501f5211f09a09fc5384bf15415d0d0445a96 (diff)
Add dramacool
Diffstat (limited to 'plugins/DramaCool.hpp')
-rw-r--r--plugins/DramaCool.hpp32
1 files changed, 32 insertions, 0 deletions
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<Tab> &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<Tab> &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;
+ };
+}