Don't replace space with + in url, let encodeUrl take care of spaces

This commit is contained in:
zvon 2019-05-29 23:16:18 +02:00
parent 49149bf86f
commit 6714d3f437

View File

@ -243,8 +243,6 @@ void findSeasons( std::map< int, std::set< string > > &seasons,
} }
string getDefUrl( string &show, const string &language, Curl &c ) { string getDefUrl( string &show, const string &language, Curl &c ) {
std::replace( show.begin(), show.end(), ' ', '+' );
string base_url = TEXT( "https://www.thetvdb.com" ); string base_url = TEXT( "https://www.thetvdb.com" );
#ifdef _WIN32 #ifdef _WIN32
@ -395,7 +393,6 @@ bool findLanguage( const char_t *language ) {
std::vector< std::pair< string, string > > std::vector< std::pair< string, string > >
getPossibleShows( string show, const string &language, Curl &c ) { getPossibleShows( string show, const string &language, Curl &c ) {
// encode show name so it can be resolved as url // encode show name so it can be resolved as url
std::replace( show.begin(), show.end(), ' ', '+' );
show = encodeUrl( show ); show = encodeUrl( show );
#ifdef _WIN32 #ifdef _WIN32
auto source_code = utf8_to_wstring( auto source_code = utf8_to_wstring(