New: (Indexer) Rutracker.org (#371)

* first attempt at sc definition

* add dologin. seems to return html instead of json

* barebones working setup

* added category but errors on override

* fixed and tested

* guid fix

* fixed bdmv and dvd releases to report in radarr accepted format

* New: (Indexer) RuTracker

* minor fixes

* somewhat working rutracker org defintion with some filtering

* filter russian letters option implemented

* deal with subtitle languages

* russian filtering pretty good now

* removed sc from branch

* rutracker handles series ok now

* final touches to rutracker

* tore out the captcha

Co-authored-by: Qstick <qstick@gmail.com>
pull/387/head
crusher 3 years ago committed by Qstick
parent 96afb7f327
commit 2c6680e4fa

@ -30,6 +30,7 @@ namespace NzbDrone.Common.Http
public HttpUri Url { get; set; }
public HttpMethod Method { get; set; }
public HttpHeader Headers { get; set; }
public Encoding Encoding { get; set; }
public byte[] ContentData { get; set; }
public string ContentSummary { get; set; }
public bool SuppressHttpError { get; set; }
@ -75,8 +76,15 @@ namespace NzbDrone.Common.Http
public void SetContent(string data)
{
var encoding = HttpHeader.GetEncodingFromContentType(Headers.ContentType);
ContentData = encoding.GetBytes(data);
if (Encoding != null)
{
ContentData = Encoding.GetBytes(data);
}
else
{
var encoding = HttpHeader.GetEncodingFromContentType(Headers.ContentType);
ContentData = encoding.GetBytes(data);
}
}
public void AddBasicAuthentication(string username, string password)

@ -47,7 +47,14 @@ namespace NzbDrone.Common.Http
{
if (_content == null)
{
_content = Headers.GetEncodingFromContentType().GetString(ResponseData);
if (Request.Encoding != null)
{
_content = Request.Encoding.GetString(ResponseData);
}
else
{
_content = Headers.GetEncodingFromContentType().GetString(ResponseData);
}
}
return _content;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save