diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/AsyncImageLoader.hpp | 2 | ||||
-rw-r--r-- | include/DownloadUtils.hpp | 8 | ||||
-rw-r--r-- | include/GoogleCaptcha.hpp | 4 | ||||
-rw-r--r-- | include/Json.hpp | 2 | ||||
-rw-r--r-- | include/QuickMedia.hpp | 2 | ||||
-rw-r--r-- | include/VideoPlayer.hpp | 3 |
6 files changed, 9 insertions, 12 deletions
diff --git a/include/AsyncImageLoader.hpp b/include/AsyncImageLoader.hpp index d485e3a..0366415 100644 --- a/include/AsyncImageLoader.hpp +++ b/include/AsyncImageLoader.hpp @@ -36,7 +36,7 @@ namespace QuickMedia { // set |resize_target_size| to {0, 0} to disable resizing. // |thumbnail_data.loading_state| has to be LoadingState::NOT_LOADED when calling this! // Note: this method is not thread-safe - void load_thumbnail(const std::string &url, bool local, sf::Vector2i resize_target_size, bool use_tor, std::shared_ptr<ThumbnailData> thumbnail_data); + void load_thumbnail(const std::string &url, bool local, sf::Vector2i resize_target_size, std::shared_ptr<ThumbnailData> thumbnail_data); private: AsyncImageLoader(); ~AsyncImageLoader(); diff --git a/include/DownloadUtils.hpp b/include/DownloadUtils.hpp index 6d96cd6..40ec12a 100644 --- a/include/DownloadUtils.hpp +++ b/include/DownloadUtils.hpp @@ -21,8 +21,8 @@ namespace QuickMedia { // Return true the return DownloadResult::OK for the download, which also saves the result in cache if |download_to_string_cache| is used using DownloadErrorHandler = std::function<bool(std::string&)>; - DownloadResult download_to_string(const std::string &url, std::string &result, const std::vector<CommandArg> &additional_args, bool use_tor, bool use_browser_useragent = false, bool fail_on_error = true); - DownloadResult download_to_string_cache(const std::string &url, std::string &result, const std::vector<CommandArg> &additional_args, bool use_tor, bool use_browser_useragent = false, DownloadErrorHandler error_handler = nullptr, Path cache_path = ""); - DownloadResult download_to_file(const std::string &url, const std::string &destination_filepath, const std::vector<CommandArg> &additional_args, bool use_tor, bool use_browser_useragent = false); - DownloadResult download_to_json(const std::string &url, rapidjson::Document &result, const std::vector<CommandArg> &additional_args, bool use_tor, bool use_browser_useragent = false, bool fail_on_error = true); + DownloadResult download_to_string(const std::string &url, std::string &result, const std::vector<CommandArg> &additional_args, bool use_browser_useragent = false, bool fail_on_error = true); + DownloadResult download_to_string_cache(const std::string &url, std::string &result, const std::vector<CommandArg> &additional_args, bool use_browser_useragent = false, DownloadErrorHandler error_handler = nullptr, Path cache_path = ""); + DownloadResult download_to_file(const std::string &url, const std::string &destination_filepath, const std::vector<CommandArg> &additional_args, bool use_browser_useragent = false); + DownloadResult download_to_json(const std::string &url, rapidjson::Document &result, const std::vector<CommandArg> &additional_args, bool use_browser_useragent = false, bool fail_on_error = true); }
\ No newline at end of file diff --git a/include/GoogleCaptcha.hpp b/include/GoogleCaptcha.hpp index 9c998da..62e47fa 100644 --- a/include/GoogleCaptcha.hpp +++ b/include/GoogleCaptcha.hpp @@ -15,7 +15,7 @@ namespace QuickMedia { }; using RequestChallengeResponse = std::function<void(std::optional<GoogleCaptchaChallengeInfo>)>; - std::future<bool> google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback, bool use_tor = false); + std::future<bool> google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback); using PostSolutionResponse = std::function<void(std::optional<std::string>, std::optional<GoogleCaptchaChallengeInfo>)>; - std::future<bool> google_captcha_post_solution(const std::string &api_key, const std::string &captcha_id, std::array<bool, 9> selected_images, PostSolutionResponse solution_response_callback, bool use_tor); + std::future<bool> google_captcha_post_solution(const std::string &api_key, const std::string &captcha_id, std::array<bool, 9> selected_images, PostSolutionResponse solution_response_callback); }
\ No newline at end of file diff --git a/include/Json.hpp b/include/Json.hpp index ae84141..9e1e706 100644 --- a/include/Json.hpp +++ b/include/Json.hpp @@ -5,5 +5,5 @@ namespace QuickMedia { const rapidjson::Value& GetMember(const rapidjson::Value &obj, const char *key); - DownloadResult download_json(rapidjson::Document &result, const std::string &url, std::vector<CommandArg> additional_args, bool use_tor, bool use_browser_useragent = true, std::string *err_msg = nullptr); + DownloadResult download_json(rapidjson::Document &result, const std::string &url, std::vector<CommandArg> additional_args, bool use_browser_useragent = true, std::string *err_msg = nullptr); }
\ No newline at end of file diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index 8c6b02e..ec16feb 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -75,7 +75,6 @@ namespace QuickMedia { ~Program(); int run(int argc, char **argv); - bool is_tor_enabled(); std::unique_ptr<Body> create_body(); std::unique_ptr<SearchBar> create_search_bar(const std::string &placeholder, int search_delay); @@ -164,7 +163,6 @@ namespace QuickMedia { int exit_code = 0; std::string resources_root; sf::Shader circle_mask_shader; - bool use_tor = false; bool no_video = false; bool use_system_mpv_config = false; UpscaleImageAction upscale_image_action = UpscaleImageAction::NO; diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index adb19c8..ea99ea1 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -36,7 +36,7 @@ namespace QuickMedia { }; // @event_callback is called from another thread - VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, bool resume_playback, bool keep_open, EventCallbackFunc event_callback, VideoPlayerWindowCreateCallback window_create_callback, const std::string &resource_root, int monitor_height); + VideoPlayer(bool no_video, bool use_system_mpv_config, bool resume_playback, bool keep_open, EventCallbackFunc event_callback, VideoPlayerWindowCreateCallback window_create_callback, const std::string &resource_root, int monitor_height); ~VideoPlayer(); VideoPlayer(const VideoPlayer&) = delete; VideoPlayer& operator=(const VideoPlayer&) = delete; @@ -72,7 +72,6 @@ namespace QuickMedia { Error launch_video_process(const char *path, sf::WindowHandle parent_window, const std::string &plugin_name, const std::string &title); VideoPlayer::Error read_ipc_func(); private: - bool use_tor; bool no_video; bool use_system_mpv_config; bool resume_playback; |