aboutsummaryrefslogtreecommitdiff
path: root/plugins/DramaCool.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-09-04 22:35:17 +0200
committerdec05eba <dec05eba@protonmail.com>2022-09-04 22:35:17 +0200
commite3a151d5d2a71126c275567862a0cd2d471b42bc (patch)
tree6bbfec0cf7a6bae800c96e53f4990046a450f12f /plugins/DramaCool.hpp
parent87c8a2986d468a3fc897169c1b00fc4695e09d39 (diff)
Dramacool: watch progress
Diffstat (limited to 'plugins/DramaCool.hpp')
-rw-r--r--plugins/DramaCool.hpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/DramaCool.hpp b/plugins/DramaCool.hpp
index 428e632..71fdf68 100644
--- a/plugins/DramaCool.hpp
+++ b/plugins/DramaCool.hpp
@@ -14,19 +14,26 @@ namespace QuickMedia {
class DramaCoolEpisodesPage : public Page {
public:
- DramaCoolEpisodesPage(Program *program) : Page(program) {}
+ DramaCoolEpisodesPage(Program *program, std::string series_name) : Page(program), series_name(std::move(series_name)) {}
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;
+ private:
+ std::string series_name;
};
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(); }
+ DramaCoolVideoPage(Program *program, std::string url, std::string series_name, std::string episode_name, std::string referer) : VideoPage(program, std::move(url), false), series_name(std::move(series_name)), episode_name(std::move(episode_name)), referer(std::move(referer)) {}
+ const char* get_title() const override { return episode_name.c_str(); }
PluginResult load(const SubmitArgs &args, VideoInfo &video_info, std::string &err_str) override;
+ std::string get_url_timestamp() override;
+ void set_watch_progress(int64_t time_pos_sec, int64_t duration_sec) override;
+ private:
+ std::string get_video_id() const;
private:
- std::string title;
+ std::string series_name;
+ std::string episode_name;
std::string referer;
};
}