mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-23 21:47:14 -04:00
Return backdrops with text as thumb for tmdb (#11078)
This commit is contained in:
parent
ac33d1593a
commit
c8d93d9352
4 changed files with 31 additions and 28 deletions
|
@ -46,14 +46,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ImageType> GetSupportedImages(BaseItem item)
|
||||
{
|
||||
return new ImageType[]
|
||||
{
|
||||
ImageType.Primary,
|
||||
ImageType.Backdrop
|
||||
};
|
||||
}
|
||||
public IEnumerable<ImageType> GetSupportedImages(BaseItem item) =>
|
||||
[
|
||||
ImageType.Primary,
|
||||
ImageType.Backdrop,
|
||||
ImageType.Thumb
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
|
|
|
@ -47,15 +47,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ImageType> GetSupportedImages(BaseItem item)
|
||||
{
|
||||
return new ImageType[]
|
||||
{
|
||||
ImageType.Primary,
|
||||
ImageType.Backdrop,
|
||||
ImageType.Logo
|
||||
};
|
||||
}
|
||||
public IEnumerable<ImageType> GetSupportedImages(BaseItem item) =>
|
||||
[
|
||||
ImageType.Primary,
|
||||
ImageType.Backdrop,
|
||||
ImageType.Logo,
|
||||
ImageType.Thumb
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
|
|
|
@ -46,15 +46,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ImageType> GetSupportedImages(BaseItem item)
|
||||
{
|
||||
return new ImageType[]
|
||||
{
|
||||
ImageType.Primary,
|
||||
ImageType.Backdrop,
|
||||
ImageType.Logo
|
||||
};
|
||||
}
|
||||
public IEnumerable<ImageType> GetSupportedImages(BaseItem item) =>
|
||||
[
|
||||
ImageType.Primary,
|
||||
ImageType.Backdrop,
|
||||
ImageType.Logo,
|
||||
ImageType.Thumb
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
|
|
|
@ -591,6 +591,15 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
|
|||
{
|
||||
var image = images[i];
|
||||
|
||||
var imageType = type;
|
||||
var language = TmdbUtils.AdjustImageLanguage(image.Iso_639_1, requestLanguage);
|
||||
|
||||
// Return Backdrops with a language specified (it has text) as Thumb.
|
||||
if (imageType == ImageType.Backdrop && !string.IsNullOrEmpty(language))
|
||||
{
|
||||
imageType = ImageType.Thumb;
|
||||
}
|
||||
|
||||
yield return new RemoteImageInfo
|
||||
{
|
||||
Url = GetUrl(size, image.FilePath),
|
||||
|
@ -598,9 +607,9 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
|
|||
VoteCount = image.VoteCount,
|
||||
Width = scaleImage ? null : image.Width,
|
||||
Height = scaleImage ? null : image.Height,
|
||||
Language = TmdbUtils.AdjustImageLanguage(image.Iso_639_1, requestLanguage),
|
||||
Language = language,
|
||||
ProviderName = TmdbUtils.ProviderName,
|
||||
Type = type,
|
||||
Type = imageType,
|
||||
RatingType = RatingType.Score
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue