From f62f3cf9b011e15e81d502f35fa9c7668a93aaa5 Mon Sep 17 00:00:00 2001 From: enter-a-random-username <112093608+enter-a-random-username@users.noreply.github.com> Date: Tue, 15 Sep 2026 11:15:56 -0400 Subject: Backport pull request #17924 from jellyfin/release-12.z Use thumbs for image tmdb image preview Original-merge: d418fd4cb4b607a99c7dd45dd960d755cb876457 Merged-by: crobibero Backported-by: Cody Robibero --- MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ThumbnailSizes = new Dictionary + { + { "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, -- cgit v1.2.3