summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-04-02 08:59:00 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-04-02 08:59:00 +0000
commit2f7cf08532db4c0c4fd119cf39343aacaeed68dd (patch)
treeed645073034284e3d8c06b2c15478e070fd14c00
parentf608229f32711970513b9cc6f3573b8ab6e7ea4b (diff)
downloadrockbox-2f7cf08532db4c0c4fd119cf39343aacaeed68dd.tar.gz
rockbox-2f7cf08532db4c0c4fd119cf39343aacaeed68dd.zip
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
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp9
-rw-r--r--rbutil/rbutilqt/rbutil.ini2
2 files changed, 7 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index a3950ca950..ce4596828f 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -63,9 +63,12 @@ bool VoiceFileCreator::createVoiceFile()
63 version = version.left(version.indexOf("-")).remove("r"); 63 version = version.left(version.indexOf("-")).remove("r");
64 64
65 //prepare download url 65 //prepare download url
66 QUrl genlangUrl = SystemInfo::value(SystemInfo::GenlangUrl).toString() 66 QString genlang = SystemInfo::value(SystemInfo::GenlangUrl).toString();
67 +"?lang=" + m_lang + "&t=" + target + "&rev=" + version + "&f=" + features; 67 genlang.replace("%LANG%", m_lang);
68 68 genlang.replace("%TARGET%", target);
69 genlang.replace("%REVISION%", version);
70 genlang.replace("%FEATURES%", features);
71 QUrl genlangUrl(genlang);
69 qDebug() << "[VoiceFileCreator] downloading " << genlangUrl; 72 qDebug() << "[VoiceFileCreator] downloading " << genlangUrl;
70 73
71 //download the correct genlang output 74 //download the correct genlang output
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini
index 016076bf7b..983e1c9b2a 100644
--- a/rbutil/rbutilqt/rbutil.ini
+++ b/rbutil/rbutilqt/rbutil.ini
@@ -7,7 +7,7 @@ bleeding_url=http://build.rockbox.org/data/rockbox-%MODEL%.zip
7; voice files 7; voice files
8release_voice_url=http://download.rockbox.org/release/%RELVERSION%/%MODEL%-%RELVERSION%-english.zip 8release_voice_url=http://download.rockbox.org/release/%RELVERSION%/%MODEL%-%RELVERSION%-english.zip
9daily_voice_url=http://download.rockbox.org/daily/voices/%MODEL%-%DATE%-english.zip 9daily_voice_url=http://download.rockbox.org/daily/voices/%MODEL%-%DATE%-english.zip
10genlang_url=http://www.rockbox.org/genlang/ 10genlang_url=http://www.rockbox.org/genlang/?lang=%LANG%&t=%TARGET%&rev=%REVISION%&f=%FEATURES%
11 11
12; bootloader 12; bootloader
13bootloader_info_url=http://download.rockbox.org/bootloader/bootloaders-info 13bootloader_info_url=http://download.rockbox.org/bootloader/bootloaders-info