aboutsummaryrefslogtreecommitdiff
path: root/plugins/Page.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-12 22:37:23 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-12 22:37:23 +0100
commit5c27b5fbaa0f1693bf4605a3e6fc57d0f066c0ec (patch)
tree5a9d3e2cccc08d671da99c45fee040f3e24fae3c /plugins/Page.hpp
parent09d8b9895c7001f991d2aab7a75e8b573edb086f (diff)
Allow plugins to add their own tabs in ctrl+r instead of search, comments, related and channel
Diffstat (limited to 'plugins/Page.hpp')
-rw-r--r--plugins/Page.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 4fed1c8..c07679d 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -129,12 +129,13 @@ namespace QuickMedia {
virtual PageTypez get_type() const override { return PageTypez::VIDEO; }
virtual bool autoplay_next_item() { return false; }
virtual BodyItems get_related_media(const std::string &url) { (void)url; return {}; }
- virtual bool create_search_page(Program *program, Tab &tab) { (void)program; (void)tab; return false; }
- virtual std::unique_ptr<Page> create_comments_page(Program *program) { (void)program; return nullptr; }
- // Return nullptr if the service doesn't support related videos page
- virtual std::unique_ptr<RelatedVideosPage> create_related_videos_page(Program *program) = 0;
- // Return nullptr if the service doesn't support channels page
- virtual std::unique_ptr<Page> create_channels_page(Program *program, const std::string &channel_url) = 0;
+ virtual PluginResult get_related_pages(const BodyItems &related_videos, const std::string &channel_url, std::vector<Tab> &result_tabs) {
+ (void)related_videos;
+ (void)channel_url;
+ (void)result_tabs;
+ return PluginResult::OK;
+ }
+ virtual int get_related_pages_first_tab() { return 0; }
virtual void set_url(std::string new_url) { url = std::move(new_url); }
std::string get_url() { return url; }
virtual std::string get_download_url(int max_height) { (void)max_height; return url; }