mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
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>
This commit is contained in:
@@ -30,6 +30,7 @@ namespace NzbDrone.Common.Http
|
|||||||
public HttpUri Url { get; set; }
|
public HttpUri Url { get; set; }
|
||||||
public HttpMethod Method { get; set; }
|
public HttpMethod Method { get; set; }
|
||||||
public HttpHeader Headers { get; set; }
|
public HttpHeader Headers { get; set; }
|
||||||
|
public Encoding Encoding { get; set; }
|
||||||
public byte[] ContentData { get; set; }
|
public byte[] ContentData { get; set; }
|
||||||
public string ContentSummary { get; set; }
|
public string ContentSummary { get; set; }
|
||||||
public bool SuppressHttpError { get; set; }
|
public bool SuppressHttpError { get; set; }
|
||||||
@@ -75,8 +76,15 @@ namespace NzbDrone.Common.Http
|
|||||||
|
|
||||||
public void SetContent(string data)
|
public void SetContent(string data)
|
||||||
{
|
{
|
||||||
var encoding = HttpHeader.GetEncodingFromContentType(Headers.ContentType);
|
if (Encoding != null)
|
||||||
ContentData = encoding.GetBytes(data);
|
{
|
||||||
|
ContentData = Encoding.GetBytes(data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var encoding = HttpHeader.GetEncodingFromContentType(Headers.ContentType);
|
||||||
|
ContentData = encoding.GetBytes(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddBasicAuthentication(string username, string password)
|
public void AddBasicAuthentication(string username, string password)
|
||||||
|
@@ -47,7 +47,14 @@ namespace NzbDrone.Common.Http
|
|||||||
{
|
{
|
||||||
if (_content == null)
|
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;
|
return _content;
|
||||||
|
1747
src/NzbDrone.Core/Indexers/Definitions/RuTracker.cs
Normal file
1747
src/NzbDrone.Core/Indexers/Definitions/RuTracker.cs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user