aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-09 03:35:56 +0200
committerdec05eba <dec05eba@protonmail.com>2019-08-09 03:36:07 +0200
commit73b077835dc6085c2642451fa7dbde629b9eadfc (patch)
treed6abfaae58f9ee918fda556b36a8078825cb2799 /plugins
parente061971e5f1dee5a6e1541bc88a192e9ca8e9422 (diff)
Readd video seek, make search asynchronous
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Manganelo.hpp4
-rw-r--r--plugins/Plugin.hpp6
-rw-r--r--plugins/Youtube.hpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Manganelo.hpp b/plugins/Manganelo.hpp
index 5720199..ab3bb3f 100644
--- a/plugins/Manganelo.hpp
+++ b/plugins/Manganelo.hpp
@@ -5,8 +5,8 @@
namespace QuickMedia {
class Manganelo : public Plugin {
public:
- SearchResult search(const std::string &url, std::vector<std::unique_ptr<BodyItem>> &result_items) override;
- SuggestionResult update_search_suggestions(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items) override;
+ SearchResult search(const std::string &url, BodyItems &result_items) override;
+ SuggestionResult update_search_suggestions(const std::string &text, BodyItems &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; }
diff --git a/plugins/Plugin.hpp b/plugins/Plugin.hpp
index 54d49e5..a999d36 100644
--- a/plugins/Plugin.hpp
+++ b/plugins/Plugin.hpp
@@ -44,9 +44,9 @@ namespace QuickMedia {
public:
virtual ~Plugin() = default;
- virtual SearchResult search(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items);
- 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 SearchResult search(const std::string &text, BodyItems &result_items);
+ virtual SuggestionResult update_search_suggestions(const std::string &text, BodyItems &result_items);
+ virtual BodyItems get_related_media(const std::string &url);
virtual bool search_suggestions_has_thumbnails() const = 0;
virtual bool search_results_has_thumbnails() const = 0;
virtual int get_search_delay() const = 0;
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index 64a0d6b..f459630 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -5,11 +5,11 @@
namespace QuickMedia {
class Youtube : public Plugin {
public:
- 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;
+ SuggestionResult update_search_suggestions(const std::string &text, BodyItems &result_items) override;
+ 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; }
- int get_search_delay() const override { return 250; }
+ int get_search_delay() const override { return 150; }
bool search_suggestion_is_search() const override { return true; }
Page get_page_after_search() const override { return Page::VIDEO_CONTENT; }
};