mirror of
https://github.com/jellyfin/TMDbLib.git
synced 2024-11-23 05:40:12 +00:00
Add default language to trending queries
This commit is contained in:
parent
6420364178
commit
8b5051ae4d
@ -1,6 +1,7 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TMDbLib.Objects.General;
|
||||
using TMDbLib.Objects.Languages;
|
||||
using TMDbLib.Objects.Search;
|
||||
using TMDbLib.Objects.Trending;
|
||||
using TMDbLib.Rest;
|
||||
@ -18,6 +19,9 @@ namespace TMDbLib.Client
|
||||
if (page >= 1)
|
||||
req.AddQueryString("page", page.ToString());
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(DefaultLanguage))
|
||||
req.AddParameter("language", DefaultLanguage);
|
||||
|
||||
SearchContainer<SearchMovie> resp = await req.GetOfT<SearchContainer<SearchMovie>>(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return resp;
|
||||
@ -31,6 +35,9 @@ namespace TMDbLib.Client
|
||||
if (page >= 1)
|
||||
req.AddQueryString("page", page.ToString());
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(DefaultLanguage))
|
||||
req.AddParameter("language", DefaultLanguage);
|
||||
|
||||
SearchContainer<SearchTv> resp = await req.GetOfT<SearchContainer<SearchTv>>(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return resp;
|
||||
@ -44,6 +51,9 @@ namespace TMDbLib.Client
|
||||
if (page >= 1)
|
||||
req.AddQueryString("page", page.ToString());
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(DefaultLanguage))
|
||||
req.AddParameter("language", DefaultLanguage);
|
||||
|
||||
SearchContainer<SearchPerson> resp = await req.GetOfT<SearchContainer<SearchPerson>>(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return resp;
|
||||
|
Loading…
Reference in New Issue
Block a user