1
0
Fork 0
forked from len0rd/rockbox

Use template pattern for genlang url.

Instead of hard coding the query part of the genlang url store the full url as
template and replace parts as done for other urls as well.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29669 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2011-04-02 08:59:00 +00:00
parent f608229f32
commit 2f7cf08532
2 changed files with 7 additions and 4 deletions

View file

@ -63,9 +63,12 @@ bool VoiceFileCreator::createVoiceFile()
version = version.left(version.indexOf("-")).remove("r"); version = version.left(version.indexOf("-")).remove("r");
//prepare download url //prepare download url
QUrl genlangUrl = SystemInfo::value(SystemInfo::GenlangUrl).toString() QString genlang = SystemInfo::value(SystemInfo::GenlangUrl).toString();
+"?lang=" + m_lang + "&t=" + target + "&rev=" + version + "&f=" + features; genlang.replace("%LANG%", m_lang);
genlang.replace("%TARGET%", target);
genlang.replace("%REVISION%", version);
genlang.replace("%FEATURES%", features);
QUrl genlangUrl(genlang);
qDebug() << "[VoiceFileCreator] downloading " << genlangUrl; qDebug() << "[VoiceFileCreator] downloading " << genlangUrl;
//download the correct genlang output //download the correct genlang output

View file

@ -7,7 +7,7 @@ bleeding_url=http://build.rockbox.org/data/rockbox-%MODEL%.zip
; voice files ; voice files
release_voice_url=http://download.rockbox.org/release/%RELVERSION%/%MODEL%-%RELVERSION%-english.zip release_voice_url=http://download.rockbox.org/release/%RELVERSION%/%MODEL%-%RELVERSION%-english.zip
daily_voice_url=http://download.rockbox.org/daily/voices/%MODEL%-%DATE%-english.zip daily_voice_url=http://download.rockbox.org/daily/voices/%MODEL%-%DATE%-english.zip
genlang_url=http://www.rockbox.org/genlang/ genlang_url=http://www.rockbox.org/genlang/?lang=%LANG%&t=%TARGET%&rev=%REVISION%&f=%FEATURES%
; bootloader ; bootloader
bootloader_info_url=http://download.rockbox.org/bootloader/bootloaders-info bootloader_info_url=http://download.rockbox.org/bootloader/bootloaders-info