mirror of
https://github.com/jellyfin/TMDbLib.git
synced 2024-11-26 23:30:23 +00:00
Merge pull request #346 from cvium/collection_image_language
Add image languages to collections
This commit is contained in:
commit
1fecac67bb
@ -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