Don't ignore HTTP errors when reading tags from cloud providers.

This commit is contained in:
John Maguire 2012-11-30 16:12:12 +01:00
parent 3972f939f7
commit 90bb00939b

View File

@ -132,6 +132,12 @@ TagLib::ByteVector CloudStream::readBlock(ulong length) {
loop.exec();
reply->deleteLater();
int code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
if (code >= 400) {
qLog(Debug) << "Error retrieving url to tag:" << url_;
return TagLib::ByteVector();
}
QByteArray data = reply->readAll();
TagLib::ByteVector bytes(data.data(), data.size());
cursor_ += data.size();