aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-06 21:57:14 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-06 21:57:14 +0200
commit81f258005b9ab2bb581d3db874b2b581157862ef (patch)
tree9ba3fe3eea6ba56c7b63b27892900f94d7e51144
parent0b7869720e3d820dbe92cc26219eccbe897dc3a4 (diff)
Nyaa.si: fix torrents by anonymous not working if there are no comments
-rw-r--r--TODO3
-rw-r--r--src/plugins/NyaaSi.cpp8
2 files changed, 6 insertions, 5 deletions
diff --git a/TODO b/TODO
index 829b9df..a4c6581 100644
--- a/TODO
+++ b/TODO
@@ -89,4 +89,5 @@ IMPORTANT: Cleanup old messages in matrix (from matrix plugin), and instead eith
Use memberName() instead of key() when iterating json object. key() creates a copy, memberName() doesn't.
Do not try to reload/redownload thumbnail that fails to download after its cleared when its no longer visible on screen and then becomes visible.
Sort matrix events by timestamp (not messages). This affects the applying of certain actions, such as changing avatar, room name, etc.
-Some services such as 4chan, youtube, matrix and nyaa supports knowing the size of an image before it has downloaded. Use that to deal with pop-in of images because the image fallback size is not the same as the image size. \ No newline at end of file
+Some services such as 4chan, youtube, matrix and nyaa supports knowing the size of an image before it has downloaded. Use that to deal with pop-in of images because the image fallback size is not the same as the image size.
+Show google recaptcha on youtube when search/play fails, which can happen when using tor. \ No newline at end of file
diff --git a/src/plugins/NyaaSi.cpp b/src/plugins/NyaaSi.cpp
index f6724b2..e29b2b0 100644
--- a/src/plugins/NyaaSi.cpp
+++ b/src/plugins/NyaaSi.cpp
@@ -270,7 +270,7 @@ namespace QuickMedia {
goto cleanup;
}
- result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='panel-body']//a",
+ result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='panel-body']//div[class='row']//a",
[](QuickMediaHtmlNode *node, void *userdata) {
auto *item_data = (BodyItems*)userdata;
const char *href = quickmedia_html_node_get_attribute_value(node, "href");
@@ -287,9 +287,9 @@ namespace QuickMedia {
goto cleanup;
if(result_items.empty()) {
- fprintf(stderr, "Error: nyaa.si: failed to get submitter\n");
- result = -1;
- goto cleanup;
+ auto body_item = BodyItem::create("");
+ body_item->set_description("Submitter: Anonymous");
+ result_items.push_back(std::move(body_item));
}
result_items.front()->set_title(strip(title));