diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Plugin.hpp | 2 | ||||
-rw-r--r-- | plugins/Youtube.hpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Plugin.hpp b/plugins/Plugin.hpp index be70684..54ce67d 100644 --- a/plugins/Plugin.hpp +++ b/plugins/Plugin.hpp @@ -65,6 +65,8 @@ namespace QuickMedia { } virtual bool search_suggestions_has_thumbnails() const = 0; virtual bool search_results_has_thumbnails() const = 0; + virtual std::string autocomplete_search(const std::string &query) { return query; } + virtual int get_autocomplete_delay() const { return 100; } virtual int get_search_delay() const = 0; virtual bool search_suggestion_is_search() const { return false; } virtual Page get_page_after_search() const = 0; diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 2eea8c2..5a88970 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -10,13 +10,13 @@ namespace QuickMedia { BodyItems get_related_media(const std::string &url) override; bool search_suggestions_has_thumbnails() const override { return true; } bool search_results_has_thumbnails() const override { return false; } + std::string autocomplete_search(const std::string &query) override; int get_search_delay() const override { return 350; } bool search_suggestion_is_search() const override { return true; } Page get_page_after_search() const override { return Page::VIDEO_CONTENT; } private: void search_suggestions_get_continuation(const std::string &url, const std::string &continuation_token, BodyItems &result_items); private: - std::string last_related_media_playlist_id; - BodyItems last_playlist_data; + std::string last_autocomplete_result; }; }
\ No newline at end of file |