aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenter-a-random-username <112093608+enter-a-random-username@users.noreply.github.com>2026-09-15 11:15:56 -0400
committerCody Robibero <cody@robibe.ro>2026-09-15 11:15:56 -0400
commitf62f3cf9b011e15e81d502f35fa9c7668a93aaa5 (patch)
tree52a78ee482b33b9ebbe3850573375d1b5801d988
parentbc753b18ec5923ae1f3026cfe4ad51534521ab2a (diff)
Backport pull request #17924 from jellyfin/release-12.z
Use thumbs for image tmdb image preview Original-merge: d418fd4cb4b607a99c7dd45dd960d755cb876457 Merged-by: crobibero <cody@robibe.ro> Backported-by: Cody Robibero <cody@robibe.ro>
-rw-r--r--MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
index 6b1b54ce02..f6fc90380d 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
@@ -29,6 +29,14 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
// differ in weight by orders of magnitude.
private const int CacheSizeLimit = 100_000;
+ private static readonly Dictionary<string, string> ThumbnailSizes = new Dictionary<string, string>
+ {
+ { "Primary", "w500" },
+ { "Backdrop", "w780" },
+ { "Thumb", "w780" },
+ { "Logo", "w500" },
+ };
+
private readonly MemoryCache _memoryCache;
private readonly TMDbClient _tmDbClient;
@@ -678,6 +686,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
yield return new RemoteImageInfo
{
Url = GetUrl(size, image.FilePath),
+ ThumbnailUrl = GetUrl(ThumbnailSizes.GetValueOrDefault(type.ToString(), string.Empty), image.FilePath),
CommunityRating = image.VoteAverage,
VoteCount = image.VoteCount,
Width = scaleImage ? null : image.Width,