aboutsummaryrefslogtreecommitdiff
path: root/plugins/Pornhub.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Pornhub.hpp')
-rw-r--r--plugins/Pornhub.hpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/plugins/Pornhub.hpp b/plugins/Pornhub.hpp
index 74fb00e..5c3f835 100644
--- a/plugins/Pornhub.hpp
+++ b/plugins/Pornhub.hpp
@@ -13,17 +13,21 @@ namespace QuickMedia {
PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
};
- class PornhubVideoPage : public Page {
+ class PornhubRelatedVideosPage : public RelatedVideosPage {
public:
- PornhubVideoPage(Program *program) : Page(program) {}
+ PornhubRelatedVideosPage(Program *program) : RelatedVideosPage(program) {}
+ PluginResult submit(const std::string&, const std::string&, std::vector<Tab> &result_tabs) override;
+ };
+
+ class PornhubVideoPage : public VideoPage {
+ public:
+ PornhubVideoPage(Program *program) : VideoPage(program) {}
const char* get_title() const override { return ""; }
- PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override {
- (void)title;
- (void)url;
- (void)result_tabs;
- return PluginResult::ERR;
+ BodyItems get_related_media(const std::string &url, std::string &channel_url) override;
+ std::unique_ptr<Page> create_search_page(Program *program, int &search_delay) override;
+ std::unique_ptr<RelatedVideosPage> create_related_videos_page(Program *program, const std::string &video_url, const std::string &video_title) override;
+ std::unique_ptr<LazyFetchPage> create_channels_page(Program*, const std::string&) override {
+ return nullptr;
}
- BodyItems get_related_media(const std::string &url) override;
- PageTypez get_type() const override { return PageTypez::VIDEO; }
};
} \ No newline at end of file