diff --git a/TMDbLib/Client/TMDbClientFind.cs b/TMDbLib/Client/TMDbClientFind.cs index a0bafd1..81213c2 100644 --- a/TMDbLib/Client/TMDbClientFind.cs +++ b/TMDbLib/Client/TMDbClientFind.cs @@ -20,7 +20,12 @@ namespace TMDbLib.Client public FindContainer Find(FindExternalSource source, string id) { RestRequest req = new RestRequest("find/{id}"); - req.AddUrlSegment("id", HttpUtility.UrlEncode(id)); + + if (source == FindExternalSource.FreeBaseId || source == FindExternalSource.FreeBaseMid) + // No url encoding for freebase Id's (they include /-slashes) + req.AddUrlSegment("id", id); + else + req.AddUrlSegment("id", HttpUtility.UrlEncode(id)); req.AddParameter("external_source", source.GetDescription()); diff --git a/TMDbLibTests/ClientFindTests.cs b/TMDbLibTests/ClientFindTests.cs index 6f973b8..d37fe95 100644 --- a/TMDbLibTests/ClientFindTests.cs +++ b/TMDbLibTests/ClientFindTests.cs @@ -13,8 +13,8 @@ namespace TMDbLibTests private const string tvdbBreakingBadId = "81189"; private const string imdbBreakingBadId = "tt0903747"; private const string tvRageBreakingBadId = "18164"; - private const string freebaseBreakingBadId = "/en/breaking_bad"; - private const string freebaseMidBreakingBadId = "/m/03d34x8"; + private const string freebaseBreakingBadId = "en/breaking_bad"; + private const string freebaseMidBreakingBadId = "m/03d34x8"; [TestInitialize] public void Initiator()