diff options
Diffstat (limited to 'plugins/Soundcloud.hpp')
-rw-r--r-- | plugins/Soundcloud.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/Soundcloud.hpp b/plugins/Soundcloud.hpp index e04d409..bb23efb 100644 --- a/plugins/Soundcloud.hpp +++ b/plugins/Soundcloud.hpp @@ -7,17 +7,22 @@ namespace QuickMedia { public: SoundcloudPage(Program *program) : Page(program) {} virtual ~SoundcloudPage() = default; + virtual const char* get_title() const override { return ""; } PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; }; - class SoundcloudSearchPage : public SoundcloudPage { + class SoundcloudSearchPage : public LazyFetchPage { public: - SoundcloudSearchPage(Program *program) : SoundcloudPage(program) {} + SoundcloudSearchPage(Program *program) : LazyFetchPage(program), submit_page(program) {} const char* get_title() const override { return "Search"; } bool search_is_filter() override { return false; } + PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; SearchResult search(const std::string &str, BodyItems &result_items) override; PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; + PluginResult lazy_fetch(BodyItems &result_items) override; + bool lazy_fetch_is_loader() override { return true; } private: + SoundcloudPage submit_page; std::string query_urn; }; |