mirror of
https://github.com/jellyfin/TMDbLib.git
synced 2024-11-23 13:50:14 +00:00
Altered Find method for FreebaseIds
Following up on issue #34, I've altered the Freebase searching so that it now works. At the TMDb forums, a fix was pushed which allowed working with Freebase-Id's. http://www.themoviedb.org/talk/526963d5760ee3490201c360?page=4
This commit is contained in:
parent
89bc439ce3
commit
0978bd7e1f
@ -20,6 +20,11 @@ namespace TMDbLib.Client
|
||||
public FindContainer Find(FindExternalSource source, string id)
|
||||
{
|
||||
RestRequest req = new RestRequest("find/{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());
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user