diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-09-20 03:37:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-09-20 03:37:00 +0200 |
commit | 7934864d58ec39b237e2b45d0180aa567b29b944 (patch) | |
tree | 94103a8fd9e8f857537f63490af9e8857a96a22f /src/plugins | |
parent | cd3c2a139ed17fe9a4abf5f08a95d995843e6d44 (diff) |
Order mangadex search by relevence
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Mangadex.cpp | 2 | ||||
-rw-r--r-- | src/plugins/Youtube.cpp | 3 | ||||
-rw-r--r-- | src/plugins/youtube/Signature.cpp | 4 |
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 |