mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update omdb
This commit is contained in:
parent
19292e5c49
commit
a9b015dc74
@ -172,7 +172,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||
result.Item.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
result.HasMetadata = true;
|
||||
|
||||
await new OmdbProvider(_jsonSerializer, _httpClient).Fetch(result.Item, imdbId, cancellationToken).ConfigureAwait(false);
|
||||
await new OmdbProvider(_jsonSerializer, _httpClient).Fetch(result.Item, imdbId, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -211,7 +211,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||
result.Item.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
result.HasMetadata = true;
|
||||
|
||||
await new OmdbProvider(_jsonSerializer, _httpClient).Fetch(result.Item, imdbId, cancellationToken).ConfigureAwait(false);
|
||||
await new OmdbProvider(_jsonSerializer, _httpClient).Fetch(result.Item, imdbId, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -28,7 +28,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||
Current = this;
|
||||
}
|
||||
|
||||
public async Task Fetch(BaseItem item, string imdbId, CancellationToken cancellationToken)
|
||||
public async Task Fetch(BaseItem item, string imdbId, string language, CancellationToken cancellationToken)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
@ -51,7 +51,11 @@ namespace MediaBrowser.Providers.Omdb
|
||||
{
|
||||
var result = _jsonSerializer.DeserializeFromStream<RootObject>(stream);
|
||||
|
||||
item.Name = result.Title;
|
||||
// Only take the name if the user's language is set to english, since Omdb has no localization
|
||||
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
item.Name = result.Title;
|
||||
}
|
||||
|
||||
int year;
|
||||
|
||||
|
@ -297,6 +297,9 @@
|
||||
<Content Include="dashboard-ui\thirdparty\social-share-kit-1.0.4\dist\js\social-share-kit.min.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\thirdparty\viblast.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\voice\voice.css">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
Loading…
x
Reference in New Issue
Block a user