1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#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, 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 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 series_name;
std::string episode_name;
std::string referer;
};
}
|