diff options
Diffstat (limited to 'plugins/Pornhub.hpp')
-rw-r--r-- | plugins/Pornhub.hpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/plugins/Pornhub.hpp b/plugins/Pornhub.hpp index 188a68e..195845f 100644 --- a/plugins/Pornhub.hpp +++ b/plugins/Pornhub.hpp @@ -1,17 +1,28 @@ #pragma once -#include "Plugin.hpp" +#include "Page.hpp" namespace QuickMedia { - class Pornhub : public Plugin { + class PornhubSearchPage : public Page { public: - Pornhub() : Plugin("pornhub") {} - SuggestionResult update_search_suggestions(const std::string &text, BodyItems &result_items) override; + PornhubSearchPage(Program *program) : Page(program) {} + const char* get_title() const override { return "All"; } + bool search_is_filter() override { return false; } + SearchResult search(const std::string &str, BodyItems &result_items) override; + PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; + }; + + class PornhubVideoPage : public Page { + public: + PornhubVideoPage(Program *program) : Page(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) override; - bool search_suggestions_has_thumbnails() const override { return true; } - bool search_results_has_thumbnails() const override { return false; } - int get_search_delay() const override { return 500; } - bool search_suggestion_is_search() const override { return true; } - Page get_page_after_search() const override { return Page::VIDEO_CONTENT; } + bool is_video_page() const override { return true; } }; }
\ No newline at end of file |