aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Mangadex.cpp2
-rw-r--r--src/plugins/Youtube.cpp3
-rw-r--r--src/plugins/youtube/Signature.cpp4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp
index 671e9c7..a232d65 100644
--- a/src/plugins/Mangadex.cpp
+++ b/src/plugins/Mangadex.cpp
@@ -94,7 +94,7 @@ namespace QuickMedia {
};
static PluginResult search_manga(Page *plugin_page, SearchType search_type, const std::string &query, int page, BodyItems &result_items) {
- std::string url = "https://api.mangadex.org/manga?limit=20&includes[]=cover_art&offset=" + std::to_string(page * 20);
+ std::string url = "https://api.mangadex.org/manga?limit=20&order[relevance]=desc&includes[]=cover_art&offset=" + std::to_string(page * 20);
const std::string query_encoded = url_param_encode(query);
switch(search_type) {
case SearchType::TITLE:
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index a289b65..06e030b 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -2581,13 +2581,14 @@ R"END(
//std::string url_decoded = url_param_decode(url);
//url_decoded += "&alr=yes&cver=2.20210615.01.00&cpn=" + cpn;
+#ifdef YOUTUBE_SIGNATURE_DECRYPTOR
const std::string &s = cipher_params["s"];
const std::string &sp = cipher_params["sp"];
std::string sig_key;
std::string sig_value;
if(YoutubeSignatureDecryptor::get_instance().decrypt(s, sp, sig_key, sig_value))
url += "&" + std::move(sig_key) + "=" + std::move(sig_value);
-
+#endif
youtube_format.url = std::move(url);
return true;
}
diff --git a/src/plugins/youtube/Signature.cpp b/src/plugins/youtube/Signature.cpp
index 30c78b6..91796d0 100644
--- a/src/plugins/youtube/Signature.cpp
+++ b/src/plugins/youtube/Signature.cpp
@@ -1,3 +1,4 @@
+#ifdef YOUTUBE_SIGNATURE_DECRYPTOR
#include "../../../plugins/youtube/Signature.hpp"
#include "../../../include/Storage.hpp"
#include "../../../include/Notification.hpp"
@@ -311,4 +312,5 @@ namespace QuickMedia {
file_overwrite_atomic(get_cache_dir().join("youtube").join("decryption_function"), decryption_function);
return 0;
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file