From 1ba58ba74a767a91b28f44eb75db41455adcaa70 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 27 Apr 2021 14:00:35 +0200 Subject: Add authors page for mangakatana and mangatown, attempt to fix image loading getting stuck, misc fixed related to async in plugins --- src/plugins/Soundcloud.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/Soundcloud.cpp') diff --git a/src/plugins/Soundcloud.cpp b/src/plugins/Soundcloud.cpp index 6740504..90fe144 100644 --- a/src/plugins/Soundcloud.cpp +++ b/src/plugins/Soundcloud.cpp @@ -3,7 +3,6 @@ #include "../../include/StringUtils.hpp" #include "../../include/Scale.hpp" #include -#include namespace QuickMedia { static std::string client_id; @@ -300,14 +299,14 @@ namespace QuickMedia { if(result != 0) return PluginResult::ERR; - std::vector> async_download_threads; + async_download_threads.clear(); for(std::string &script_source : script_sources) { if(string_starts_with(script_source, "//")) script_source = "https://" + script_source.substr(2); else if(string_starts_with(script_source, "/")) script_source = "https://soundcloud.com/" + script_source.substr(1); - async_download_threads.push_back(std::async(std::launch::async, [script_source]() -> std::string { + async_download_threads.push_back(AsyncTask([script_source]() -> std::string { std::string website_data; DownloadResult download_result = download_to_string(script_source, website_data, {}, true); if(download_result != DownloadResult::OK) return ""; -- cgit v1.2.3-70-g09d2