Optimize backdrop

This commit is contained in:
cxfksword 2023-01-18 16:54:05 +08:00
parent b01c8a4b5b
commit 1db3b44cc4
3 changed files with 4 additions and 4 deletions

View File

@ -247,7 +247,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
/// <summary> /// <summary>
/// 浏览器来源请求返回代理地址no-referer对于background-image不生效其他客户端请求返回原始图片地址 /// 浏览器来源请求返回代理地址no-referer对于background-image不生效其他客户端请求返回原始图片地址
/// </summary> /// </summary>
protected string GetProxyImageUrl(string url, bool absolute = false) protected string GetProxyImageUrl(string url, bool absolute = false, bool force = false)
{ {
var fromWeb = false; var fromWeb = false;
var domain = string.Empty; var domain = string.Empty;
@ -258,7 +258,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
fromWeb = clientInfo.Contains("Jellyfin Web"); fromWeb = clientInfo.Contains("Jellyfin Web");
} }
if (fromWeb) if (fromWeb || force)
{ {
var encodedUrl = HttpUtility.UrlEncode(url); var encodedUrl = HttpUtility.UrlEncode(url);
if (absolute) if (absolute)

View File

@ -158,7 +158,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
return new RemoteImageInfo return new RemoteImageInfo
{ {
ProviderName = Name, ProviderName = Name,
Url = this.GetProxyImageUrl(x.Raw, true), Url = this.GetProxyImageUrl(x.Raw, true, true),
Height = x.Height, Height = x.Height,
Width = x.Width, Width = x.Width,
Type = ImageType.Backdrop, Type = ImageType.Backdrop,

View File

@ -158,7 +158,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
return new RemoteImageInfo return new RemoteImageInfo
{ {
ProviderName = Name, ProviderName = Name,
Url = this.GetProxyImageUrl(x.Raw, true), Url = this.GetProxyImageUrl(x.Raw, true, true),
Height = x.Height, Height = x.Height,
Width = x.Width, Width = x.Width,
Type = ImageType.Backdrop, Type = ImageType.Backdrop,