Merge pull request #1550 from srcejon/fix_satellite_image_url

Sat Tracker: Fix satellite images
This commit is contained in:
Edouard Griffiths 2022-12-31 18:58:54 +01:00 committed by GitHub
commit ddbda51712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

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