mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
fix wrong season banners getting downloaded
This commit is contained in:
parent
fed320f322
commit
c2228c9a7f
@ -275,6 +275,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
string url = null;
|
string url = null;
|
||||||
int? bannerSeason = null;
|
int? bannerSeason = null;
|
||||||
string resolution = null;
|
string resolution = null;
|
||||||
|
string language = null;
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
@ -282,6 +283,12 @@ namespace MediaBrowser.Providers.TV
|
|||||||
{
|
{
|
||||||
switch (reader.Name)
|
switch (reader.Name)
|
||||||
{
|
{
|
||||||
|
case "Language":
|
||||||
|
{
|
||||||
|
language = reader.ReadElementContentAsString() ?? string.Empty;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "BannerType":
|
case "BannerType":
|
||||||
{
|
{
|
||||||
bannerType = reader.ReadElementContentAsString() ?? string.Empty;
|
bannerType = reader.ReadElementContentAsString() ?? string.Empty;
|
||||||
@ -333,10 +340,21 @@ namespace MediaBrowser.Providers.TV
|
|||||||
}
|
}
|
||||||
else if (string.Equals(bannerType2, "seasonwide", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(bannerType2, "seasonwide", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
// Just grab the first
|
if (string.IsNullOrWhiteSpace(language) || string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
||||||
if (string.IsNullOrWhiteSpace(data.Banner))
|
|
||||||
{
|
{
|
||||||
data.Banner = url;
|
// Just grab the first
|
||||||
|
if (string.IsNullOrWhiteSpace(data.Banner))
|
||||||
|
{
|
||||||
|
data.Banner = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (string.Equals(language, ConfigurationManager.Configuration.PreferredMetadataLanguage, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
// Just grab the first
|
||||||
|
if (string.IsNullOrWhiteSpace(data.LanguageBanner))
|
||||||
|
{
|
||||||
|
data.LanguageBanner = url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user