1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05: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"));
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
{
ui->satImage->setPixmap(QPixmap());
}
}
// Open the Satellite's webpage