mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 05:35:20 -05:00
rbutil: Simplify manual download URL handling.
- Don't construct the URL directly. The ServerInfo already has it, use that instead. - Don't manually construct the output filename. ZipInstaller will use the server filename automatically. Change-Id: Ib44616daf5efc95b238418b6e699ccd56c40b011
This commit is contained in:
parent
687edc1866
commit
2b2a7b9ae3
1 changed files with 1 additions and 6 deletions
|
|
@ -65,10 +65,7 @@ void ManualWidget::downloadManual(void)
|
||||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString manual = SystemInfo::platformValue(SystemInfo::Manual).toString();
|
QString manual = ServerInfo::platformValue(ServerInfo::ManualPdfUrl).toString();
|
||||||
if(manual.isEmpty()) {
|
|
||||||
manual = "rockbox-" + SystemInfo::platformValue(SystemInfo::BuildserverModel).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
ProgressLoggerGui* logger = new ProgressLoggerGui(this);
|
ProgressLoggerGui* logger = new ProgressLoggerGui(this);
|
||||||
logger->show();
|
logger->show();
|
||||||
|
|
@ -81,13 +78,11 @@ void ManualWidget::downloadManual(void)
|
||||||
installer->setUrl(ServerInfo::platformValue(
|
installer->setUrl(ServerInfo::platformValue(
|
||||||
ServerInfo::ManualPdfUrl, m_platform).toString());
|
ServerInfo::ManualPdfUrl, m_platform).toString());
|
||||||
installer->setLogSection("Manual (PDF)");
|
installer->setLogSection("Manual (PDF)");
|
||||||
installer->setTarget("/" + manual + ".pdf");
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
installer->setUrl(ServerInfo::platformValue(
|
installer->setUrl(ServerInfo::platformValue(
|
||||||
ServerInfo::ManualZipUrl, m_platform).toString());
|
ServerInfo::ManualZipUrl, m_platform).toString());
|
||||||
installer->setLogSection("Manual (HTML)");
|
installer->setLogSection("Manual (HTML)");
|
||||||
installer->setTarget("/" + manual + "-" + "-html.zip");
|
|
||||||
}
|
}
|
||||||
installer->setLogVersion();
|
installer->setLogVersion();
|
||||||
installer->setUnzip(false);
|
installer->setUnzip(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue