mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-29 19:20:28 +00:00
Fixed a bug where aborted audio tracks may be added to the filesystem
cache.
This commit is contained in:
parent
54cc781235
commit
04e8acc416
@ -403,7 +403,10 @@ void HttpDataStream::ThreadProc() {
|
||||
long httpStatusCode = 0;
|
||||
curl_easy_getinfo(this->curlEasy, CURLINFO_RESPONSE_CODE, &httpStatusCode);
|
||||
if (httpStatusCode == 200) {
|
||||
this->state = State::Downloaded;
|
||||
this->state = curlCode != CURLE_OK
|
||||
? State::Aborted
|
||||
: State::Downloaded;
|
||||
|
||||
if (this->reader) {
|
||||
if (this->written > 0) {
|
||||
this->reader->Add(this->written);
|
||||
|
@ -79,6 +79,7 @@ class HttpDataStream : public IDataStream {
|
||||
Cached,
|
||||
Downloading,
|
||||
Retrying,
|
||||
Aborted,
|
||||
Downloaded,
|
||||
Error,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user