mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update omdb provider
This commit is contained in:
parent
70af708741
commit
96e207acb3
@ -51,10 +51,11 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
{
|
{
|
||||||
var result = _jsonSerializer.DeserializeFromStream<RootObject>(stream);
|
var result = _jsonSerializer.DeserializeFromStream<RootObject>(stream);
|
||||||
|
|
||||||
// Only take the name if the user's language is set to english, since Omdb has no localization
|
// Only take the name and rating if the user's language is set to english, since Omdb has no localization
|
||||||
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
item.Name = result.Title;
|
item.Name = result.Title;
|
||||||
|
item.OfficialRating = result.Rated;
|
||||||
}
|
}
|
||||||
|
|
||||||
int year;
|
int year;
|
||||||
@ -66,9 +67,6 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
item.ProductionYear = year;
|
item.ProductionYear = year;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.OfficialRating = result.Rated;
|
|
||||||
|
|
||||||
|
|
||||||
var hasCriticRating = item as IHasCriticRating;
|
var hasCriticRating = item as IHasCriticRating;
|
||||||
if (hasCriticRating != null)
|
if (hasCriticRating != null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user