diff --git a/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs b/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs index 63bed89..8cf2014 100644 --- a/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs +++ b/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs @@ -39,7 +39,7 @@ public TmdbApi(ILoggerFactory loggerFactory) var config = Plugin.Instance?.Configuration; var apiKey = string.IsNullOrEmpty(config?.TmdbApiKey) ? DEFAULT_API_KEY : config.TmdbApiKey; var host = string.IsNullOrEmpty(config?.TmdbHost) ? DEFAULT_API_HOST : config.TmdbHost; - _tmDbClient = new TMDbClient(apiKey, true, host, null, config.GetTmdbWebProxy()); + _tmDbClient = new TMDbClient(apiKey, true, host, null, config?.GetTmdbWebProxy()); _tmDbClient.Timeout = TimeSpan.FromSeconds(10); // Not really interested in NotFoundException _tmDbClient.ThrowApiExceptions = false; @@ -597,6 +597,16 @@ public async Task> SearchCollectionAsync(string return _tmDbClient.GetImageUrl(_tmDbClient.Config.Images.StillSizes[^1], filePath).ToString(); } + public string? GetLogoUrl(string filePath) + { + if (string.IsNullOrEmpty(filePath)) + { + return null; + } + + return _tmDbClient.GetImageUrl(_tmDbClient.Config.Images.LogoSizes[^1], filePath).ToString(); + } + /// public void Dispose() { diff --git a/Jellyfin.Plugin.MetaShark/Configuration/configPage.html b/Jellyfin.Plugin.MetaShark/Configuration/configPage.html index e1ab37c..ac10c4d 100644 --- a/Jellyfin.Plugin.MetaShark/Configuration/configPage.html +++ b/Jellyfin.Plugin.MetaShark/Configuration/configPage.html @@ -94,9 +94,9 @@

TheMovieDb

-
勾选后,当影片在豆瓣找不到背景图时,改使用TheMovieDb的补全
+
勾选后,当影片在豆瓣找不到背景图或商标时,改使用TheMovieDb的补全