diff options
Diffstat (limited to 'src/plugins/NyaaSi.cpp')
-rw-r--r-- | src/plugins/NyaaSi.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/NyaaSi.cpp b/src/plugins/NyaaSi.cpp index ea482ef..ecc769a 100644 --- a/src/plugins/NyaaSi.cpp +++ b/src/plugins/NyaaSi.cpp @@ -41,12 +41,12 @@ namespace QuickMedia { // TODO: Also show the number of comments for each torrent. TODO: Optimize? // TODO: Show each field as seperate columns instead of seperating by | - static SearchResult search_page(const std::string &list_url, const std::string &text, int page, bool use_tor, BodyItems &result_items) { + static SearchResult search_page(const std::string &list_url, const std::string &text, int page, BodyItems &result_items) { std::string full_url = "https://nyaa.si/?c=" + list_url + "&f=0&p=" + std::to_string(page) + "&q="; full_url += url_param_encode(text); std::string website_data; - if(download_to_string(full_url, website_data, {}, use_tor, true) != DownloadResult::OK) + if(download_to_string(full_url, website_data, {}, true) != DownloadResult::OK) return SearchResult::NET_ERR; size_t tbody_begin = website_data.find("<tbody>"); @@ -179,7 +179,7 @@ namespace QuickMedia { PluginResult NyaaSiCategoryPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) { BodyItems result_items; - SearchResult search_result = search_page(url, "", 1, is_tor_enabled(), result_items); + SearchResult search_result = search_page(url, "", 1, result_items); if(search_result != SearchResult::OK) return search_result_to_plugin_result(search_result); auto body = create_body(); @@ -216,11 +216,11 @@ namespace QuickMedia { } SearchResult NyaaSiSearchPage::search(const std::string &str, BodyItems &result_items) { - return search_page(category_id, str, 1, is_tor_enabled(), result_items); + return search_page(category_id, str, 1, result_items); } PluginResult NyaaSiSearchPage::get_page(const std::string &str, int page, BodyItems &result_items) { - return search_result_to_plugin_result(search_page(category_id, str, 1 + page, is_tor_enabled(), result_items)); + return search_result_to_plugin_result(search_page(category_id, str, 1 + page, result_items)); } PluginResult NyaaSiSearchPage::submit(const std::string&, const std::string &url, std::vector<Tab> &result_tabs) { @@ -233,7 +233,7 @@ namespace QuickMedia { std::string description; std::string website_data; - if(download_to_string(url, website_data, {}, is_tor_enabled(), true) != DownloadResult::OK) + if(download_to_string(url, website_data, {}, true) != DownloadResult::OK) return PluginResult::NET_ERR; QuickMediaHtmlSearch html_search; |