aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-03-06 14:25:48 +0100
committerdec05eba <dec05eba@protonmail.com>2021-03-06 14:25:48 +0100
commitf8617f2043ea4ec536c4622df63a77b25268aeb0 (patch)
tree0db0d16a3bbc68c0564f7c7f9166f1cf71f1838b /plugins
parentd3091854805fc625e2f6109f6f4af579420cd2a5 (diff)
Youtube: fix channel next page, add proper channel search (non filter search)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Page.hpp2
-rw-r--r--plugins/Plugin.hpp1
-rw-r--r--plugins/Youtube.hpp2
3 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 54e7383..e720f14 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -84,7 +84,7 @@ namespace QuickMedia {
class LazyFetchPage : public Page {
public:
LazyFetchPage(Program *program) : Page(program) {}
- bool search_is_filter() override { return true; }
+ virtual bool search_is_filter() override { return true; }
bool is_lazy_fetch_page() const override { return true; }
virtual PluginResult lazy_fetch(BodyItems &result_items) = 0;
};
diff --git a/plugins/Plugin.hpp b/plugins/Plugin.hpp
index 2026319..ebf3408 100644
--- a/plugins/Plugin.hpp
+++ b/plugins/Plugin.hpp
@@ -40,4 +40,5 @@ namespace QuickMedia {
SearchResult download_result_to_search_result(DownloadResult download_result);
ImageResult download_result_to_image_result(DownloadResult download_result);
PluginResult search_result_to_plugin_result(SearchResult search_result);
+ SearchResult plugin_result_to_search_result(PluginResult plugin_result);
} \ No newline at end of file
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index 1a66e5c..c0bb429 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -25,6 +25,8 @@ namespace QuickMedia {
public:
YoutubeChannelPage(Program *program, std::string url, std::string continuation_token, std::string title) : LazyFetchPage(program), url(std::move(url)), continuation_token(std::move(continuation_token)), title(std::move(title)) {}
const char* get_title() const override { return title.c_str(); }
+ bool search_is_filter() override { return false; }
+ SearchResult search(const std::string &str, BodyItems &result_items) override;
PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override;
PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
PluginResult lazy_fetch(BodyItems &result_items) override;