diff options
-rw-r--r-- | src/AsyncImageLoader.cpp | 2 | ||||
-rw-r--r-- | src/plugins/MangaGeneric.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp index 2919f41..883073f 100644 --- a/src/AsyncImageLoader.cpp +++ b/src/AsyncImageLoader.cpp @@ -277,9 +277,11 @@ namespace QuickMedia { } static bool download_file_async(const char *url, const char *save_filepath, ReadProgram *read_program) { + std::string referer = "Referer: " + std::string(url); const char *args[] = { "curl", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-g", "-s", "-L", "-f", "-H", "user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36", + "-H", referer.c_str(), "-o", save_filepath, "--", url, nullptr diff --git a/src/plugins/MangaGeneric.cpp b/src/plugins/MangaGeneric.cpp index 47fbf08..767f077 100644 --- a/src/plugins/MangaGeneric.cpp +++ b/src/plugins/MangaGeneric.cpp @@ -142,6 +142,9 @@ namespace QuickMedia { } SearchResult MangaGenericSearchPage::search(const std::string &str, BodyItems &result_items) { + if(str.empty()) + return SearchResult::OK; + return plugin_result_to_search_result(get_page(str, 0, result_items)); } |