aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/FileManager.cpp2
-rw-r--r--src/plugins/Mangadex.cpp6
-rw-r--r--src/plugins/Matrix.cpp8
-rw-r--r--src/plugins/Saucenao.cpp12
4 files changed, 21 insertions, 7 deletions
diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp
index 47a8b57..52f9f4e 100644
--- a/src/plugins/FileManager.cpp
+++ b/src/plugins/FileManager.cpp
@@ -52,6 +52,8 @@ namespace QuickMedia {
if(std::filesystem::is_regular_file(new_path)) {
program->select_file(new_path);
+ if(selection_handler)
+ result_tabs = selection_handler();
return PluginResult::OK;
}
diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp
index 7332e21..f69484b 100644
--- a/src/plugins/Mangadex.cpp
+++ b/src/plugins/Mangadex.cpp
@@ -97,8 +97,6 @@ namespace QuickMedia {
if(!attributes_json.isObject())
continue;
- const Json::Value &description_json = attributes_json["description"];
-
const Json::Value &title_json = attributes_json["title"];
if(!title_json.isObject())
continue;
@@ -112,10 +110,6 @@ namespace QuickMedia {
auto body_item = BodyItem::create(std::move(title));
body_item->url = id_json.asString();
- if(description_json.isString()) {
- body_item->set_description(description_json.asString());
- body_item->set_description_color(sf::Color(179, 179, 179));
- }
result_items.push_back(std::move(body_item));
}
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 6f8b30b..2740a8a 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -1801,10 +1801,18 @@ namespace QuickMedia {
case ',':
case '@':
case ':':
+ case ';':
case '?':
case '!':
case '<':
case '>':
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case '\'':
+ case '"':
+ case '#':
case '\0':
return true;
default:
diff --git a/src/plugins/Saucenao.cpp b/src/plugins/Saucenao.cpp
index 302f25e..1278bed 100644
--- a/src/plugins/Saucenao.cpp
+++ b/src/plugins/Saucenao.cpp
@@ -4,8 +4,18 @@
namespace QuickMedia {
PluginResult SaucenaoPage::lazy_fetch(BodyItems &result_items) {
+ std::vector<CommandArg> additional_args;
+ if(is_local) {
+ additional_args.push_back({ "-F", "file=@" + path });
+ } else {
+ std::string url = path;
+ if(url[0] == '@')
+ url = "\\" + url;
+ additional_args.push_back({ "-F", "url=" + url });
+ }
+
std::string website_data;
- DownloadResult download_result = download_to_string("https://saucenao.com/search.php", website_data, {{ "-F", "file=@" + upload_filepath }}, true);
+ DownloadResult download_result = download_to_string("https://saucenao.com/search.php", website_data, std::move(additional_args), true);
if(download_result != DownloadResult::OK) return download_result_to_plugin_result(download_result);
QuickMediaHtmlSearch html_search;