aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-05-31 04:33:28 +0200
committerdec05eba <dec05eba@protonmail.com>2022-05-31 04:33:28 +0200
commit3586e3b510ef6828ab44dad1467f18ef4f2d7e2b (patch)
tree5e9eed17378fe65ef594cdac55acd5899b66ae8a /plugins
parent6e9bfd6571adf151e4e7fe4cb63f731314ebeff6 (diff)
Youtube: merge search page and recommended page (show recommended if search field empty)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Youtube.hpp3
1 files changed, 3 insertions, 0 deletions
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<bool()> 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: