diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-09-28 01:16:49 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-09-28 01:16:49 +0200 |
commit | aab778b4f4cca2aeda13824ceb377edfc8ae923c (patch) | |
tree | 63af772ebb1e5c9d5c7e6cea204ab2e90cdbfdc1 | |
parent | eaa29234870703ada1b63a357d9d9d0fdaea653f (diff) |
Youtube search: only reload on page change if local recommendations
-rw-r--r-- | plugins/Youtube.hpp | 2 | ||||
-rw-r--r-- | src/plugins/Youtube.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 3c6732c..67a2f74 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -54,7 +54,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; } + bool reload_on_page_change() override; private: PluginResult search_get_continuation(const std::string &url, const std::string &continuation_token, BodyItems &result_items); private: diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 7248348..f3226de 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -1168,6 +1168,10 @@ namespace QuickMedia { return PluginResult::OK; } + bool YoutubeSearchPage::reload_on_page_change() { + return get_config().youtube.invidious_instance.empty(); + } + static void search_page_search_get_continuation(const Json::Value &json_item, std::string &new_continuation_token, std::unordered_set<std::string> &added_videos, BodyItems &result_items) { if(!json_item.isObject()) return; |