tagreader: Follow redirects when downloading file

Set the QNetworkRequest::FollowRedirectsAttribute attribute to true.
This should be changed to use RedirectPolicyAttribute when all supported
platforms move to 5.9 or greater. Stretch is at 5.7.
This commit is contained in:
Jim Broadus 2021-02-23 21:04:10 -08:00 committed by John Maguire
parent bce55d0efc
commit e479206c45
1 changed files with 2 additions and 0 deletions

View File

@ -113,6 +113,8 @@ TagLib::ByteVector CloudStream::readBlock(ulong length) {
QString("bytes=%1-%2").arg(start).arg(end).toUtf8());
request.setAttribute(QNetworkRequest::CacheLoadControlAttribute,
QNetworkRequest::AlwaysNetwork);
// TODO: Use RedirectPolicyAttribute after baseline moves to Qt 5.9.
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
QNetworkReply* reply = network_->get(request);
connect(reply, SIGNAL(sslErrors(QList<QSslError>)),