Use FollowRedirectsAttribute everywhere
This commit is contained in:
@@ -46,7 +46,11 @@ OVHLyricsProvider::OVHLyricsProvider(QObject *parent) : JsonLyricsProvider("Lyri
|
||||
bool OVHLyricsProvider::StartSearch(const QString &artist, const QString &album, const QString &title, const quint64 id) {
|
||||
|
||||
QUrl url(kUrlSearch + QString(QUrl::toPercentEncoding(artist)) + "/" + QString(QUrl::toPercentEncoding(title)));
|
||||
QNetworkReply *reply = network_->get(QNetworkRequest(url));
|
||||
QNetworkRequest req(url);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
|
||||
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||
#endif
|
||||
QNetworkReply *reply = network_->get(req);
|
||||
NewClosure(reply, SIGNAL(finished()), this, SLOT(HandleSearchReply(QNetworkReply*, const quint64, const QString&, const QString&)), reply, id, artist, title);
|
||||
|
||||
//qLog(Debug) << "OVHLyrics: Sending request for" << url;
|
||||
|
||||
Reference in New Issue
Block a user