mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-30 23:47:17 +02:00
Rename WebClientStringResult.Content to WebClientStringResult.ContentString
This commit is contained in:
@@ -73,18 +73,18 @@ namespace Jackett.Server
|
||||
// TODO: fix deprecation warning (remove #pragma to see the build warning)
|
||||
Mapper.Initialize(cfg =>
|
||||
{
|
||||
cfg.CreateMap<WebClientByteResult, WebClientStringResult>().ForMember(x => x.Content, opt => opt.Ignore()).AfterMap((be, str) =>
|
||||
cfg.CreateMap<WebClientByteResult, WebClientStringResult>().ForMember(x => x.ContentString, opt => opt.Ignore()).AfterMap((be, str) =>
|
||||
{
|
||||
var encoding = be.Request.Encoding ?? Encoding.UTF8;
|
||||
str.Content = encoding.GetString(be.Content);
|
||||
str.ContentString = encoding.GetString(be.Content);
|
||||
});
|
||||
|
||||
cfg.CreateMap<WebClientStringResult, WebClientByteResult>().ForMember(x => x.Content, opt => opt.Ignore()).AfterMap((str, be) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(str.Content))
|
||||
if (!string.IsNullOrEmpty(str.ContentString))
|
||||
{
|
||||
var encoding = str.Request.Encoding ?? Encoding.UTF8;
|
||||
be.Content = encoding.GetBytes(str.Content);
|
||||
be.Content = encoding.GetBytes(str.ContentString);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user