Optimize backdrop

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

View File

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

View File

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

View File

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