mirror of
https://github.com/jellyfin/TMDbLib.git
synced 2024-11-23 05:40:12 +00:00
Add image languages to collections
This commit is contained in:
parent
8550161dfa
commit
7c48916408
@ -14,10 +14,10 @@ namespace TMDbLib.Client
|
||||
{
|
||||
public async Task<Collection> GetCollectionAsync(int collectionId, CollectionMethods extraMethods = CollectionMethods.Undefined, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
return await GetCollectionAsync(collectionId, DefaultLanguage, extraMethods, cancellationToken).ConfigureAwait(false);
|
||||
return await GetCollectionAsync(collectionId, DefaultLanguage, null, extraMethods, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<Collection> GetCollectionAsync(int collectionId, string language, CollectionMethods extraMethods = CollectionMethods.Undefined, CancellationToken cancellationToken = default(CancellationToken))
|
||||
public async Task<Collection> GetCollectionAsync(int collectionId, string language, string includeImageLanguages, CollectionMethods extraMethods = CollectionMethods.Undefined, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
RestRequest req = _client.Create("collection/{collectionId}");
|
||||
req.AddUrlSegment("collectionId", collectionId.ToString());
|
||||
@ -26,6 +26,10 @@ namespace TMDbLib.Client
|
||||
if (!string.IsNullOrWhiteSpace(language))
|
||||
req.AddParameter("language", language);
|
||||
|
||||
includeImageLanguages = includeImageLanguages ?? DefaultImageLanguage;
|
||||
if (!string.IsNullOrWhiteSpace(includeImageLanguages))
|
||||
req.AddParameter("include_image_language", includeImageLanguages);
|
||||
|
||||
string appends = string.Join(",",
|
||||
Enum.GetValues(typeof(CollectionMethods))
|
||||
.OfType<CollectionMethods>()
|
||||
|
Loading…
Reference in New Issue
Block a user