mirror of
https://github.com/jellyfin/TMDbLib.git
synced 2024-11-23 05:40:12 +00:00
Add missing Collection Translations
Found another thing missing I needed. While I haven't actually tested if I hooked it up correctly from within the library I have tested that the api accepts the 'translations' value in the 'append_to_response' query parameter and sends the translations with the other collection info. Example output from the api; ![image](https://github.com/revam/dotnet-tmdblib/assets/7761729/804b284b-aced-4b02-b3be-846046970b40)
This commit is contained in:
parent
2fa2e9df68
commit
208ee02881
@ -73,5 +73,10 @@ namespace TMDbLib.Client
|
||||
{
|
||||
return await GetCollectionMethodInternal<ImagesWithId>(collectionId, CollectionMethods.Images, language, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<TranslationsContainer> GetCollectionTranslationsAsync(int collecitonId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await GetCollectionMethodInternal<TranslationsContainer>(collecitonId, CollectionMethods.Translations, null, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
@ -16,6 +16,9 @@ namespace TMDbLib.Objects.Collections
|
||||
[JsonProperty("images")]
|
||||
public Images Images { get; set; }
|
||||
|
||||
[JsonProperty("translations")]
|
||||
public TranslationsContainer Translations { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
@ -9,6 +9,8 @@ namespace TMDbLib.Objects.Collections
|
||||
[EnumValue("Undefined")]
|
||||
Undefined = 0,
|
||||
[EnumValue("images")]
|
||||
Images = 1
|
||||
Images = 1,
|
||||
[EnumValue("translations")]
|
||||
Translations = 2,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user