diff --git a/TMDbLib/Client/TMDbClientSearch.cs b/TMDbLib/Client/TMDbClientSearch.cs index e68d1892..75f964db 100644 --- a/TMDbLib/Client/TMDbClientSearch.cs +++ b/TMDbLib/Client/TMDbClientSearch.cs @@ -20,8 +20,16 @@ public partial class TMDbClient if (page >= 1) req.AddParameter("page", page); - if (year >= 1) - req.AddParameter("year", year); + if (year >= 1) { + switch (method) { + case "tv": + req.AddParameter("first_air_date_year", year); + break; + default: + req.AddParameter("year", year); + break; + } + } if (includeAdult.HasValue) req.AddParameter("include_adult", includeAdult.Value ? "true" : "false"); @@ -83,9 +91,14 @@ public async Task> SearchKeyword(string query, in return await SearchMethod>("keyword", query, page); } - public async Task> SearchTvShow(string query, int page = 0) + public async Task> SearchTvShow(string query, int page = 0, int year = 0) { - return await SearchMethod>("tv", query, page); + return await SearchMethod>("tv", query, page, year: year); + } + + public async Task> SearchTvShow(string query, string language, int page = 0, int year = 0) + { + return await SearchMethod>("tv", query, page, language, year: year); } } } \ No newline at end of file diff --git a/TMDbLib/Objects/Search/SearchMulti.cs b/TMDbLib/Objects/Search/SearchMulti.cs index fdebea94..b738cda3 100644 --- a/TMDbLib/Objects/Search/SearchMulti.cs +++ b/TMDbLib/Objects/Search/SearchMulti.cs @@ -20,6 +20,7 @@ public class SearchMulti public bool Adult { get; set; } public DateTime? ReleaseDate { get; set; } public MediaType Type { get; set; } + public List GenreIds { get; set; } public List OriginCountry { get; set; } public string MediaType diff --git a/TMDbLib/TMDbLib.csproj b/TMDbLib/TMDbLib.csproj index 8199111f..68b57a4a 100644 --- a/TMDbLib/TMDbLib.csproj +++ b/TMDbLib/TMDbLib.csproj @@ -35,9 +35,8 @@ false - - ..\packages\RestSharp.104.4.0\lib\net4\RestSharp.dll - False + + ..\..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll True @@ -202,7 +201,6 @@ -