getFeed risolve gli URL relativi (fix 'Protocol "" is unknown' sui link di categoria)

This commit is contained in:
2026-08-12 12:05:03 +02:00
parent dd5d35c439
commit dea79aff49
+4 -2
View File
@@ -71,8 +71,10 @@ QNetworkReply *ApiClient::startGet(const QUrl &url)
void ApiClient::getFeed(const QString &url)
{
qDebug() << "getFeed request:" << url;
QNetworkReply *reply = startGet(QUrl(url));
// i link dei feed OPDS sono spesso relativi (/opds/new): risolvi contro il server
const QString resolved = resolveUrl(url);
qDebug() << "getFeed request:" << resolved;
QNetworkReply *reply = startGet(QUrl(resolved));
connect(reply, &QNetworkReply::finished, this, [this, reply]() {
reply->deleteLater();
const int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();