From f8617f2043ea4ec536c4622df63a77b25268aeb0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 6 Mar 2021 14:25:48 +0100 Subject: Youtube: fix channel next page, add proper channel search (non filter search) --- plugins/Page.hpp | 2 +- plugins/Plugin.hpp | 1 + plugins/Youtube.hpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') 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 &result_tabs) override; PluginResult lazy_fetch(BodyItems &result_items) override; -- cgit v1.2.3-70-g09d2