1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-23 18:52:28 -04:00

Support relative satellite image URLs

This commit is contained in:
Jon Beniston 2022-12-29 20:55:33 +00:00
parent f45e949e62
commit 3c7cbce8ff

View File

@ -253,9 +253,17 @@ void SatelliteSelectionDialog::displaySatInfo(const QString& name)
ui->satInfo->setText(info.join("\n")); ui->satInfo->setText(info.join("\n"));
if (!sat->m_image.isEmpty()) if (!sat->m_image.isEmpty())
m_networkManager->get(QNetworkRequest(QUrl(sat->m_image))); {
if (sat->m_image.startsWith("http")) {
m_networkManager->get(QNetworkRequest(QUrl(sat->m_image)));
} else {
m_networkManager->get(QNetworkRequest(QUrl("https://db-satnogs.freetls.fastly.net/media/" + sat->m_image)));
}
}
else else
{
ui->satImage->setPixmap(QPixmap()); ui->satImage->setPixmap(QPixmap());
}
} }
// Open the Satellite's webpage // Open the Satellite's webpage