diff options
Diffstat (limited to 'src/plugins/Pornhub.cpp')
-rw-r--r-- | src/plugins/Pornhub.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/plugins/Pornhub.cpp b/src/plugins/Pornhub.cpp index f527e76..1f0840e 100644 --- a/src/plugins/Pornhub.cpp +++ b/src/plugins/Pornhub.cpp @@ -138,16 +138,28 @@ namespace QuickMedia { return search_result_to_plugin_result(get_videos_in_page(url, is_tor_enabled(), result_items)); } - PluginResult PornhubSearchPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) { - (void)title; - (void)url; + PluginResult PornhubSearchPage::submit(const std::string&, const std::string&, std::vector<Tab> &result_tabs) { result_tabs.push_back(Tab{nullptr, std::make_unique<PornhubVideoPage>(program), nullptr}); return PluginResult::OK; } - BodyItems PornhubVideoPage::get_related_media(const std::string &url) { + PluginResult PornhubRelatedVideosPage::submit(const std::string&, const std::string&, std::vector<Tab> &result_tabs) { + result_tabs.push_back(Tab{nullptr, std::make_unique<PornhubVideoPage>(program), nullptr}); + return PluginResult::OK; + } + + BodyItems PornhubVideoPage::get_related_media(const std::string &url, std::string&) { BodyItems result_items; get_videos_in_page(url, is_tor_enabled(), result_items); return result_items; } + + std::unique_ptr<Page> PornhubVideoPage::create_search_page(Program *program, int &search_delay) { + search_delay = 500; + return std::make_unique<PornhubSearchPage>(program); + } + + std::unique_ptr<RelatedVideosPage> PornhubVideoPage::create_related_videos_page(Program *program, const std::string&, const std::string&) { + return std::make_unique<PornhubRelatedVideosPage>(program); + } }
\ No newline at end of file |