From 133e7ca171d702783bd018aef80ccca039383b77 Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Sun, 29 May 2022 01:47:31 +0800 Subject: [PATCH] private GetActorImageUrl --- Jellyfin.Plugin.JavTube/ApiClient.cs | 14 -------------- .../Providers/MovieProvider.cs | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Jellyfin.Plugin.JavTube/ApiClient.cs b/Jellyfin.Plugin.JavTube/ApiClient.cs index aba1309..6b90323 100644 --- a/Jellyfin.Plugin.JavTube/ApiClient.cs +++ b/Jellyfin.Plugin.JavTube/ApiClient.cs @@ -99,20 +99,6 @@ public static class ApiClient return ComposeImageApiUrl(BackdropImageApi, id, provider, url, position, auto); } - public static async Task GetActorImageUrl(string name, CancellationToken cancellationToken) - { - try - { - // Use GFriends as actor image provider. - return (await GetActorInfo(name, Constant.GFriends, cancellationToken)).Images[0]; - } - catch (Exception) - { - // Ignore all exceptions and return empty url. - return string.Empty; - } - } - public static async Task GetActorInfo(string id, string provider, CancellationToken cancellationToken) { diff --git a/Jellyfin.Plugin.JavTube/Providers/MovieProvider.cs b/Jellyfin.Plugin.JavTube/Providers/MovieProvider.cs index 2752148..e239002 100644 --- a/Jellyfin.Plugin.JavTube/Providers/MovieProvider.cs +++ b/Jellyfin.Plugin.JavTube/Providers/MovieProvider.cs @@ -89,7 +89,7 @@ public class MovieProvider : BaseProvider, IRemoteMetadataProvider GetActorImageUrl(string name, CancellationToken cancellationToken) + { + try + { + // Use GFriends as actor image provider. + return (await ApiClient.GetActorInfo(name, Constant.GFriends, cancellationToken)).Images[0]; + } + catch (Exception) + { + // Ignore all exceptions and return empty url. + return string.Empty; + } + } } \ No newline at end of file