From 6d3b1296661a486d511fa12163456f96cfa3fcc7 Mon Sep 17 00:00:00 2001
From: Joe Rogers <1337joe@gmail.com>
Date: Fri, 19 Nov 2021 22:02:26 +0100
Subject: [PATCH] Add image scaling options for tmdb
---
.../Tmdb/Configuration/PluginConfiguration.cs | 41 +++++++++
.../Plugins/Tmdb/Configuration/config.html | 41 ++++++++-
.../Plugins/Tmdb/TmdbClientManager.cs | 91 +++++++++++++++++--
3 files changed, 162 insertions(+), 11 deletions(-)
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
index 9a78a75362..b043da76ca 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
@@ -1,3 +1,4 @@
+using System.Collections.Generic;
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Providers.Plugins.Tmdb
@@ -26,5 +27,45 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// Gets or sets a value indicating the maximum number of cast members to fetch for an item.
///
public int MaxCastMembers { get; set; } = 15;
+
+ ///
+ /// Gets or sets a value indicating the poster image size to fetch.
+ ///
+ public string? PosterSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for poster size.
+ ///
+ public List PosterSizeOptions { get; set; } = new List();
+
+ ///
+ /// Gets or sets a value indicating the backdrop image size to fetch.
+ ///
+ public string? BackdropSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for backdrop size.
+ ///
+ public List BackdropSizeOptions { get; set; } = new List();
+
+ ///
+ /// Gets or sets a value indicating the profile image size to fetch.
+ ///
+ public string? ProfileSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for profile size.
+ ///
+ public List ProfileSizeOptions { get; set; } = new List();
+
+ ///
+ /// Gets or sets a value indicating the still image size to fetch.
+ ///
+ public string? StillSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for still size.
+ ///
+ public List StillSizeOptions { get; set; } = new List();
}
}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
index 12b4c7ca4e..d376df96cc 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
@@ -24,7 +24,22 @@
The maximum number of cast members to fetch for an item.
-
+
+
Image Scaling
+
If size options are not populated then refresh metadata for any item from TMDb and reload this page.