mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Urldecode extra links before getting pathname from links
Some extras had spaces in filename. This caused url encoded character %20 to be used instead of space in filenames.
This commit is contained in:
parent
3d102bf954
commit
8f5ef9a7a6
@ -22,6 +22,7 @@
|
||||
#include <tinyxml.h>
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include <htmlcxx/html/ParserDom.h>
|
||||
#include <htmlcxx/html/Uri.h>
|
||||
|
||||
namespace bptime = boost::posix_time;
|
||||
|
||||
@ -1503,6 +1504,7 @@ std::vector<gameFile> Downloader::getExtras(const std::string& gamename, const s
|
||||
|
||||
// Get path from download link
|
||||
std::string url = gogAPI->getExtraLink(gamename, id);
|
||||
url = htmlcxx::Uri::decode(url);
|
||||
if (url.find("/extras/") != std::string::npos)
|
||||
{
|
||||
path.assign(url.begin()+url.find("/extras/"), url.begin()+url.find_first_of("?"));
|
||||
|
Loading…
Reference in New Issue
Block a user