core: refactor http webclient part 4 #8529 (#7653)

Change byte result name to ContentBytes in preparation for merge
This commit is contained in:
Cory
2020-03-14 18:58:50 -05:00
committed by ngosang
parent 823ed8522c
commit c605c9a7ae
18 changed files with 26 additions and 26 deletions

View File

@@ -76,15 +76,15 @@ namespace Jackett.Server
cfg.CreateMap<WebClientByteResult, WebClientStringResult>().ForMember(x => x.ContentString, opt => opt.Ignore()).AfterMap((be, str) =>
{
var encoding = be.Request.Encoding ?? Encoding.UTF8;
str.ContentString = encoding.GetString(be.Content);
str.ContentString = encoding.GetString(be.ContentBytes);
});
cfg.CreateMap<WebClientStringResult, WebClientByteResult>().ForMember(x => x.Content, opt => opt.Ignore()).AfterMap((str, be) =>
cfg.CreateMap<WebClientStringResult, WebClientByteResult>().ForMember(x => x.ContentBytes, opt => opt.Ignore()).AfterMap((str, be) =>
{
if (!string.IsNullOrEmpty(str.ContentString))
{
var encoding = str.Request.Encoding ?? Encoding.UTF8;
be.Content = encoding.GetBytes(str.ContentString);
be.ContentBytes = encoding.GetBytes(str.ContentString);
}
});