soundcloud, freesound: use correct curl option for progress bars

Although setting CURLOPT_PROGRESSDATA appears to work to set the pointer
passed into the new CURL_XFERINFOFUNCTION option, the documented option is
now CURLOPT_XFERINFODATA.
This commit is contained in:
Colin Fletcher
2026-01-05 18:09:15 +00:00
parent ca437aebee
commit f026a8acbf
2 changed files with 2 additions and 2 deletions

View File

@@ -552,7 +552,7 @@ Mootcher::fetchAudioFile(std::string originalFileName, std::string theID, std::s
cancel_download = false;
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the progress bar
curl_easy_setopt (curl, CURLOPT_XFERINFOFUNCTION, progress_callback);
curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, this);
curl_easy_setopt (curl, CURLOPT_XFERINFODATA, this);
if (oauth_token == "") {
if (!get_oauth_token()) {

View File

@@ -203,7 +203,7 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
curl_easy_setopt (curl_handle, CURLOPT_NOPROGRESS, 0); // turn on the progress bar
curl_easy_setopt (curl_handle, CURLOPT_XFERINFOFUNCTION, &SoundcloudUploader::progress_callback);
curl_easy_setopt (curl_handle, CURLOPT_PROGRESSDATA, this);
curl_easy_setopt (curl_handle, CURLOPT_XFERINFODATA, this);
curl_multi_add_handle(multi_handle, curl_handle);