mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
adding download helping function
Origin commit data
------------------
Branch: ni/coolstream
Commit: f474e60303
Author: TangoCash <eric@loxat.de>
Date: 2018-09-09 (Sun, 09 Sep 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1733,6 +1733,17 @@ std::string genTmpName(std::string suffix,unsigned int length)
|
|||||||
return Str;
|
return Str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string dlTmpName(std::string url)
|
||||||
|
{
|
||||||
|
if (strstr(url.c_str(), "://"))
|
||||||
|
{
|
||||||
|
std::string tmpname = genTmpName(url.substr(url.find_last_of(".")+1),10);
|
||||||
|
if (downloadUrl(url,tmpname))
|
||||||
|
url = tmpname;
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
// curl
|
// curl
|
||||||
static void *myrealloc(void *ptr, size_t size)
|
static void *myrealloc(void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
|
@@ -164,6 +164,7 @@ std::string iso_8859_1_to_utf8(std::string &str);
|
|||||||
bool utf8_check_is_valid(const std::string &str);
|
bool utf8_check_is_valid(const std::string &str);
|
||||||
|
|
||||||
std::string genTmpName(std::string suffix,unsigned int length);
|
std::string genTmpName(std::string suffix,unsigned int length);
|
||||||
|
std::string dlTmpName(std::string url);
|
||||||
|
|
||||||
// curl
|
// curl
|
||||||
struct MemoryStruct {
|
struct MemoryStruct {
|
||||||
|
Reference in New Issue
Block a user