mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-11-01 15:15:09 +01:00
update download-paths for fonts, languages and themes
Downloading themes does not yet work (will switch download-method).
This commit is contained in:
parent
f47e1b55ab
commit
b17fcf4963
@ -56,7 +56,7 @@ string new_update(string rev, string filename)
|
||||
string new_theme(string themename, string filename)
|
||||
{
|
||||
char url[100];
|
||||
sprintf(url, "http://hbf.hamachi-mp.bplaced.net/Themes/%s/%s", themename.c_str(), filename.c_str());
|
||||
sprintf(url, "http://www.nanolx.org/hbf/Themes/%s/%s", themename.c_str(), filename.c_str());
|
||||
|
||||
file = downloadfile(url);
|
||||
if (file.data && file.size > 0)
|
||||
|
@ -86,7 +86,7 @@ void fontDownload(string fontname)
|
||||
|
||||
char buffer[100];
|
||||
msgTxt.SetText(fontname.c_str());
|
||||
sprintf(buffer, "http://download.tuxfamily.org/hbf/Fonts/%s", fontname.c_str());
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/Fonts/%s", fontname.c_str());
|
||||
struct block file = downloadfile(buffer);
|
||||
if (file.data && file.size > 0 && folder_exists())
|
||||
{
|
||||
@ -126,7 +126,7 @@ string FontList()
|
||||
bool stop = false;
|
||||
|
||||
char buffer[100];
|
||||
sprintf(buffer, "http://download.tuxfamily.org/hbf/Fonts/");
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/Fonts/");
|
||||
|
||||
struct block file = downloadfile(buffer);
|
||||
if (file.data != NULL)
|
||||
|
@ -86,7 +86,7 @@ void languageDownload(string languagename)
|
||||
|
||||
char buffer[100];
|
||||
msgTxt.SetText(languagename.c_str());
|
||||
sprintf(buffer, "http://download.tuxfamily.org/hbf/Languages/%s", languagename.c_str());
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/Languages/%s", languagename.c_str());
|
||||
struct block file = downloadfile(buffer);
|
||||
if (file.data && file.size > 0 && folder_exists())
|
||||
{
|
||||
@ -126,7 +126,7 @@ string LanguageList()
|
||||
bool stop = false;
|
||||
|
||||
char buffer[100];
|
||||
sprintf(buffer, "http://download.tuxfamily.org/hbf/Languages/");
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/Languages/");
|
||||
|
||||
struct block file = downloadfile(buffer);
|
||||
if (file.data != NULL)
|
||||
|
@ -84,18 +84,15 @@ void themeDownload(string themename)
|
||||
ResumeGui();
|
||||
|
||||
char buffer[100];
|
||||
// download counter
|
||||
sprintf(buffer, "http://hbf.hamachi-mp.bplaced.net/Themes/counter.php?theme=%s", themename.c_str());
|
||||
msgTxt.SetText(themename.c_str());
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/Themes/%s", themename.c_str());
|
||||
struct block file = downloadfile(buffer);
|
||||
|
||||
sprintf(buffer, "http://hbf.hamachi-mp.bplaced.net/Themes/index.php?path=Themes/%s", themename.c_str());
|
||||
file = downloadfile(buffer);
|
||||
if (file.data != NULL)
|
||||
{
|
||||
string source_themes = (char*)file.data;
|
||||
|
||||
vector<string> themes;
|
||||
source_themes.erase(0, source_themes.find("?path=Themes"));
|
||||
source_themes.erase(0, source_themes.find("../Themes/"));
|
||||
|
||||
while(1)
|
||||
{
|
||||
@ -150,7 +147,7 @@ string ThemeList()
|
||||
bool stop = false;
|
||||
|
||||
char buffer[100];
|
||||
sprintf(buffer, "http://hbf.hamachi-mp.bplaced.net/Themes/");
|
||||
sprintf(buffer, "http://www.nanolx.org/hbf/Themes/");
|
||||
|
||||
struct block file = downloadfile(buffer);
|
||||
if (file.data != NULL)
|
||||
@ -160,16 +157,16 @@ string ThemeList()
|
||||
|
||||
while(1)
|
||||
{
|
||||
if((signed)source_themes.find("?path=Themes/") == -1)
|
||||
if((signed)source_themes.find("../Themes/") == -1)
|
||||
break;
|
||||
|
||||
source_themes.erase(0, source_themes.find("?path=Themes/"));
|
||||
source_themes.erase(0, source_themes.find("../Themes/"));
|
||||
source_themes.erase(0, source_themes.find("/") +1);
|
||||
|
||||
|
||||
if(source_themes.substr(0, source_themes.find("\"")) != "_HBF_")
|
||||
themes.push_back(source_themes.substr(0, source_themes.find("\"")));
|
||||
|
||||
source_themes.erase(0, source_themes.find("download.php"));
|
||||
source_themes.erase(0, source_themes.find("<"));
|
||||
}
|
||||
|
||||
free(file.data);
|
||||
|
Loading…
Reference in New Issue
Block a user