diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-07 00:29:38 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-08-07 00:29:40 +0200 |
commit | cc8f50a2244256a1d619a8064b9e7f8b682a997e (patch) | |
tree | 88049d3b346f64fd2c0faa8fc70bb861015b948e /plugins | |
parent | 2ef70224b6db20cd9916063cbd720fa544f3820b (diff) |
Improve youtube search results
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Manganelo.hpp | 2 | ||||
-rw-r--r-- | plugins/Plugin.hpp | 2 | ||||
-rw-r--r-- | plugins/Youtube.hpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Manganelo.hpp b/plugins/Manganelo.hpp index 0f6f421..01311e1 100644 --- a/plugins/Manganelo.hpp +++ b/plugins/Manganelo.hpp @@ -9,6 +9,8 @@ namespace QuickMedia { SuggestionResult update_search_suggestions(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items) override; ImageResult get_image_by_index(const std::string &url, int index, std::string &image_data); ImageResult get_number_of_images(const std::string &url, int &num_images); + bool search_suggestions_has_thumbnails() const override { return true; } + bool search_results_has_thumbnails() const override { return true; } private: // Caches url. If the same url is requested multiple times then the cache is used ImageResult get_image_urls_for_chapter(const std::string &url); diff --git a/plugins/Plugin.hpp b/plugins/Plugin.hpp index 6d5a986..3df53ca 100644 --- a/plugins/Plugin.hpp +++ b/plugins/Plugin.hpp @@ -47,6 +47,8 @@ namespace QuickMedia { virtual SearchResult search(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items, Page &next_page) = 0; virtual SuggestionResult update_search_suggestions(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items); virtual std::vector<std::unique_ptr<BodyItem>> get_related_media(const std::string &url); + virtual bool search_suggestions_has_thumbnails() const = 0; + virtual bool search_results_has_thumbnails() const = 0; protected: std::string url_param_encode(const std::string ¶m) const; }; diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index c342a10..25a97c3 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -8,5 +8,7 @@ namespace QuickMedia { SearchResult search(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items, Page &next_page) override; SuggestionResult update_search_suggestions(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items) override; std::vector<std::unique_ptr<BodyItem>> get_related_media(const std::string &url) override; + bool search_suggestions_has_thumbnails() const override { return false; } + bool search_results_has_thumbnails() const override { return false; } }; }
\ No newline at end of file |