From 3586e3b510ef6828ab44dad1467f18ef4f2d7e2b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 31 May 2022 04:33:28 +0200 Subject: Youtube: merge search page and recommended page (show recommended if search field empty) --- plugins/Youtube.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 8844c5b..78fc40f 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -39,6 +39,8 @@ namespace QuickMedia { // If false is returned from |active_handler|, then this function is cancelled. bool youtube_custom_redirect(std::string &video_url, std::string &audio_url, int64_t &video_content_length, int64_t &audio_content_length, std::function active_handler); + // fill_recommended_items_from_json(plugin_name, load_recommended_json(plugin_name), result_items); + class YoutubeSearchPage : public LazyFetchPage { public: YoutubeSearchPage(Program *program, std::string video_id = "") : LazyFetchPage(program), video_id(std::move(video_id)) {} @@ -51,6 +53,7 @@ namespace QuickMedia { PluginResult submit_suggestion(const SubmitArgs &args, BodyItems &result_items) override; PluginResult lazy_fetch(BodyItems &result_items) override; bool lazy_fetch_is_loader() override { return true; } + bool reload_on_page_change() override { return true; } private: PluginResult search_get_continuation(const std::string &url, const std::string &continuation_token, BodyItems &result_items); private: -- cgit v1.2.3