VDSoft / TheTVDBApi

A .NET api for the TheTVDB.com database
GNU General Public License v3.0
5 stars 8 forks source link

GetSeriesByName - title to search is not encoded #11

Open DanCooper opened 7 years ago

DanCooper commented 7 years ago

GetSeariesByName has a problem with special charaters. Looks like the String is not encoded before generate the API request, for example:

"Mike & Molly" => return 3 results (and the first one is wrong) "Mike%20%26%20Molly" => return 1 result

ChristophvdF commented 7 years ago

That seams to be right, as I scanned over the code quickly I realize that i totally forgot to encode the data. The fix will have to wait for a while since I am under a big work load by now. Sorry. If you need it quickly, you always can raise a pull request.

bg

DanCooper commented 7 years ago

I'm a vb.NET guy, I've no idea how C#/C++ works ;-) As workaround now I send a encoded string to this methode.

ChristophvdF commented 7 years ago

A fix for your request was committed to the Branch EncodingError please review it and tell me if this fixed your problem. If so I will close this issue and generate a new NuGet Package with the changes.

bg

DanCooper commented 7 years ago

Tested Branch EncodingError, but still get 3 search results for "Mike & Molly".

It works if I use the HttpUtility.UrlEncode-Methode before I use GetSeriesByName(strTitle).