From ca07c2be3bba3291f59d160eac13831c85d16550 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Oct 2020 05:48:46 +0200 Subject: Remove unused code --- src/plugins/NyaaSi.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/plugins/NyaaSi.cpp') diff --git a/src/plugins/NyaaSi.cpp b/src/plugins/NyaaSi.cpp index 186852b..8e13789 100644 --- a/src/plugins/NyaaSi.cpp +++ b/src/plugins/NyaaSi.cpp @@ -154,25 +154,9 @@ namespace QuickMedia { size_t index; }; - // Returns empty string on error - // static std::string view_url_get_id(const std::string &url) { - // size_t index = url.rfind('/'); - // if(index == std::string::npos) - // return ""; - // return url.substr(index); - // } - PluginResult NyaaSi::get_content_details(const std::string&, const std::string &url, BodyItems &result_items) { size_t comments_start_index; - // std::string id = view_url_get_id(url); - // if(id.empty()) { - // fprintf(stderr, "Error: nyaa.si: failed to extract id from url %s\n", url.c_str()); - // return PluginResult::ERR; - // } - - // std::string torrent_url = "https://nyaa.si/download/" + id + ".torrent"; - // auto torrent_item = BodyItem::create("Download torrent"); - // torrent_item->url = "https://nyaa.si/download/" + id + ".torrent"; + auto torrent_item = BodyItem::create("Download magnet"); std::string magnet_url; std::string description; -- cgit v1.2.3