mirror of https://github.com/Jackett/Jackett
Run dotnet format on solution (#7145)
This commit is contained in:
parent
2fe1e03da9
commit
c12da520a4
|
@ -351,7 +351,7 @@ namespace DateTimeRoutines
|
|||
parsed_time = null;
|
||||
|
||||
string time_zone_r;
|
||||
if(default_format == DateTimeFormat.USA_DATE)
|
||||
if (default_format == DateTimeFormat.USA_DATE)
|
||||
time_zone_r = @"(?:\s*(?'time_zone'UTC|GMT|CST|EST))?";
|
||||
else
|
||||
time_zone_r = @"(?:\s*(?'time_zone'UTC|GMT))?";
|
||||
|
@ -363,13 +363,13 @@ namespace DateTimeRoutines
|
|||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate + parsed_date.LengthOfDate), @"(?<=^\s*,?\s+|^\s*at\s*|^\s*[T\-]\s*)(?'hour'\d{2})\s*:\s*(?'minute'\d{2})\s*:\s*(?'second'\d{2})\s+(?'offset_sign'[\+\-])(?'offset_hh'\d{2}):?(?'offset_mm'\d{2})(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for <date> [h]h:mm[:ss] [PM/AM] [UTC/GMT]
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate + parsed_date.LengthOfDate), @"(?<=^\s*,?\s+|^\s*at\s*|^\s*[T\-]\s*)(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate + parsed_date.LengthOfDate), @"(?<=^\s*,?\s+|^\s*at\s*|^\s*[T\-]\s*)(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?" + time_zone_r + @"(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for [h]h:mm:ss [PM/AM] [UTC/GMT] <date>
|
||||
m = Regex.Match(str.Substring(0, parsed_date.IndexOfDate), @"(?<=^|[^\d])(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[\s,]+)", RegexOptions.Compiled);
|
||||
m = Regex.Match(str.Substring(0, parsed_date.IndexOfDate), @"(?<=^|[^\d])(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?" + time_zone_r + @"(?=$|[\s,]+)", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for [h]h:mm:ss [PM/AM] [UTC/GMT] within <date>
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate, parsed_date.LengthOfDate), @"(?<=^|[^\d])(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[\s,]+)", RegexOptions.Compiled);
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate, parsed_date.LengthOfDate), @"(?<=^|[^\d])(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?" + time_zone_r + @"(?=$|[\s,]+)", RegexOptions.Compiled);
|
||||
}
|
||||
else//look anywhere within string
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ namespace DateTimeRoutines
|
|||
m = Regex.Match(str, @"(?<=^|\s+|\s*T\s*)(?'hour'\d{2})\s*:\s*(?'minute'\d{2})\s*:\s*(?'second'\d{2})\s+(?'offset_sign'[\+\-])(?'offset_hh'\d{2}):?(?'offset_mm'\d{2})?(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for [h]h:mm[:ss] [PM/AM] [UTC/GMT]
|
||||
m = Regex.Match(str, @"(?<=^|\s+|\s*T\s*)(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
m = Regex.Match(str, @"(?<=^|\s+|\s*T\s*)(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?" + time_zone_r + @"(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
if (!m.Success)
|
||||
|
@ -407,7 +407,7 @@ namespace DateTimeRoutines
|
|||
hour -= 12;
|
||||
|
||||
DateTime date_time = new DateTime(1, 1, 1, hour, minute, second);
|
||||
|
||||
|
||||
if (m.Groups["offset_hh"].Success)
|
||||
{
|
||||
int offset_hh = int.Parse(m.Groups["offset_hh"].Value);
|
||||
|
@ -428,7 +428,7 @@ namespace DateTimeRoutines
|
|||
{
|
||||
case "UTC":
|
||||
case "GMT":
|
||||
utc_offset = new TimeSpan(0, 0, 0);
|
||||
utc_offset = new TimeSpan(0, 0, 0);
|
||||
break;
|
||||
case "CST":
|
||||
utc_offset = new TimeSpan(-6, 0, 0);
|
||||
|
@ -597,9 +597,9 @@ namespace DateTimeRoutines
|
|||
}
|
||||
else
|
||||
if (year > 30)
|
||||
year += 1900;
|
||||
else
|
||||
year += 2000;
|
||||
year += 1900;
|
||||
else
|
||||
year += 2000;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -615,4 +615,4 @@ namespace DateTimeRoutines
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
|
||||
namespace Jackett.Common
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Net;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Net;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace Jackett.Common.Helpers
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Jackett.Common.Indexers;
|
||||
|
||||
namespace Jackett.Common
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using AngleSharp.Html.Parser;
|
||||
using AngleSharp.Html.Parser;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -304,9 +304,10 @@ namespace Jackett.Common.Indexers
|
|||
// Release Name
|
||||
string name = tRow.Find("td:eq(1) > a").Text();
|
||||
//issue #3847 replace multi keyword
|
||||
if(!string.IsNullOrEmpty(ReplaceMulti)){
|
||||
if (!string.IsNullOrEmpty(ReplaceMulti))
|
||||
{
|
||||
System.Text.RegularExpressions.Regex regex = new Regex("(?i)([\\.\\- ])MULTI([\\.\\- ])");
|
||||
name = regex.Replace(name, "$1"+ReplaceMulti+"$2");
|
||||
name = regex.Replace(name, "$1" + ReplaceMulti + "$2");
|
||||
}
|
||||
output("Release: " + name);
|
||||
|
||||
|
@ -833,4 +834,4 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
|
@ -112,12 +112,14 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
release.MinimumRatio = 1;
|
||||
release.MinimumSeedTime = 172800; // 48 hours
|
||||
|
||||
var qLink = qRow.Find("a.torrent-filename"); ;
|
||||
var qLink = qRow.Find("a.torrent-filename");
|
||||
;
|
||||
release.Title = qLink.Text().Trim();
|
||||
release.Comments = new Uri(qLink.Attr("href"));
|
||||
release.Guid = release.Comments;
|
||||
|
||||
var qDownload = qRow.Find("a.torrent-download-icon"); ;
|
||||
var qDownload = qRow.Find("a.torrent-download-icon");
|
||||
;
|
||||
release.Link = new Uri(qDownload.Attr("href"));
|
||||
|
||||
var dateStr = qRow.Find("td:eq(3) > span").Text().Trim();
|
||||
|
@ -163,4 +165,4 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
return releases;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,9 +60,9 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
|
||||
var searchUrl = APIUrl;
|
||||
var queryCollection = new NameValueCollection();
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(query.ImdbID))
|
||||
{
|
||||
{
|
||||
queryCollection.Add("imdbid", query.ImdbID);
|
||||
}
|
||||
if (searchString != null)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -235,8 +235,9 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
var torrentId = torrent["torrentId"];
|
||||
|
||||
var time = (string)torrent["time"];
|
||||
if (!string.IsNullOrEmpty(time)) {
|
||||
release.PublishDate = DateTime.ParseExact(time+" +0000", "yyyy-MM-dd HH:mm:ss zzz", CultureInfo.InvariantCulture);
|
||||
if (!string.IsNullOrEmpty(time))
|
||||
{
|
||||
release.PublishDate = DateTime.ParseExact(time + " +0000", "yyyy-MM-dd HH:mm:ss zzz", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
var flags = new List<string>();
|
||||
|
@ -249,7 +250,7 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
if (!string.IsNullOrEmpty(encoding))
|
||||
flags.Add(encoding);
|
||||
|
||||
if(torrent["hasLog"] != null && (bool)torrent["hasLog"])
|
||||
if (torrent["hasLog"] != null && (bool)torrent["hasLog"])
|
||||
{
|
||||
var logScore = (string)torrent["logScore"];
|
||||
flags.Add("Log (" + logScore + "%)");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using AngleSharp.Dom;
|
||||
using AngleSharp.Dom;
|
||||
using AngleSharp.Html.Parser;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig.Bespoke;
|
||||
|
@ -342,12 +342,18 @@ namespace Jackett.Common.Indexers
|
|||
var quality = releaseNode.Id.Trim();
|
||||
switch (quality.ToLowerInvariant())
|
||||
{
|
||||
case "tv720": return "HDTV 720p";
|
||||
case "tv1080": return "HDTV 1080p";
|
||||
case "bd720": return "BDRip 720p";
|
||||
case "bd1080": return "BDRip 1080p";
|
||||
case "hwp": return "SDTV";
|
||||
default: return quality.ToUpperInvariant();
|
||||
case "tv720":
|
||||
return "HDTV 720p";
|
||||
case "tv1080":
|
||||
return "HDTV 1080p";
|
||||
case "bd720":
|
||||
return "BDRip 720p";
|
||||
case "bd1080":
|
||||
return "BDRip 1080p";
|
||||
case "hwp":
|
||||
return "SDTV";
|
||||
default:
|
||||
return quality.ToUpperInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -164,7 +164,7 @@ namespace Jackett.Common.Indexers
|
|||
queryCollection.Add("type", searchType);
|
||||
queryCollection.Add("searchstr", searchTerm);
|
||||
var queryUrl = ScrapeUrl + "?" + queryCollection.GetQueryString();
|
||||
|
||||
|
||||
// Check cache first so we don't query the server for each episode when searching for each episode in a series.
|
||||
lock (cache)
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
var Matches = (long)json["Matches"];
|
||||
|
||||
if(Matches > 0)
|
||||
if (Matches > 0)
|
||||
{
|
||||
var groups = (JArray)json.Groups;
|
||||
|
||||
|
@ -208,7 +208,8 @@ namespace Jackett.Common.Indexers
|
|||
mainTitle = SeriesName;
|
||||
|
||||
synonyms.Add(mainTitle);
|
||||
if (AddSynonyms){
|
||||
if (AddSynonyms)
|
||||
{
|
||||
foreach (string synonym in group["Synonymns"])
|
||||
synonyms.Add(synonym);
|
||||
}
|
||||
|
@ -347,7 +348,7 @@ namespace Jackett.Common.Indexers
|
|||
if (!AllowRaws && releaseTags.Contains("raw", StringComparer.InvariantCultureIgnoreCase))
|
||||
continue;
|
||||
|
||||
var infoString = releaseTags.Aggregate("", (prev, cur) => prev + "[" + cur + "]" );
|
||||
var infoString = releaseTags.Aggregate("", (prev, cur) => prev + "[" + cur + "]");
|
||||
var MinimumSeedTime = 259200;
|
||||
// Additional 5 hours per GB
|
||||
MinimumSeedTime += (int)((Size / 1000000000) * 18000);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
@ -33,4 +33,4 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(4, TorznabCatType.Movies, "Other");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
|
@ -27,4 +27,4 @@ namespace Jackett.Common.Indexers
|
|||
return query.SanitizedSearchTerm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -30,7 +30,7 @@ namespace Jackett.Common.Indexers
|
|||
{ "tell me a story us", "Tell Me a Story"},
|
||||
{ "greys anatomy", "grey's anatomy"}
|
||||
};
|
||||
|
||||
|
||||
private readonly Dictionary<string, string> _commonResultTerms = new Dictionary<string, string>
|
||||
{
|
||||
{ "tell me a story", "Tell Me a Story US"},
|
||||
|
@ -38,12 +38,12 @@ namespace Jackett.Common.Indexers
|
|||
{ "agents of s.h.i.e.l.d.", "Marvels Agents of SHIELD"},
|
||||
{ "legends of tomorrow", "DCs Legends of Tomorrow"}
|
||||
};
|
||||
|
||||
|
||||
private readonly List<string> _absoluteNumbering = new List<string>
|
||||
{
|
||||
"One Piece", "Boruto", "Black Clover", "Fairy Tail", "Super Dragon Ball Heroes"
|
||||
};
|
||||
|
||||
|
||||
public override string[] LegacySiteLinks { get; protected set; } = new string[] {
|
||||
"https://bj-share.me/"
|
||||
};
|
||||
|
@ -158,7 +158,7 @@ namespace Jackett.Common.Indexers
|
|||
// until they or the source from where they get that info fix it...
|
||||
|
||||
if (IsAbsoluteNumbering(title))
|
||||
{
|
||||
{
|
||||
title = Regex.Replace(title, @"(Ep[\.]?[ ]?)|([S]\d\d[Ee])", "");
|
||||
return title;
|
||||
}
|
||||
|
@ -171,14 +171,14 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
else
|
||||
{
|
||||
return title;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
query = query.Clone(); // avoid modifing the original query
|
||||
|
||||
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
||||
// if the search string is empty use the "last 24h torrents" view
|
||||
|
@ -231,7 +231,8 @@ namespace Jackett.Common.Indexers
|
|||
var line = child.TextContent;
|
||||
if (line.StartsWith("Tamanho:"))
|
||||
{
|
||||
var size = line.Substring("Tamanho: ".Length); ;
|
||||
var size = line.Substring("Tamanho: ".Length);
|
||||
;
|
||||
release.Size = ReleaseInfo.GetBytes(size);
|
||||
}
|
||||
else if (line.StartsWith("Lançado em: "))
|
||||
|
@ -243,7 +244,8 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
else if (line.StartsWith("Ano:"))
|
||||
{
|
||||
year = line.Substring("Ano: ".Length); ;
|
||||
year = line.Substring("Ano: ".Length);
|
||||
;
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -255,7 +257,7 @@ namespace Jackett.Common.Indexers
|
|||
var catStr = qCatLink.GetAttribute("href").Split('=')[1];
|
||||
release.Title = FixAbsoluteNumbering(release.Title);
|
||||
|
||||
if(year != "")
|
||||
if (year != "")
|
||||
{
|
||||
release.Title += " " + year;
|
||||
}
|
||||
|
@ -407,7 +409,7 @@ namespace Jackett.Common.Indexers
|
|||
var cleanTitle = Regex.Replace(groupTitle, @" - ((S(\d{2}))?E(\d{1,4}))", "");
|
||||
// Get international title if available, or use the full title if not
|
||||
cleanTitle = InternationalTitle(cleanTitle);
|
||||
|
||||
|
||||
foreach (var resultTerm in _commonResultTerms)
|
||||
{
|
||||
var newTitle = cleanTitle.ToLower().Replace(resultTerm.Key.ToLower(), resultTerm.Value);
|
||||
|
@ -416,7 +418,7 @@ namespace Jackett.Common.Indexers
|
|||
cleanTitle = newTitle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
title = Regex.Replace(title.Trim(), @"\s+", " ");
|
||||
var seasonEp = Regex.Replace(title, @"((S\d{2})?(E\d{2,4})?) .*", "$1");
|
||||
if (seasonEp[0] == '[')
|
||||
|
@ -442,7 +444,7 @@ namespace Jackett.Common.Indexers
|
|||
var cleanTitle = Regex.Replace(title, @" - ((S\d{2})?(E\d{2,4})?)", "");
|
||||
// Get international title if available, or use the full title if not
|
||||
cleanTitle = InternationalTitle(cleanTitle);
|
||||
|
||||
|
||||
foreach (var resultTerm in _commonResultTerms)
|
||||
{
|
||||
var newTitle = cleanTitle.ToLower().Replace(resultTerm.Key.ToLower(), resultTerm.Value);
|
||||
|
@ -451,7 +453,7 @@ namespace Jackett.Common.Indexers
|
|||
cleanTitle = newTitle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var seasonEp = Regex.Replace(title, @"^(.*?) - ((S\d{2})?(E\d{2,4})?)", "$2");
|
||||
if (seasonEp[0] == '[')
|
||||
seasonEp = "";
|
||||
|
@ -484,7 +486,7 @@ namespace Jackett.Common.Indexers
|
|||
release.Description = release.Description.Replace("SD", "480p");
|
||||
release.Description = release.Description.Replace("Dual Áudio", "Dual");
|
||||
// If it ain't nacional there will be the type of the audio / original audio
|
||||
if(release.Description.IndexOf("Nacional") == -1)
|
||||
if (release.Description.IndexOf("Nacional") == -1)
|
||||
{
|
||||
release.Description = Regex.Replace(release.Description, @"(Dual|Legendado|Dublado) \/ (.*?) \/", "$1 /");
|
||||
}
|
||||
|
@ -493,7 +495,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
var cleanDescription = release.Description.Trim().TrimStart('[').TrimEnd(']');
|
||||
String[] titleElements;
|
||||
|
||||
|
||||
//Formats the title so it can be parsed later
|
||||
string[] stringSeparators = new string[] { " / " };
|
||||
titleElements = cleanDescription.Split(stringSeparators, StringSplitOptions.None);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
|
@ -209,4 +209,4 @@ namespace Jackett.Common.Indexers
|
|||
return response.Content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
@ -624,7 +624,8 @@ namespace Jackett.Common.Indexers
|
|||
var matches = expression.Match(redirRequestCookies);
|
||||
while (matches.Success)
|
||||
{
|
||||
if (matches.Groups.Count > 2) cookieDIctionary[matches.Groups[1].Value] = matches.Groups[2].Value;
|
||||
if (matches.Groups.Count > 2)
|
||||
cookieDIctionary[matches.Groups[1].Value] = matches.Groups[2].Value;
|
||||
matches = matches.NextMatch();
|
||||
}
|
||||
return string.Join("; ", cookieDIctionary
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -45,14 +45,14 @@ namespace Jackett.Common.Indexers
|
|||
this.configData.DisplayText.Value = "Only the results from the first search result page are shown, adjust your profile settings to show a reasonable amount (it looks like there's no maximum).";
|
||||
this.configData.DisplayText.Name = "Notice";
|
||||
|
||||
AddCategoryMapping(1, TorznabCatType.Other); // Anderes
|
||||
AddCategoryMapping(2, TorznabCatType.TVAnime); // Anime
|
||||
AddCategoryMapping(1, TorznabCatType.Other); // Anderes
|
||||
AddCategoryMapping(2, TorznabCatType.TVAnime); // Anime
|
||||
AddCategoryMapping(34, TorznabCatType.PC); // Appz/Linux
|
||||
AddCategoryMapping(35, TorznabCatType.PCMac); // Appz/Mac
|
||||
AddCategoryMapping(36, TorznabCatType.PC); // Appz/Other
|
||||
AddCategoryMapping(20, TorznabCatType.PC); // Appz/Win
|
||||
AddCategoryMapping(3, TorznabCatType.TVDocumentary); // Doku/Alle Formate
|
||||
AddCategoryMapping(4, TorznabCatType.Books); // EBooks
|
||||
AddCategoryMapping(3, TorznabCatType.TVDocumentary); // Doku/Alle Formate
|
||||
AddCategoryMapping(4, TorznabCatType.Books); // EBooks
|
||||
AddCategoryMapping(12, TorznabCatType.ConsolePS4); // Games PS / PSX
|
||||
AddCategoryMapping(11, TorznabCatType.ConsoleNDS); // Games/Nintendo DS
|
||||
AddCategoryMapping(10, TorznabCatType.PCGames); // Games/PC
|
||||
|
@ -63,11 +63,11 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(30, TorznabCatType.Other); // International
|
||||
AddCategoryMapping(17, TorznabCatType.Other); // MegaPack
|
||||
AddCategoryMapping(43, TorznabCatType.Movies3D); // Movie/3D
|
||||
AddCategoryMapping(5, TorznabCatType.MoviesDVD); // Movie/DVD/R
|
||||
AddCategoryMapping(6, TorznabCatType.MoviesHD); // Movie/HD 1080p
|
||||
AddCategoryMapping(7, TorznabCatType.MoviesHD); // Movie/HD 720p
|
||||
AddCategoryMapping(5, TorznabCatType.MoviesDVD); // Movie/DVD/R
|
||||
AddCategoryMapping(6, TorznabCatType.MoviesHD); // Movie/HD 1080p
|
||||
AddCategoryMapping(7, TorznabCatType.MoviesHD); // Movie/HD 720p
|
||||
AddCategoryMapping(32, TorznabCatType.MoviesOther); // Movie/TVRip
|
||||
AddCategoryMapping(9, TorznabCatType.MoviesOther); // Movie/XviD,DivX,h264
|
||||
AddCategoryMapping(9, TorznabCatType.MoviesOther); // Movie/XviD,DivX,h264
|
||||
AddCategoryMapping(26, TorznabCatType.XXX); // Movie/XXX
|
||||
AddCategoryMapping(41, TorznabCatType.XXXOther); // Movie/XXX/Other
|
||||
AddCategoryMapping(42, TorznabCatType.XXXPacks); // Movie/XXX/Pack
|
||||
|
@ -105,7 +105,7 @@ namespace Jackett.Common.Indexers
|
|||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
||||
|
||||
var searchString = query.GetQueryString();
|
||||
var searchUrl = BrowseUrl;
|
||||
var queryCollection = new NameValueCollection();
|
||||
|
@ -145,14 +145,15 @@ namespace Jackett.Common.Indexers
|
|||
var qRow = row.Cq();
|
||||
var flagImgs = qRow.Find("table tbody tr: eq(0) td > img");
|
||||
List<string> flags = new List<string>();
|
||||
flagImgs.Each(flagImg => {
|
||||
flagImgs.Each(flagImg =>
|
||||
{
|
||||
var flag = flagImg.GetAttribute("src").Replace("pic/torrent_", "").Replace(".gif", "").ToUpper();
|
||||
if (flag == "OU")
|
||||
release.DownloadVolumeFactor = 0;
|
||||
else
|
||||
flags.Add(flag);
|
||||
});
|
||||
|
||||
|
||||
var titleLink = qRow.Find("table tbody tr:eq(0) td a:has(b)").First();
|
||||
var DLLink = qRow.Find("td.tableb > a:has(img[title=\"Torrent herunterladen\"])").First();
|
||||
release.Comments = new Uri(SiteLink + titleLink.Attr("href").Replace("&hit=1", ""));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
@ -135,7 +135,8 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
else
|
||||
{
|
||||
item = new StringItem { Value = Setting.Default }; ;
|
||||
item = new StringItem { Value = Setting.Default };
|
||||
;
|
||||
}
|
||||
|
||||
item.Name = Setting.Label;
|
||||
|
@ -423,7 +424,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
protected bool checkForError(WebClientStringResult loginResult, IList<errorBlock> errorBlocks)
|
||||
{
|
||||
if(loginResult.Status == HttpStatusCode.Unauthorized) // e.g. used by YGGtorrent
|
||||
if (loginResult.Status == HttpStatusCode.Unauthorized) // e.g. used by YGGtorrent
|
||||
throw new ExceptionWithConfigData("401 Unauthorized, check your credentials", configData);
|
||||
|
||||
if (errorBlocks == null)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
using NLog;
|
||||
|
@ -20,4 +20,4 @@ namespace Jackett.Common.Indexers
|
|||
Type = "private";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,240 +13,241 @@ using NLog;
|
|||
|
||||
namespace Jackett.Common.Indexers
|
||||
{
|
||||
public class Corsarored : BaseWebIndexer
|
||||
{
|
||||
private const int MaxSearchPageLimit = 4;
|
||||
private const int MaxResultsPerPage = 25;
|
||||
public class Corsarored : BaseWebIndexer
|
||||
{
|
||||
private const int MaxSearchPageLimit = 4;
|
||||
private const int MaxResultsPerPage = 25;
|
||||
|
||||
private readonly Dictionary<string, string[]> _apiCategories = new Dictionary<string, string[]>
|
||||
{
|
||||
// 0 = Misc. Probably only shows up in search all anyway
|
||||
["0"] = new[] {"25", "27"},
|
||||
// 1 = TV
|
||||
["1"] = new[] {"1", "14", "22", "23", "24", "29", "31"},
|
||||
// 2 = Movies
|
||||
["2"] = new[] {"4"},
|
||||
// 3 = Music/podcasts/audiobooks
|
||||
["3"] = new[] {"2", "21", "34", "35"},
|
||||
// 4 = ebooks
|
||||
["4"] = new[] {"3", "13", "30", "36"},
|
||||
// 5 = Software
|
||||
["5"] = new[] {"6", "9", "10", "37"},
|
||||
// 6 = Video Games
|
||||
["6"] = new[] {"11", "12", "26", "28", "32"},
|
||||
// 7 = Anime
|
||||
["7"] = new[] {"7", "8"}
|
||||
};
|
||||
private readonly Dictionary<string, string[]> _apiCategories = new Dictionary<string, string[]>
|
||||
{
|
||||
// 0 = Misc. Probably only shows up in search all anyway
|
||||
["0"] = new[] { "25", "27" },
|
||||
// 1 = TV
|
||||
["1"] = new[] { "1", "14", "22", "23", "24", "29", "31" },
|
||||
// 2 = Movies
|
||||
["2"] = new[] { "4" },
|
||||
// 3 = Music/podcasts/audiobooks
|
||||
["3"] = new[] { "2", "21", "34", "35" },
|
||||
// 4 = ebooks
|
||||
["4"] = new[] { "3", "13", "30", "36" },
|
||||
// 5 = Software
|
||||
["5"] = new[] { "6", "9", "10", "37" },
|
||||
// 6 = Video Games
|
||||
["6"] = new[] { "11", "12", "26", "28", "32" },
|
||||
// 7 = Anime
|
||||
["7"] = new[] { "7", "8" }
|
||||
};
|
||||
|
||||
private readonly Dictionary<string, string> _apiHeaders = new Dictionary<string, string>
|
||||
{
|
||||
["Content-Type"] = "application/json"
|
||||
};
|
||||
private readonly Dictionary<string, string> _apiHeaders = new Dictionary<string, string>
|
||||
{
|
||||
["Content-Type"] = "application/json"
|
||||
};
|
||||
|
||||
public Corsarored(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
||||
: base("Corsaro.red",
|
||||
description: "Italian Torrents",
|
||||
link: "https://corsaro.red/",
|
||||
caps: new TorznabCapabilities(),
|
||||
configService: configService,
|
||||
client: wc,
|
||||
logger: l,
|
||||
p: ps,
|
||||
configData: new ConfigurationData())
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "it-it";
|
||||
Type = "public";
|
||||
public Corsarored(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
||||
: base("Corsaro.red",
|
||||
description: "Italian Torrents",
|
||||
link: "https://corsaro.red/",
|
||||
caps: new TorznabCapabilities(),
|
||||
configService: configService,
|
||||
client: wc,
|
||||
logger: l,
|
||||
p: ps,
|
||||
configData: new ConfigurationData())
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "it-it";
|
||||
Type = "public";
|
||||
|
||||
// TNTVillage cats
|
||||
AddCategoryMapping(1, TorznabCatType.TV, "TV Movies");
|
||||
AddCategoryMapping(2, TorznabCatType.Audio, "Music");
|
||||
AddCategoryMapping(3, TorznabCatType.BooksEbook, "eBooks");
|
||||
AddCategoryMapping(4, TorznabCatType.Movies, "Movies");
|
||||
AddCategoryMapping(6, TorznabCatType.PC, "Linux");
|
||||
AddCategoryMapping(7, TorznabCatType.TVAnime, "Anime");
|
||||
AddCategoryMapping(8, TorznabCatType.TVAnime, "Cartoons");
|
||||
AddCategoryMapping(9, TorznabCatType.PC, "Mac Software");
|
||||
AddCategoryMapping(10, TorznabCatType.PC, "Windows Software");
|
||||
AddCategoryMapping(11, TorznabCatType.PCGames, "PC Games");
|
||||
AddCategoryMapping(12, TorznabCatType.Console, "Playstation Games");
|
||||
AddCategoryMapping(13, TorznabCatType.Books, "Textbooks");
|
||||
AddCategoryMapping(14, TorznabCatType.TVDocumentary, "Documentaries");
|
||||
AddCategoryMapping(21, TorznabCatType.AudioVideo, "Music Video");
|
||||
AddCategoryMapping(22, TorznabCatType.TVSport, "Sport");
|
||||
AddCategoryMapping(23, TorznabCatType.TV, "Theater");
|
||||
AddCategoryMapping(24, TorznabCatType.TV, "Wrestling");
|
||||
AddCategoryMapping(25, TorznabCatType.OtherMisc, "Other");
|
||||
AddCategoryMapping(26, TorznabCatType.Console, "Xbox Games");
|
||||
AddCategoryMapping(27, TorznabCatType.Other, "Wallpaper");
|
||||
AddCategoryMapping(28, TorznabCatType.ConsoleOther, "Other Games");
|
||||
AddCategoryMapping(29, TorznabCatType.TV, "TV Series");
|
||||
AddCategoryMapping(30, TorznabCatType.BooksComics, "Comics");
|
||||
AddCategoryMapping(31, TorznabCatType.TV, "TV");
|
||||
AddCategoryMapping(32, TorznabCatType.Console, "Nintendo Games");
|
||||
AddCategoryMapping(34, TorznabCatType.AudioAudiobook, "Audiobook");
|
||||
AddCategoryMapping(35, TorznabCatType.Audio, "Podcasts");
|
||||
AddCategoryMapping(36, TorznabCatType.BooksMagazines, "Newspapers");
|
||||
AddCategoryMapping(37, TorznabCatType.PCPhoneOther, "Phone Apps");
|
||||
}
|
||||
// TNTVillage cats
|
||||
AddCategoryMapping(1, TorznabCatType.TV, "TV Movies");
|
||||
AddCategoryMapping(2, TorznabCatType.Audio, "Music");
|
||||
AddCategoryMapping(3, TorznabCatType.BooksEbook, "eBooks");
|
||||
AddCategoryMapping(4, TorznabCatType.Movies, "Movies");
|
||||
AddCategoryMapping(6, TorznabCatType.PC, "Linux");
|
||||
AddCategoryMapping(7, TorznabCatType.TVAnime, "Anime");
|
||||
AddCategoryMapping(8, TorznabCatType.TVAnime, "Cartoons");
|
||||
AddCategoryMapping(9, TorznabCatType.PC, "Mac Software");
|
||||
AddCategoryMapping(10, TorznabCatType.PC, "Windows Software");
|
||||
AddCategoryMapping(11, TorznabCatType.PCGames, "PC Games");
|
||||
AddCategoryMapping(12, TorznabCatType.Console, "Playstation Games");
|
||||
AddCategoryMapping(13, TorznabCatType.Books, "Textbooks");
|
||||
AddCategoryMapping(14, TorznabCatType.TVDocumentary, "Documentaries");
|
||||
AddCategoryMapping(21, TorznabCatType.AudioVideo, "Music Video");
|
||||
AddCategoryMapping(22, TorznabCatType.TVSport, "Sport");
|
||||
AddCategoryMapping(23, TorznabCatType.TV, "Theater");
|
||||
AddCategoryMapping(24, TorznabCatType.TV, "Wrestling");
|
||||
AddCategoryMapping(25, TorznabCatType.OtherMisc, "Other");
|
||||
AddCategoryMapping(26, TorznabCatType.Console, "Xbox Games");
|
||||
AddCategoryMapping(27, TorznabCatType.Other, "Wallpaper");
|
||||
AddCategoryMapping(28, TorznabCatType.ConsoleOther, "Other Games");
|
||||
AddCategoryMapping(29, TorznabCatType.TV, "TV Series");
|
||||
AddCategoryMapping(30, TorznabCatType.BooksComics, "Comics");
|
||||
AddCategoryMapping(31, TorznabCatType.TV, "TV");
|
||||
AddCategoryMapping(32, TorznabCatType.Console, "Nintendo Games");
|
||||
AddCategoryMapping(34, TorznabCatType.AudioAudiobook, "Audiobook");
|
||||
AddCategoryMapping(35, TorznabCatType.Audio, "Podcasts");
|
||||
AddCategoryMapping(36, TorznabCatType.BooksMagazines, "Newspapers");
|
||||
AddCategoryMapping(37, TorznabCatType.PCPhoneOther, "Phone Apps");
|
||||
}
|
||||
|
||||
private string ApiLatest => $"{SiteLink}api/latests";
|
||||
private string ApiSearch => $"{SiteLink}api/search";
|
||||
private string ApiLatest => $"{SiteLink}api/latests";
|
||||
private string ApiSearch => $"{SiteLink}api/search";
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
base.LoadValuesFromJson(configJson);
|
||||
var releases = await PerformQuery(new TorznabQuery());
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
base.LoadValuesFromJson(configJson);
|
||||
var releases = await PerformQuery(new TorznabQuery());
|
||||
|
||||
await ConfigureIfOK(string.Empty, releases.Any(),
|
||||
() => throw new Exception("Could not find release from this URL."));
|
||||
await ConfigureIfOK(string.Empty, releases.Any(),
|
||||
() => throw new Exception("Could not find release from this URL."));
|
||||
|
||||
return IndexerConfigurationStatus.Completed;
|
||||
}
|
||||
return IndexerConfigurationStatus.Completed;
|
||||
}
|
||||
|
||||
private dynamic CheckResponse(WebClientStringResult result)
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = JsonConvert.DeserializeObject<dynamic>(result.Content);
|
||||
private dynamic CheckResponse(WebClientStringResult result)
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = JsonConvert.DeserializeObject<dynamic>(result.Content);
|
||||
|
||||
switch (json)
|
||||
{
|
||||
case JObject _ when json["ok"] != null && (bool) json["ok"] == false:
|
||||
throw new Exception("Server error");
|
||||
default:
|
||||
return json;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Error("checkResponse() Error: ", e.Message);
|
||||
throw new ExceptionWithConfigData(result.Content, configData);
|
||||
}
|
||||
}
|
||||
switch (json)
|
||||
{
|
||||
case JObject _ when json["ok"] != null && (bool)json["ok"] == false:
|
||||
throw new Exception("Server error");
|
||||
default:
|
||||
return json;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Error("checkResponse() Error: ", e.Message);
|
||||
throw new ExceptionWithConfigData(result.Content, configData);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<dynamic> SendApiRequest(IEnumerable<KeyValuePair<string, string>> data)
|
||||
{
|
||||
var result = await PostDataWithCookiesAndRetry(ApiSearch, data, null, SiteLink, _apiHeaders, null, true);
|
||||
return CheckResponse(result);
|
||||
}
|
||||
private async Task<dynamic> SendApiRequest(IEnumerable<KeyValuePair<string, string>> data)
|
||||
{
|
||||
var result = await PostDataWithCookiesAndRetry(ApiSearch, data, null, SiteLink, _apiHeaders, null, true);
|
||||
return CheckResponse(result);
|
||||
}
|
||||
|
||||
private async Task<dynamic> SendApiRequestLatest()
|
||||
{
|
||||
var result = await RequestStringWithCookiesAndRetry(ApiLatest, null, SiteLink, _apiHeaders);
|
||||
return CheckResponse(result);
|
||||
}
|
||||
private async Task<dynamic> SendApiRequestLatest()
|
||||
{
|
||||
var result = await RequestStringWithCookiesAndRetry(ApiLatest, null, SiteLink, _apiHeaders);
|
||||
return CheckResponse(result);
|
||||
}
|
||||
|
||||
private string GetApiCategory(TorznabQuery query)
|
||||
{
|
||||
var cats = MapTorznabCapsToTrackers(query);
|
||||
if (cats.Count == 0) return "0";
|
||||
string apiCat = null;
|
||||
foreach (var cat in cats.Select(cat =>
|
||||
_apiCategories.FirstOrDefault(kvp => kvp.Value.Contains(cat)).Key))
|
||||
{
|
||||
if (apiCat == null)
|
||||
apiCat = cat;
|
||||
if (apiCat != cat)
|
||||
return "0";
|
||||
private string GetApiCategory(TorznabQuery query)
|
||||
{
|
||||
var cats = MapTorznabCapsToTrackers(query);
|
||||
if (cats.Count == 0)
|
||||
return "0";
|
||||
string apiCat = null;
|
||||
foreach (var cat in cats.Select(cat =>
|
||||
_apiCategories.FirstOrDefault(kvp => kvp.Value.Contains(cat)).Key))
|
||||
{
|
||||
if (apiCat == null)
|
||||
apiCat = cat;
|
||||
if (apiCat != cat)
|
||||
return "0";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return apiCat;
|
||||
}
|
||||
return apiCat;
|
||||
}
|
||||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
var searchString = query.GetQueryString();
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
var searchString = query.GetQueryString();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(searchString))
|
||||
{
|
||||
// no term execute latest search
|
||||
var result = await SendApiRequestLatest();
|
||||
if (string.IsNullOrWhiteSpace(searchString))
|
||||
{
|
||||
// no term execute latest search
|
||||
var result = await SendApiRequestLatest();
|
||||
|
||||
try
|
||||
{
|
||||
// this time is a jarray
|
||||
var json = (JArray) result;
|
||||
try
|
||||
{
|
||||
// this time is a jarray
|
||||
var json = (JArray)result;
|
||||
|
||||
releases.AddRange(json.Select(MakeRelease));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(result.ToString(), ex);
|
||||
}
|
||||
releases.AddRange(json.Select(MakeRelease));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(result.ToString(), ex);
|
||||
}
|
||||
|
||||
return releases;
|
||||
}
|
||||
return releases;
|
||||
}
|
||||
|
||||
var queryCollection = new Dictionary<string, string>
|
||||
{
|
||||
["term"] = searchString,
|
||||
["category"] = GetApiCategory(query)
|
||||
};
|
||||
var queryCollection = new Dictionary<string, string>
|
||||
{
|
||||
["term"] = searchString,
|
||||
["category"] = GetApiCategory(query)
|
||||
};
|
||||
|
||||
for (var page = 1; page <= MaxSearchPageLimit; page++)
|
||||
{
|
||||
// update page number
|
||||
queryCollection["page"] = page.ToString();
|
||||
for (var page = 1; page <= MaxSearchPageLimit; page++)
|
||||
{
|
||||
// update page number
|
||||
queryCollection["page"] = page.ToString();
|
||||
|
||||
var result = await SendApiRequest(queryCollection);
|
||||
try
|
||||
{
|
||||
// this time is a jobject
|
||||
var json = (JObject) result;
|
||||
var result = await SendApiRequest(queryCollection);
|
||||
try
|
||||
{
|
||||
// this time is a jobject
|
||||
var json = (JObject)result;
|
||||
|
||||
// throws exception if json["results"] is null or not a JArray
|
||||
if(json["results"] == null)
|
||||
throw new Exception("Error invalid JSON response");
|
||||
// throws exception if json["results"] is null or not a JArray
|
||||
if (json["results"] == null)
|
||||
throw new Exception("Error invalid JSON response");
|
||||
|
||||
var results = json["results"].Select(MakeRelease).ToList();
|
||||
releases.AddRange(results);
|
||||
if (results.Count < MaxResultsPerPage)
|
||||
break;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(result.ToString(), ex);
|
||||
}
|
||||
}
|
||||
var results = json["results"].Select(MakeRelease).ToList();
|
||||
releases.AddRange(results);
|
||||
if (results.Count < MaxResultsPerPage)
|
||||
break;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(result.ToString(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
return releases;
|
||||
}
|
||||
return releases;
|
||||
}
|
||||
|
||||
private ReleaseInfo MakeRelease(JToken torrent)
|
||||
{
|
||||
//https://corsaro.red/details/E5BB62E2E58C654F4450325046723A3F013CD7A4
|
||||
var release = new ReleaseInfo
|
||||
{
|
||||
Title = (string) torrent["title"],
|
||||
Grabs = (long) torrent["completed"],
|
||||
Description = $"{(string) torrent["category"]} {(string) torrent["description"]}",
|
||||
Seeders = (int) torrent["seeders"],
|
||||
InfoHash = (string) torrent["hash"],
|
||||
MagnetUri = new Uri((string) torrent["magnet"]),
|
||||
Comments = new Uri($"{SiteLink}details/{(string) torrent["hash"]}"),
|
||||
MinimumRatio = 1,
|
||||
MinimumSeedTime = 172800, // 48 hours
|
||||
DownloadVolumeFactor = 0,
|
||||
UploadVolumeFactor = 1
|
||||
};
|
||||
private ReleaseInfo MakeRelease(JToken torrent)
|
||||
{
|
||||
//https://corsaro.red/details/E5BB62E2E58C654F4450325046723A3F013CD7A4
|
||||
var release = new ReleaseInfo
|
||||
{
|
||||
Title = (string)torrent["title"],
|
||||
Grabs = (long)torrent["completed"],
|
||||
Description = $"{(string)torrent["category"]} {(string)torrent["description"]}",
|
||||
Seeders = (int)torrent["seeders"],
|
||||
InfoHash = (string)torrent["hash"],
|
||||
MagnetUri = new Uri((string)torrent["magnet"]),
|
||||
Comments = new Uri($"{SiteLink}details/{(string)torrent["hash"]}"),
|
||||
MinimumRatio = 1,
|
||||
MinimumSeedTime = 172800, // 48 hours
|
||||
DownloadVolumeFactor = 0,
|
||||
UploadVolumeFactor = 1
|
||||
};
|
||||
|
||||
release.Guid = release.Comments;
|
||||
release.Peers = release.Seeders + (int) torrent["leechers"];
|
||||
release.Guid = release.Comments;
|
||||
release.Peers = release.Seeders + (int)torrent["leechers"];
|
||||
|
||||
release.PublishDate = DateTime.Now;
|
||||
if (torrent["last_updated"] != null)
|
||||
release.PublishDate = DateTime.Parse((string) torrent["last_updated"]);
|
||||
release.PublishDate = DateTime.Now;
|
||||
if (torrent["last_updated"] != null)
|
||||
release.PublishDate = DateTime.Parse((string)torrent["last_updated"]);
|
||||
|
||||
var cat = (int) torrent["category"];
|
||||
release.Category = MapTrackerCatToNewznab(cat.ToString());
|
||||
var cat = (int)torrent["category"];
|
||||
release.Category = MapTrackerCatToNewznab(cat.ToString());
|
||||
|
||||
if (torrent["size"] != null)
|
||||
release.Size = (long) torrent["size"];
|
||||
if (torrent["size"] != null)
|
||||
release.Size = (long)torrent["size"];
|
||||
|
||||
return release;
|
||||
}
|
||||
}
|
||||
}
|
||||
return release;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
|
@ -244,4 +244,4 @@ namespace Jackett.Common.Indexers
|
|||
return releases;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -91,7 +91,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
// we remove parts from the original query
|
||||
query = ParseQuery(query);
|
||||
var qc = new NameValueCollection {{"s", query.SearchTerm}};
|
||||
var qc = new NameValueCollection { { "s", query.SearchTerm } };
|
||||
|
||||
var page = 1;
|
||||
var isLastPage = false;
|
||||
|
@ -112,11 +112,12 @@ namespace Jackett.Common.Indexers
|
|||
if (table == null)
|
||||
break;
|
||||
var rows = table.QuerySelectorAll("tr");
|
||||
isLastPage = rows.Length -1 <= MaxResultsPerPage; // rows includes the header
|
||||
isLastPage = rows.Length - 1 <= MaxResultsPerPage; // rows includes the header
|
||||
var isHeader = true;
|
||||
foreach (var row in rows)
|
||||
{
|
||||
if (isHeader) {
|
||||
if (isHeader)
|
||||
{
|
||||
isHeader = false;
|
||||
continue;
|
||||
}
|
||||
|
@ -185,7 +186,8 @@ namespace Jackett.Common.Indexers
|
|||
if (cat == DivxTotalCategories.Series)
|
||||
{
|
||||
await ParseSeriesRelease(releases, query, commentsLink, cat, publishDate);
|
||||
} else if (query.Episode == null) // if it's scene series, we don't return other categories
|
||||
}
|
||||
else if (query.Episode == null) // if it's scene series, we don't return other categories
|
||||
{
|
||||
if (cat == DivxTotalCategories.Peliculas || cat == DivxTotalCategories.PeliculasHd ||
|
||||
cat == DivxTotalCategories.Peliculas3D || cat == DivxTotalCategories.PeliculasDvdr)
|
||||
|
@ -216,7 +218,8 @@ namespace Jackett.Common.Indexers
|
|||
var isHeader = true;
|
||||
foreach (var row in rows)
|
||||
{
|
||||
if (isHeader) {
|
||||
if (isHeader)
|
||||
{
|
||||
isHeader = false;
|
||||
continue;
|
||||
}
|
||||
|
@ -273,8 +276,8 @@ namespace Jackett.Common.Indexers
|
|||
title += " SPANISH BDRip x264";
|
||||
else if (cat == DivxTotalCategories.PeliculasDvdr)
|
||||
{
|
||||
title += " SPANISH DVDR";
|
||||
size = TryToParseSize(sizeStr, DivxTotalFizeSizes.PeliculasDvdr);
|
||||
title += " SPANISH DVDR";
|
||||
size = TryToParseSize(sizeStr, DivxTotalFizeSizes.PeliculasDvdr);
|
||||
}
|
||||
else
|
||||
throw new Exception("Unknown category " + cat);
|
||||
|
@ -323,13 +326,13 @@ namespace Jackett.Common.Indexers
|
|||
// this code split the words, remove words with 2 letters or less, remove accents and lowercase
|
||||
var queryMatches = Regex.Matches(queryStr, @"\b[\w']*\b");
|
||||
var queryWords = from m in queryMatches.Cast<Match>()
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
|
||||
var titleMatches = Regex.Matches(title, @"\b[\w']*\b");
|
||||
var titleWords = from m in titleMatches.Cast<Match>()
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
titleWords = titleWords.ToArray();
|
||||
|
||||
return queryWords.All(word => titleWords.Contains(word));
|
||||
|
@ -413,7 +416,7 @@ namespace Jackett.Common.Indexers
|
|||
private static long TryToParseSize(string sizeToParse, long sizeDefault)
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
return ReleaseInfo.GetBytes(sizeToParse);
|
||||
}
|
||||
catch
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Jackett.Common.Models;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -82,7 +82,7 @@ namespace Jackett.Common.Indexers
|
|||
LoadValuesFromJson(configJson);
|
||||
var responseFirstPage = await RequestStringWithCookiesAndRetry(SiteLink + "login.php?returnto=%2F", "", null);
|
||||
CQ domFirstPage = responseFirstPage.Content;
|
||||
var validator = domFirstPage.Find("input[name =\"validator\"]").Attr("value");
|
||||
var validator = domFirstPage.Find("input[name =\"validator\"]").Attr("value");
|
||||
var pairs = new Dictionary<string, string> {
|
||||
{ "validator", validator},
|
||||
{ "username", configData.Username.Value },
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
@ -44,12 +44,12 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(22, TorznabCatType.PC); // Applications
|
||||
AddCategoryMapping(43, TorznabCatType.AudioAudiobook); // Audio Books
|
||||
AddCategoryMapping(27, TorznabCatType.Books); // Ebook
|
||||
AddCategoryMapping(4, TorznabCatType.PCGames); // Games
|
||||
AddCategoryMapping(4, TorznabCatType.PCGames); // Games
|
||||
AddCategoryMapping(40, TorznabCatType.OtherMisc); // Miscellaneous
|
||||
AddCategoryMapping(19, TorznabCatType.Movies); // Movies
|
||||
AddCategoryMapping(6, TorznabCatType.Audio); // Music
|
||||
AddCategoryMapping(6, TorznabCatType.Audio); // Music
|
||||
AddCategoryMapping(31, TorznabCatType.PCPhoneOther); // Portable
|
||||
AddCategoryMapping(7, TorznabCatType.TV); // TV
|
||||
AddCategoryMapping(7, TorznabCatType.TV); // TV
|
||||
}
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -329,7 +329,8 @@ namespace Jackett.Common.Indexers
|
|||
if (link.Text().Trim().ToLower() == searchTerm.Trim().ToLower())
|
||||
{
|
||||
var address = link.Attr("href");
|
||||
if (string.IsNullOrEmpty(address)) { continue; }
|
||||
if (string.IsNullOrEmpty(address))
|
||||
{ continue; }
|
||||
|
||||
var realAddress = site + address.Replace("lid=7", "lid=24");
|
||||
var realData = await RequestStringWithCookies(realAddress);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -216,7 +216,7 @@ namespace Jackett.Common.Indexers
|
|||
var i = 0;
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query))
|
||||
{
|
||||
queryCollection.Add("artistcheck["+i+"]", cat);
|
||||
queryCollection.Add("artistcheck[" + i + "]", cat);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
@ -278,14 +278,14 @@ namespace Jackett.Common.Indexers
|
|||
var qDLLink = Row.QuerySelector("a[href^=\"torrents.php?action=download\"]");
|
||||
var qTime = Row.QuerySelector("span.time");
|
||||
// some users have an extra colum (8), we can't use nth-last-child
|
||||
var qSize = Row.QuerySelector("td:nth-child(4)");
|
||||
var qSize = Row.QuerySelector("td:nth-child(4)");
|
||||
var qGrabs = Row.QuerySelector("td:nth-child(5)");
|
||||
var qSeeders = Row.QuerySelector("td:nth-child(6)");
|
||||
var qLeechers = Row.QuerySelector("td:nth-child(7)");
|
||||
var qFreeLeech = Row.QuerySelector("strong.freeleech_label");
|
||||
var qNeutralLeech = Row.QuerySelector("strong.neutralleech_label");
|
||||
var RowTitle = Row.GetAttribute("title");
|
||||
|
||||
|
||||
var Time = qTime.GetAttribute("title");
|
||||
release.PublishDate = DateTime.SpecifyKind(DateTime.ParseExact(Time, "MMM dd yyyy, HH:mm", CultureInfo.InvariantCulture), DateTimeKind.Unspecified).ToLocalTime();
|
||||
release.Category = GroupCategory;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -111,8 +111,8 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
var release = new ReleaseInfo();
|
||||
release.Title = (string)r["name"];
|
||||
release.Comments = new Uri(SiteLink+"details.php?id="+(string)r["id"]);
|
||||
release.Link = new Uri(SiteLink+"download.php/"+(string)r["filename"]+"?id="+(string)r["id"]+"&passkey="+configData.Passkey.Value);
|
||||
release.Comments = new Uri(SiteLink + "details.php?id=" + (string)r["id"]);
|
||||
release.Link = new Uri(SiteLink + "download.php/" + (string)r["filename"] + "?id=" + (string)r["id"] + "&passkey=" + configData.Passkey.Value);
|
||||
release.Guid = release.Link;
|
||||
|
||||
if (r.ContainsKey("imdb"))
|
||||
|
@ -126,7 +126,7 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
|
||||
release.UploadVolumeFactor = 1;
|
||||
int[] mediumsFor50 = {1,5,4};
|
||||
int[] mediumsFor50 = { 1, 5, 4 };
|
||||
|
||||
// 100% Neutral Leech: all XXX content.
|
||||
if ((int)r["type_category"] == 7)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -158,7 +158,7 @@ namespace Jackett.Common.Indexers
|
|||
release.Title = (string)torrent["titulo"] + " " + (string)torrent["titulo_extra"];
|
||||
|
||||
// for downloading "premium" torrents you need special account
|
||||
if ((string) torrent["premium"] == "si")
|
||||
if ((string)torrent["premium"] == "si")
|
||||
{
|
||||
if (includePremium)
|
||||
release.Title += " [PREMIUM]";
|
||||
|
@ -181,7 +181,7 @@ namespace Jackett.Common.Indexers
|
|||
release.Grabs = (long)torrent["snatched"];
|
||||
|
||||
release.InfoHash = (string)torrent["plain_info_hash"];
|
||||
release.Link = new Uri(DownloadUrl + (string) torrent["id"]);
|
||||
release.Link = new Uri(DownloadUrl + (string)torrent["id"]);
|
||||
|
||||
var files = (JArray)JsonConvert.DeserializeObject<dynamic>((string)torrent["files_list"]);
|
||||
release.Files = files.Count;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -128,7 +128,8 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
// this tracker has horrible markup, find the result rows by looking for the style tag before each one
|
||||
var prev = row.PreviousElementSibling;
|
||||
if (prev == null || prev.NodeName.ToLowerInvariant() != "style") continue;
|
||||
if (prev == null || prev.NodeName.ToLowerInvariant() != "style")
|
||||
continue;
|
||||
|
||||
CQ qRow = row.Cq();
|
||||
var release = new ReleaseInfo();
|
||||
|
|
|
@ -157,11 +157,13 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
release.MinimumRatio = 1;
|
||||
release.MinimumSeedTime = 172800; // 48 hours
|
||||
|
||||
|
||||
int tdIndex = 0;
|
||||
if(qRow.Find("td:nth-last-child(1)").Text() == "Edit") tdIndex = 1;
|
||||
if (qRow.Find("td:nth-last-child(1)").Text() == "Edit")
|
||||
tdIndex = 1;
|
||||
// moderators get additional delete, recomend and like links
|
||||
if (qRow.Find("td:nth-last-child(4)").Text() == "Edit") tdIndex = 4;
|
||||
if (qRow.Find("td:nth-last-child(4)").Text() == "Edit")
|
||||
tdIndex = 4;
|
||||
|
||||
// Sometimes the uploader column is missing
|
||||
if (ParseUtil.TryCoerceInt(qRow.Find($"td:nth-last-child({tdIndex + 3})").Text(), out int seeders))
|
||||
|
@ -200,7 +202,7 @@ namespace Jackett.Common.Indexers
|
|||
release.DownloadVolumeFactor = 0;
|
||||
release.UploadVolumeFactor = 0;
|
||||
}
|
||||
else if(hasFreeleech)
|
||||
else if (hasFreeleech)
|
||||
release.DownloadVolumeFactor = 0;
|
||||
else if (qRow.Find("img[alt=\"Silver Torrent\"]").Length >= 1)
|
||||
release.DownloadVolumeFactor = 0.5;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -170,7 +170,7 @@ namespace Jackett.Common.Indexers
|
|||
foreach (string apiUrl in apiUrls)
|
||||
{
|
||||
int nextId = 0;
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
var showAPIResponse = await RequestStringWithCookiesAndRetry(apiUrl + "&nextid=" + nextId, string.Empty);
|
||||
var showAPIdom = ResultParser.ParseDocument(showAPIResponse.Content);
|
||||
|
@ -178,7 +178,8 @@ namespace Jackett.Common.Indexers
|
|||
releaserows.AddRange(releaseRowResults);
|
||||
nextId++;
|
||||
|
||||
if (releaseRowResults.Length == 0 || latestOnly) {
|
||||
if (releaseRowResults.Length == 0 || latestOnly)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
|
@ -159,11 +159,11 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
var result = new ConfigurationDataBasicLogin
|
||||
{
|
||||
SiteLink = {Value = configData.SiteLink.Value},
|
||||
Instructions = {Value = configData.Instructions.Value},
|
||||
Username = {Value = configData.Username.Value},
|
||||
Password = {Value = configData.Password.Value},
|
||||
CookieHeader = {Value = loginPage.Cookies}
|
||||
SiteLink = { Value = configData.SiteLink.Value },
|
||||
Instructions = { Value = configData.Instructions.Value },
|
||||
Username = { Value = configData.Username.Value },
|
||||
Password = { Value = configData.Password.Value },
|
||||
CookieHeader = { Value = loginPage.Cookies }
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ namespace Jackett.Common.Indexers
|
|||
var release = new ReleaseInfo();
|
||||
var qRow = row.Cq();
|
||||
var qTitleLink = qRow.Find("a[href^=\"/details.php?id=\"]").First();
|
||||
// drop invalid char that seems to have cropped up in some titles. #6582
|
||||
// drop invalid char that seems to have cropped up in some titles. #6582
|
||||
release.Title = qTitleLink.Text().Trim().Replace("\u000f", "");
|
||||
|
||||
// If we search an get no results, we still get a table just with no info.
|
||||
|
@ -270,7 +270,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
var descString = qRow.Find(".t_ctime").Text();
|
||||
var dateString = descString.Split('|').Last().Trim();
|
||||
dateString = dateString.Split(new [] { " by " }, StringSplitOptions.None)[0];
|
||||
dateString = dateString.Split(new[] { " by " }, StringSplitOptions.None)[0];
|
||||
release.PublishDate = DateTimeUtil.FromTimeAgo(dateString);
|
||||
|
||||
var qLink = row.ChildElements.ElementAt(3).Cq().Children("a");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
|
|
@ -58,14 +58,16 @@ namespace Jackett.Common.Indexers
|
|||
{"publicdate", "created"},
|
||||
{"downloads", "downloads"},
|
||||
{"item_size", "size"}
|
||||
}) {Name = "Sort requested from site", Value = "publicdate"};
|
||||
})
|
||||
{ Name = "Sort requested from site", Value = "publicdate" };
|
||||
configData.AddDynamic("sort", sort);
|
||||
|
||||
var order = new SelectItem(new Dictionary<string, string>
|
||||
{
|
||||
{"desc", "desc"},
|
||||
{"asc", "asc"},
|
||||
}) {Name = "Order requested from site", Value = "desc"};
|
||||
})
|
||||
{ Name = "Order requested from site", Value = "desc" };
|
||||
configData.AddDynamic("order", order);
|
||||
|
||||
var titleOnly = new BoolItem() { Name = "Search only in title", Value = true };
|
||||
|
@ -99,10 +101,10 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
base.LoadValuesFromJson(jsonConfig, useProtectionService);
|
||||
|
||||
var sort = (SelectItem) configData.GetDynamic("sort");
|
||||
var sort = (SelectItem)configData.GetDynamic("sort");
|
||||
_sort = sort != null ? sort.Value : "publicdate";
|
||||
|
||||
var order = (SelectItem) configData.GetDynamic("order");
|
||||
var order = (SelectItem)configData.GetDynamic("order");
|
||||
_order = order != null && order.Value.Equals("asc") ? "" : "-";
|
||||
|
||||
var titleOnly = (BoolItem)configData.GetDynamic("titleOnly");
|
||||
|
@ -125,7 +127,7 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
var querycats = MapTorznabCapsToTrackers(query);
|
||||
if (querycats.Any())
|
||||
searchTerm += " AND mediatype:(" + string.Join( " OR ", querycats) + ")";
|
||||
searchTerm += " AND mediatype:(" + string.Join(" OR ", querycats) + ")";
|
||||
|
||||
var qc = new NameValueCollection
|
||||
{
|
||||
|
@ -166,7 +168,7 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
var release = new ReleaseInfo();
|
||||
|
||||
var id = (string) torrent["identifier"];
|
||||
var id = (string)torrent["identifier"];
|
||||
var title = torrent["title"] is JArray ?
|
||||
(string)((JArray)torrent["title"])[0] :
|
||||
(string)torrent["title"];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace Jackett.Common.Indexers
|
|||
// we remove parts from the original query
|
||||
query = ParseQuery(query);
|
||||
|
||||
var releases = string.IsNullOrEmpty(query.SearchTerm) ?
|
||||
var releases = string.IsNullOrEmpty(query.SearchTerm) ?
|
||||
await PerformQueryNewest(query) :
|
||||
await PerformQuerySearch(query, matchWords);
|
||||
|
||||
|
@ -111,8 +111,8 @@ namespace Jackett.Common.Indexers
|
|||
searchResultParser = new HtmlParser();
|
||||
html = searchResultParser.ParseDocument(result.Content);
|
||||
var onclick = html.QuerySelector("a[onclick*=\"/uploads/\"]").GetAttribute("onclick");
|
||||
var table = onclick.Split(new[] {"table: '"}, StringSplitOptions.None)[1].Split(new [] {"'"}, StringSplitOptions.None)[0];
|
||||
var name = onclick.Split(new[] {"name: '"}, StringSplitOptions.None)[1].Split(new [] {"'"}, StringSplitOptions.None)[0];
|
||||
var table = onclick.Split(new[] { "table: '" }, StringSplitOptions.None)[1].Split(new[] { "'" }, StringSplitOptions.None)[0];
|
||||
var name = onclick.Split(new[] { "name: '" }, StringSplitOptions.None)[1].Split(new[] { "'" }, StringSplitOptions.None)[0];
|
||||
downloadUrl = SiteLink + "uploads/torrents/" + table + "/" + name;
|
||||
|
||||
// Eg https://www.mejortorrentt.org/uploads/torrents/peliculas/Harry_Potter_1_y_la_Piedra_Filosofal_MicroHD_1080p.torrent
|
||||
|
@ -158,9 +158,9 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
// we add parsed items to parsedCommentsLink to avoid duplicates in newest torrents
|
||||
// list results
|
||||
if(!parsedCommentsLink.Contains(rowCommentsLink))
|
||||
if (!parsedCommentsLink.Contains(rowCommentsLink))
|
||||
{
|
||||
await ParseRelease(releases, rowTitle, rowCommentsLink, null,
|
||||
await ParseRelease(releases, rowTitle, rowCommentsLink, null,
|
||||
rowPublishDate, rowQuality, query, false);
|
||||
parsedCommentsLink.Add(rowCommentsLink);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ namespace Jackett.Common.Indexers
|
|||
var releases = new List<ReleaseInfo>();
|
||||
// search only the longest word, we filter the results later
|
||||
var searchTerm = GetLongestWord(query.SearchTerm);
|
||||
var qc = new NameValueCollection {{"sec", "buscador"}, {"valor", searchTerm}};
|
||||
var qc = new NameValueCollection { { "sec", "buscador" }, { "valor", searchTerm } };
|
||||
var url = SiteLink + SearchUrl + "?" + qc.GetQueryString();
|
||||
var result = await RequestStringWithCookies(url);
|
||||
if (result.Status != HttpStatusCode.OK)
|
||||
|
@ -216,7 +216,7 @@ namespace Jackett.Common.Indexers
|
|||
if (row.QuerySelector("td span") != null)
|
||||
rowQuality = row.QuerySelector("td span").TextContent;
|
||||
|
||||
await ParseRelease(releases, rowTitle, rowCommentsLink, rowMejortorrentCat,
|
||||
await ParseRelease(releases, rowTitle, rowCommentsLink, rowMejortorrentCat,
|
||||
null, rowQuality, query, matchWords);
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,8 @@ namespace Jackett.Common.Indexers
|
|||
if (cat == MejorTorrentCatType.Serie || cat == MejorTorrentCatType.SerieHd)
|
||||
{
|
||||
await ParseSeriesRelease(releases, query, title, commentsLink, cat, publishDate);
|
||||
} else if (query.Episode == null) // if it's scene series, we don't return other categories
|
||||
}
|
||||
else if (query.Episode == null) // if it's scene series, we don't return other categories
|
||||
{
|
||||
if (cat == MejorTorrentCatType.Pelicula)
|
||||
ParseMovieRelease(releases, query, title, commentsLink, cat, publishDate, quality);
|
||||
|
@ -397,13 +398,13 @@ namespace Jackett.Common.Indexers
|
|||
// this code split the words, remove words with 2 letters or less, remove accents and lowercase
|
||||
var queryMatches = Regex.Matches(queryStr, @"\b[\w']*\b");
|
||||
var queryWords = from m in queryMatches.Cast<Match>()
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
|
||||
var titleMatches = Regex.Matches(title, @"\b[\w']*\b");
|
||||
var titleWords = from m in titleMatches.Cast<Match>()
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
where !string.IsNullOrEmpty(m.Value) && m.Value.Length > 2
|
||||
select Encoding.UTF8.GetString(Encoding.GetEncoding("ISO-8859-8").GetBytes(m.Value.ToLower()));
|
||||
titleWords = titleWords.ToArray();
|
||||
|
||||
return queryWords.All(word => titleWords.Contains(word));
|
||||
|
@ -449,7 +450,7 @@ namespace Jackett.Common.Indexers
|
|||
// title = The Mandalorian - 1ª Temporada
|
||||
// title = The Mandalorian - 1ª Temporada [720p]
|
||||
// title = Grace and Frankie - 5ª Temporada [720p]: 5x08 al 5x13.
|
||||
var newTitle = title.Split(new [] { " - " }, StringSplitOptions.RemoveEmptyEntries)[0].Trim();
|
||||
var newTitle = title.Split(new[] { " - " }, StringSplitOptions.RemoveEmptyEntries)[0].Trim();
|
||||
// newTitle = The Mandalorian
|
||||
|
||||
// parse episode title
|
||||
|
@ -464,7 +465,7 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
if (newEpisodeTitle.Equals(""))
|
||||
{
|
||||
newEpisodeTitle += "S" + m.Groups[1].Value.PadLeft(2, '0')
|
||||
newEpisodeTitle += "S" + m.Groups[1].Value.PadLeft(2, '0')
|
||||
+ "E" + m.Groups[2].Value.PadLeft(2, '0');
|
||||
}
|
||||
else
|
||||
|
@ -494,7 +495,7 @@ namespace Jackett.Common.Indexers
|
|||
m = Regex.Match(newEpisodeTitle, "^([0-9]+)x([0-9]+)(.*)$", RegexOptions.IgnoreCase);
|
||||
if (m.Success)
|
||||
{
|
||||
newEpisodeTitle = "S" + m.Groups[1].Value.PadLeft(2, '0')
|
||||
newEpisodeTitle = "S" + m.Groups[1].Value.PadLeft(2, '0')
|
||||
+ "E" + m.Groups[2].Value.PadLeft(2, '0');
|
||||
// newEpisodeTitle = S01E02
|
||||
if (!m.Groups[3].Value.Equals(""))
|
||||
|
@ -510,7 +511,7 @@ namespace Jackett.Common.Indexers
|
|||
newTitle += year + " " + newEpisodeTitle;
|
||||
|
||||
// add quality
|
||||
if (title.ToLower().Contains("[720p]"))
|
||||
if (title.ToLower().Contains("[720p]"))
|
||||
newTitle += " SPANISH 720p HDTV x264";
|
||||
else
|
||||
newTitle += " SPANISH SDTV XviD";
|
||||
|
@ -552,7 +553,7 @@ namespace Jackett.Common.Indexers
|
|||
if (!words.Any())
|
||||
return null;
|
||||
var longestWord = words.First();
|
||||
foreach(var word in words)
|
||||
foreach (var word in words)
|
||||
{
|
||||
if (word.Length >= longestWord.Length)
|
||||
longestWord = word;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Jackett.Common.Models;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
|
@ -31,4 +31,4 @@ namespace Jackett.Common.Indexers.Meta
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -29,20 +29,26 @@ namespace Jackett.Common.Indexers.Meta
|
|||
public async Task<IEnumerable<ReleaseInfo>> FilterResults(IEnumerable<ReleaseInfo> results)
|
||||
{
|
||||
long? imdbId = null;
|
||||
try {
|
||||
try
|
||||
{
|
||||
var normalizedImdbId = String.Concat(query.ImdbID.Where(c => char.IsDigit(c)));
|
||||
imdbId = Int64.Parse(normalizedImdbId);
|
||||
} catch {
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
IEnumerable<ReleaseInfo> perfectResults;
|
||||
IEnumerable<ReleaseInfo> wrongResults;
|
||||
|
||||
if (imdbId != null) {
|
||||
if (imdbId != null)
|
||||
{
|
||||
var resultsWithImdbId = results.Where(r => r.Imdb != null);
|
||||
wrongResults = resultsWithImdbId.Where(r => r.Imdb != imdbId);
|
||||
perfectResults = resultsWithImdbId.Where(r => r.Imdb == imdbId);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
wrongResults = new ReleaseInfo[] { };
|
||||
perfectResults = new ReleaseInfo[] { };
|
||||
}
|
||||
|
@ -53,7 +59,8 @@ namespace Jackett.Common.Indexers.Meta
|
|||
var strippedTitles = titles.Select(t => RemoveSpecialChars(t));
|
||||
var normalizedTitles = strippedTitles.SelectMany(t => GenerateTitleVariants(t));
|
||||
|
||||
var titleFilteredResults = remainingResults.Where(r => {
|
||||
var titleFilteredResults = remainingResults.Where(r =>
|
||||
{
|
||||
// TODO Make it possible to configure case insensitivity
|
||||
var containsAnyTitle = normalizedTitles.Select(t => r.Title.ToLowerInvariant().Contains(t.ToLowerInvariant()));
|
||||
var isProbablyValidResult = containsAnyTitle.Any(b => b);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
@ -141,10 +141,12 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
var groupItem = previousElement.NextElementSibling;
|
||||
|
||||
if (groupItem == null) break;
|
||||
if (groupItem == null)
|
||||
break;
|
||||
|
||||
if (!groupItem.ClassList[0].Equals("group_torrent") ||
|
||||
!groupItem.ClassList[1].StartsWith("groupid_")) break;
|
||||
!groupItem.ClassList[1].StartsWith("groupid_"))
|
||||
break;
|
||||
|
||||
// Found a new edition
|
||||
if (groupItem.ClassList[2].Equals("edition"))
|
||||
|
@ -153,7 +155,8 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
else if (groupItem.ClassList[2].StartsWith("edition_"))
|
||||
{
|
||||
if (qualityEdition.Equals(string.Empty)) break;
|
||||
if (qualityEdition.Equals(string.Empty))
|
||||
break;
|
||||
|
||||
// Parse required data
|
||||
var downloadAnchor = groupItem.QuerySelectorAll("td a").Last();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -190,7 +190,7 @@ namespace Jackett.Common.Indexers
|
|||
int index = 0;
|
||||
foreach (string cat in catList)
|
||||
{
|
||||
qParams.Add("tor[cat]["+index+"]", cat);
|
||||
qParams.Add("tor[cat][" + index + "]", cat);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ namespace Jackett.Common.Indexers
|
|||
var sitelink = new Uri(SiteLink);
|
||||
|
||||
var error = jsonContent.Value<string>("error");
|
||||
if(error != null)
|
||||
if (error != null)
|
||||
{
|
||||
if (error == "Nothing returned, out of 0")
|
||||
return releases;
|
||||
|
@ -226,7 +226,7 @@ namespace Jackett.Common.Indexers
|
|||
foreach (var item in jsonContent.Value<JArray>("data"))
|
||||
{
|
||||
var release = new ReleaseInfo();
|
||||
|
||||
|
||||
var id = item.Value<long>("id");
|
||||
release.Title = item.Value<string>("title");
|
||||
|
||||
|
@ -274,7 +274,7 @@ namespace Jackett.Common.Indexers
|
|||
var size = item.Value<string>("size");
|
||||
release.Size = ReleaseInfo.GetBytes(size);
|
||||
var free = item.Value<int>("free");
|
||||
|
||||
|
||||
if (free == 1)
|
||||
release.DownloadVolumeFactor = 0;
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
@ -128,8 +128,8 @@ namespace Jackett.Common.Indexers
|
|||
var rows = dom[".box_torrent_all"].Find(".box_torrent");
|
||||
|
||||
// Check torrents only till we reach the query Limit
|
||||
for(int i= previously_parsed_on_page; (i<rows.Length && ((already_founded + releases.Count) < limit )); i++)
|
||||
{
|
||||
for (int i = previously_parsed_on_page; (i < rows.Length && ((already_founded + releases.Count) < limit)); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
CQ qRow = rows[i].Cq();
|
||||
|
@ -151,7 +151,8 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
release.Link = new Uri(SiteLink.ToString() + "torrents.php?action=download&id=" + downloadId + "&key=" + key);
|
||||
release.Comments = new Uri(SiteLink.ToString() + "torrents.php?action=details&id=" + downloadId);
|
||||
release.Guid = new Uri(release.Comments.ToString() + "#comments"); ;
|
||||
release.Guid = new Uri(release.Comments.ToString() + "#comments");
|
||||
;
|
||||
release.Seeders = ParseUtil.CoerceInt(qRow.Find(".box_s2").Find("a").First().Text());
|
||||
release.Peers = ParseUtil.CoerceInt(qRow.Find(".box_l2").Find("a").First().Text()) + release.Seeders;
|
||||
var imdblink = qRow.Find("a[href*=\".imdb.com/title\"]").Attr("href");
|
||||
|
@ -164,7 +165,7 @@ namespace Jackett.Common.Indexers
|
|||
var bannerurl = BannerMatch.Groups[1].Value;
|
||||
release.BannerUrl = new Uri(bannerurl);
|
||||
}
|
||||
release.PublishDate = DateTime.Parse(qRow.Find(".box_feltoltve2").Get(0).InnerHTML.Replace("<br />", " "), CultureInfo.InvariantCulture);
|
||||
release.PublishDate = DateTime.Parse(qRow.Find(".box_feltoltve2").Get(0).InnerHTML.Replace("<br />", " "), CultureInfo.InvariantCulture);
|
||||
string[] sizeSplit = qRow.Find(".box_meret2").Get(0).InnerText.Split(' ');
|
||||
release.Size = ReleaseInfo.GetBytes(sizeSplit[1].ToLower(), ParseUtil.CoerceFloat(sizeSplit[0]));
|
||||
string catlink = qRow.Find("a:has(img[class='categ_link'])").First().Attr("href");
|
||||
|
@ -215,7 +216,7 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
{
|
||||
logger.Error("Problem of parsing Torrent:" + rows[i].InnerHTML);
|
||||
logger.Error("Exception was the following:" + ex);
|
||||
}
|
||||
|
@ -267,16 +268,16 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
|
||||
var results = await PostDataWithCookiesAndRetry(SearchUrl, pairs);
|
||||
|
||||
|
||||
|
||||
CQ dom = results.Content;
|
||||
int numVal = 0;
|
||||
|
||||
// find number of torrents / page
|
||||
int torrent_per_page = dom[".box_torrent_all"].Find(".box_torrent").Length;
|
||||
if (torrent_per_page==0)
|
||||
if (torrent_per_page == 0)
|
||||
return releases;
|
||||
int start_page = (query.Offset / torrent_per_page)+1;
|
||||
int start_page = (query.Offset / torrent_per_page) + 1;
|
||||
int previously_parsed_on_page = query.Offset - (start_page * torrent_per_page) + 1; //+1 because indexing start from 0
|
||||
if (previously_parsed_on_page < 0)
|
||||
previously_parsed_on_page = query.Offset;
|
||||
|
@ -286,7 +287,7 @@ namespace Jackett.Common.Indexers
|
|||
if (pagelinks.Length > 0)
|
||||
{
|
||||
// If there are several pages find the link for the latest one
|
||||
for (int i= pagelinks.Length - 1; i > 0; i--)
|
||||
for (int i = pagelinks.Length - 1; i > 0; i--)
|
||||
{
|
||||
var last_page_link = (pagelinks[i].Cq().Attr("href")).Trim();
|
||||
if (last_page_link.Contains("oldal"))
|
||||
|
@ -296,7 +297,7 @@ namespace Jackett.Common.Indexers
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var limit = query.Limit;
|
||||
if (limit == 0)
|
||||
|
@ -308,11 +309,11 @@ namespace Jackett.Common.Indexers
|
|||
previously_parsed_on_page = 0;
|
||||
start_page++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check all the pages for the torrents.
|
||||
// The starting index is 2. (the first one is the original where we parse out the pages.)
|
||||
for (int i= start_page; (i<= numVal && releases.Count < limit); i++ )
|
||||
for (int i = start_page; (i <= numVal && releases.Count < limit); i++)
|
||||
{
|
||||
pairs.Add(new KeyValuePair<string, string>("oldal", i.ToString()));
|
||||
results = await PostDataWithCookiesAndRetry(SearchUrl, pairs);
|
||||
|
@ -327,9 +328,9 @@ namespace Jackett.Common.Indexers
|
|||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var results = await PerformQuery(query, null);
|
||||
if (results.Count()==0 && query.IsTVSearch) // if we search for a localized title ncore can't handle any extra S/E information, search without it and AND filter the results. See #1450
|
||||
if (results.Count() == 0 && query.IsTVSearch) // if we search for a localized title ncore can't handle any extra S/E information, search without it and AND filter the results. See #1450
|
||||
{
|
||||
results = await PerformQuery(query,query.GetEpisodeSearchString());
|
||||
results = await PerformQuery(query, query.GetEpisodeSearchString());
|
||||
}
|
||||
|
||||
return results;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -43,8 +43,8 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
AddCategoryMapping(39, TorznabCatType.TVAnime); // Anime: HD|1080p
|
||||
AddCategoryMapping(38, TorznabCatType.TVAnime); // Anime: HD|720p
|
||||
AddCategoryMapping(1, TorznabCatType.TVAnime); // Anime: SD
|
||||
AddCategoryMapping(7, TorznabCatType.PCPhoneOther); // Appz: Handy-PDA
|
||||
AddCategoryMapping(1, TorznabCatType.TVAnime); // Anime: SD
|
||||
AddCategoryMapping(7, TorznabCatType.PCPhoneOther); // Appz: Handy-PDA
|
||||
AddCategoryMapping(36, TorznabCatType.PCMac); // Appz: Mac
|
||||
AddCategoryMapping(18, TorznabCatType.PC); // Appz: Sonstiges
|
||||
AddCategoryMapping(17, TorznabCatType.PC); // Appz: Win
|
||||
|
@ -55,8 +55,8 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(22, TorznabCatType.AudioVideo); // Audio: Videoclip
|
||||
AddCategoryMapping(19, TorznabCatType.Other); // Diverses: Sonstiges
|
||||
AddCategoryMapping(43, TorznabCatType.TVDocumentary); // Dokus: HD
|
||||
AddCategoryMapping(2, TorznabCatType.TVDocumentary); // Dokus: SD
|
||||
AddCategoryMapping(3, TorznabCatType.Books); // Ebooks: Bücher
|
||||
AddCategoryMapping(2, TorznabCatType.TVDocumentary); // Dokus: SD
|
||||
AddCategoryMapping(3, TorznabCatType.Books); // Ebooks: Bücher
|
||||
AddCategoryMapping(52, TorznabCatType.BooksComics); // Ebooks: Comics
|
||||
AddCategoryMapping(53, TorznabCatType.BooksMagazines); // Ebooks: Magazine
|
||||
AddCategoryMapping(55, TorznabCatType.BooksOther); // Ebooks: XXX
|
||||
|
@ -64,10 +64,10 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(47, TorznabCatType.PCPhoneOther); // Games: Andere
|
||||
AddCategoryMapping(32, TorznabCatType.PCMac); // Games: Mac
|
||||
AddCategoryMapping(41, TorznabCatType.ConsoleNDS); // Games: NDS/3DS
|
||||
AddCategoryMapping(4, TorznabCatType.PCGames); // Games: PC
|
||||
AddCategoryMapping(5, TorznabCatType.ConsolePS3); // Games: PS2
|
||||
AddCategoryMapping(9, TorznabCatType.ConsolePS3); // Games: PS3
|
||||
AddCategoryMapping(6, TorznabCatType.ConsolePSP); // Games: PSP
|
||||
AddCategoryMapping(4, TorznabCatType.PCGames); // Games: PC
|
||||
AddCategoryMapping(5, TorznabCatType.ConsolePS3); // Games: PS2
|
||||
AddCategoryMapping(9, TorznabCatType.ConsolePS3); // Games: PS3
|
||||
AddCategoryMapping(6, TorznabCatType.ConsolePSP); // Games: PSP
|
||||
AddCategoryMapping(28, TorznabCatType.ConsoleWii); // Games: Wii
|
||||
AddCategoryMapping(31, TorznabCatType.ConsoleXbox); // Games: XboX
|
||||
AddCategoryMapping(51, TorznabCatType.Movies3D); // Movies: 3D
|
||||
|
@ -75,7 +75,7 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(25, TorznabCatType.MoviesHD); // Movies: HD|1080p
|
||||
AddCategoryMapping(29, TorznabCatType.MoviesHD); // Movies: HD|720p
|
||||
AddCategoryMapping(11, TorznabCatType.MoviesDVD); // Movies: SD|DVD-R
|
||||
AddCategoryMapping(8, TorznabCatType.MoviesSD); // Movies: SD|x264
|
||||
AddCategoryMapping(8, TorznabCatType.MoviesSD); // Movies: SD|x264
|
||||
AddCategoryMapping(13, TorznabCatType.MoviesSD); // Movies: SD|XviD
|
||||
AddCategoryMapping(40, TorznabCatType.MoviesForeign); // Movies: US Movies
|
||||
AddCategoryMapping(33, TorznabCatType.TV); // Serien: DVD-R
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -295,7 +295,7 @@ namespace Jackett.Common.Indexers
|
|||
// Getting results & Store content
|
||||
var response = await RequestStringWithCookiesAndRetry(request, ConfigData.CookieHeader.Value);
|
||||
_fDom = response.Content;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var firstPageRows = FindTorrentRows();
|
||||
|
@ -329,11 +329,11 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
|
||||
Output("\nFound " + nbResults + " result(s) (+/- " + firstPageRows.Length + ") in " + pageLinkCount + " page(s) for this query !");
|
||||
Output("\nThere are " + (firstPageRows.Length -2 ) + " results on the first page !");
|
||||
Output("\nThere are " + (firstPageRows.Length - 2) + " results on the first page !");
|
||||
|
||||
// Loop on results
|
||||
|
||||
foreach (var tRow in torrentRowList.Skip(1).Take(torrentRowList.Count-2))
|
||||
foreach (var tRow in torrentRowList.Skip(1).Take(torrentRowList.Count - 2))
|
||||
{
|
||||
Output("Torrent #" + (releases.Count + 1));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -108,7 +108,7 @@ namespace Jackett.Common.Indexers
|
|||
queryCollection.Add("searchstr", query.GetQueryString());
|
||||
}
|
||||
|
||||
if(configFreeOnly)
|
||||
if (configFreeOnly)
|
||||
queryCollection.Add("freetorrent", "1");
|
||||
|
||||
if (queryCollection.Count > 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -40,7 +40,7 @@ namespace Jackett.Common.Indexers
|
|||
p: ps,
|
||||
configData: new ConfigurationDataBasicLoginWithEmail())
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "pl-pl";
|
||||
Type = "private";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
using NLog;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -66,7 +66,8 @@ namespace Jackett.Common.Indexers
|
|||
{"last", "created"},
|
||||
{"seeders", "seeders"},
|
||||
{"leechers", "leechers"}
|
||||
}) {Name = "Sort requested from site", Value = "last"};
|
||||
})
|
||||
{ Name = "Sort requested from site", Value = "last" };
|
||||
configData.AddDynamic("sort", sort);
|
||||
|
||||
var provideTorrentLinkItem = new BoolItem { Value = false };
|
||||
|
@ -109,7 +110,7 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
base.LoadValuesFromJson(jsonConfig, useProtectionService);
|
||||
|
||||
var sort = (SelectItem) configData.GetDynamic("sort");
|
||||
var sort = (SelectItem)configData.GetDynamic("sort");
|
||||
_sort = sort != null ? sort.Value : "last";
|
||||
|
||||
var provideTorrentLinkItem = (BoolItem)configData.GetDynamic("providetorrentlink");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
@ -33,4 +33,4 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(7, TorznabCatType.Books, "Comics");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -95,14 +95,14 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
NameValueCollection qParams = new NameValueCollection();
|
||||
qParams.Add("api", "");
|
||||
if(query.ImdbIDShort != null)
|
||||
if (query.ImdbIDShort != null)
|
||||
qParams.Add("imdb", query.ImdbIDShort);
|
||||
else
|
||||
qParams.Add("search", query.SearchTerm);
|
||||
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query))
|
||||
{
|
||||
qParams.Add("categories["+cat+"]", "1");
|
||||
qParams.Add("categories[" + cat + "]", "1");
|
||||
}
|
||||
|
||||
string urlSearch = SearchUrl;
|
||||
|
@ -147,7 +147,7 @@ namespace Jackett.Common.Indexers
|
|||
var size = item.Value<string>("size");
|
||||
release.Size = ReleaseInfo.GetBytes(size);
|
||||
var is_freeleech = item.Value<int>("is_freeleech");
|
||||
|
||||
|
||||
if (is_freeleech == 1)
|
||||
release.DownloadVolumeFactor = 0;
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
@ -61,4 +61,4 @@ namespace Jackett.Common.Indexers
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
@ -118,4 +118,4 @@ namespace Jackett.Common.Indexers
|
|||
return releases;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
|
|
@ -91,14 +91,19 @@ namespace Jackett.Common.Indexers
|
|||
/* In case of season Packs */
|
||||
if (type.Equals("season"))
|
||||
{
|
||||
if (dd >= 90) return 4;
|
||||
if (dd >= 30) return 2;
|
||||
if (dd >= 14) return 1.5;
|
||||
if (dd >= 90)
|
||||
return 4;
|
||||
if (dd >= 30)
|
||||
return 2;
|
||||
if (dd >= 14)
|
||||
return 1.5;
|
||||
}
|
||||
else /* In case of single episodes */
|
||||
{
|
||||
if (dd >= 60) return 2;
|
||||
if (dd >= 30) return 1.5;
|
||||
if (dd >= 60)
|
||||
return 2;
|
||||
if (dd >= 30)
|
||||
return 1.5;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -339,7 +344,7 @@ namespace Jackett.Common.Indexers
|
|||
int previously_parsed_on_page = query.Offset - (start_page * torrent_per_page) + 1; //+1 because indexing start from 0
|
||||
if (previously_parsed_on_page <= 0)
|
||||
previously_parsed_on_page = query.Offset;
|
||||
|
||||
|
||||
|
||||
double pages = Math.Ceiling((double)max_found / (double)torrent_per_page);
|
||||
|
||||
|
@ -351,9 +356,9 @@ namespace Jackett.Common.Indexers
|
|||
start_page++;
|
||||
}
|
||||
|
||||
for (page =start_page; (page<=pages && releases.Count<limit);page++)
|
||||
for (page = start_page; (page <= pages && releases.Count < limit); page++)
|
||||
{
|
||||
if(query.IsImdbQuery && seriesinfo != null )
|
||||
if (query.IsImdbQuery && seriesinfo != null)
|
||||
exactSearchURL = SearchUrl + "?s=" + query.Season + "&e=" + query.Episode + "&g=" + seriesinfo.id + "&p=" + page + "&now=" + unixTimestamp.ToString();
|
||||
else
|
||||
exactSearchURL = SearchUrl + "?gyors=" + base64coded + "&p=" + page + "&now=" + unixTimestamp.ToString();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -94,7 +94,7 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(41, TorznabCatType.Audio, "Music/Packs");
|
||||
AddCategoryMapping(16, TorznabCatType.AudioVideo, "Music/Video");
|
||||
AddCategoryMapping(27, TorznabCatType.Audio, "Music/Flac");
|
||||
|
||||
|
||||
AddCategoryMapping(45, TorznabCatType.AudioOther, "Podcast");
|
||||
|
||||
AddCategoryMapping(4, TorznabCatType.PCGames, "PC/Games");
|
||||
|
@ -127,7 +127,7 @@ namespace Jackett.Common.Indexers
|
|||
loginPage = await RequestStringWithCookies(loginPage.RedirectingTo, string.Empty);
|
||||
CQ cq = loginPage.Content;
|
||||
var result = this.configData;
|
||||
|
||||
|
||||
//result.CookieHeader.Value = loginPage.Cookies;
|
||||
UpdateCookieHeader(loginPage.Cookies); // update cookies instead of replacing them, see #3717
|
||||
result.Captcha.SiteKey = cq.Find(".g-recaptcha").Attr("data-sitekey");
|
||||
|
@ -236,11 +236,11 @@ namespace Jackett.Common.Indexers
|
|||
release.MinimumRatio = 1;
|
||||
release.MinimumSeedTime = 172800; // 48 hours
|
||||
release.Category = MapTrackerCatToNewznab(torrent.c.ToString());
|
||||
|
||||
|
||||
var torrentID = (long)torrent.t;
|
||||
release.Comments = new Uri(SiteLink + "details.php?id=" + torrentID);
|
||||
release.Guid = release.Comments;
|
||||
release.Link = new Uri(SiteLink + "download.php/" + torrentID + "/"+ torrentID + ".torrent");
|
||||
release.Link = new Uri(SiteLink + "download.php/" + torrentID + "/" + torrentID + ".torrent");
|
||||
release.PublishDate = DateTimeUtil.UnixTimestampToDateTime((long)torrent.ctime).ToLocalTime();
|
||||
|
||||
release.Size = (long)torrent.size;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -19,9 +19,9 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
public class TorrentHeaven : BaseWebIndexer
|
||||
{
|
||||
public override string[] LegacySiteLinks { get; protected set; } = new string[] {
|
||||
"https://torrentheaven.myfqdn.info/",
|
||||
};
|
||||
public override string[] LegacySiteLinks { get; protected set; } = new string[] {
|
||||
"https://torrentheaven.myfqdn.info/",
|
||||
};
|
||||
|
||||
private string IndexUrl { get { return SiteLink + "index.php"; } }
|
||||
private string LoginCompleteUrl { get { return SiteLink + "index.php?strWebValue=account&strWebAction=login_complete&ancestry=verify"; } }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace Jackett.Common.Indexers
|
|||
TimeZoneInfo.AdjustmentRule adjustment = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule(new DateTime(1999, 10, 1), DateTime.MaxValue.Date, delta, startTransition, endTransition);
|
||||
TimeZoneInfo.AdjustmentRule[] adjustments = { adjustment };
|
||||
germanyTz = TimeZoneInfo.CreateCustomTimeZone("W. Europe Standard Time", new TimeSpan(1, 0, 0), "(GMT+01:00) W. Europe Standard Time", "W. Europe Standard Time", "W. Europe DST Time", adjustments);
|
||||
}
|
||||
}
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
|
@ -140,13 +140,15 @@ namespace Jackett.Common.Indexers
|
|||
queryCollection.Add("incldead", "1");
|
||||
queryCollection.Add("rel_type", "0"); // Alle
|
||||
|
||||
if(query.ImdbID != null)
|
||||
if (query.ImdbID != null)
|
||||
{
|
||||
queryCollection.Add("searchin", "imdb");
|
||||
queryCollection.Add("search", query.ImdbID);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
queryCollection.Add("searchin", "title");
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchString))
|
||||
{
|
||||
// use AND+wildcard operator to avoid getting to many useless results
|
||||
|
@ -154,7 +156,7 @@ namespace Jackett.Common.Indexers
|
|||
searchStringArray = searchStringArray.Select(x => "+" + x).ToList(); // add AND operators
|
||||
var searchStringFinal = String.Join(" ", searchStringArray);
|
||||
queryCollection.Add("search", searchStringFinal);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -13,88 +13,99 @@ using Jackett.Common.Utils.Clients;
|
|||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
|
||||
namespace Jackett.Common.Indexers {
|
||||
public class Torrentscsv : BaseWebIndexer {
|
||||
namespace Jackett.Common.Indexers
|
||||
{
|
||||
public class Torrentscsv : BaseWebIndexer
|
||||
{
|
||||
|
||||
private string ApiEndpoint { get { return SiteLink + "service/search"; } }
|
||||
|
||||
private new ConfigurationData configData {
|
||||
get { return (ConfigurationData) base.configData; }
|
||||
private new ConfigurationData configData
|
||||
{
|
||||
get { return (ConfigurationData)base.configData; }
|
||||
set { base.configData = value; }
|
||||
}
|
||||
|
||||
public Torrentscsv (IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps) : base (
|
||||
public Torrentscsv(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps) : base(
|
||||
name: "Torrents.csv",
|
||||
description: "Torrents.csv is a self-hostable, open source torrent search engine and database",
|
||||
link: "https://torrents-csv.ml/",
|
||||
caps : new TorznabCapabilities (),
|
||||
configService : configService,
|
||||
client : wc,
|
||||
logger : l,
|
||||
p : ps,
|
||||
configData : new ConfigurationData ()) {
|
||||
caps: new TorznabCapabilities(),
|
||||
configService: configService,
|
||||
client: wc,
|
||||
logger: l,
|
||||
p: ps,
|
||||
configData: new ConfigurationData())
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "en-us";
|
||||
Type = "public";
|
||||
|
||||
// dummy mappings for sonarr, radarr, etc since torrents.csv doesnt return categories
|
||||
AddCategoryMapping (1000, TorznabCatType.Console);
|
||||
AddCategoryMapping (2000, TorznabCatType.Movies);
|
||||
AddCategoryMapping (3000, TorznabCatType.Audio);
|
||||
AddCategoryMapping (4000, TorznabCatType.PC);
|
||||
AddCategoryMapping (5000, TorznabCatType.TV);
|
||||
AddCategoryMapping (6000, TorznabCatType.XXX);
|
||||
AddCategoryMapping (7000, TorznabCatType.Other);
|
||||
AddCategoryMapping (8000, TorznabCatType.Books);
|
||||
AddCategoryMapping(1000, TorznabCatType.Console);
|
||||
AddCategoryMapping(2000, TorznabCatType.Movies);
|
||||
AddCategoryMapping(3000, TorznabCatType.Audio);
|
||||
AddCategoryMapping(4000, TorznabCatType.PC);
|
||||
AddCategoryMapping(5000, TorznabCatType.TV);
|
||||
AddCategoryMapping(6000, TorznabCatType.XXX);
|
||||
AddCategoryMapping(7000, TorznabCatType.Other);
|
||||
AddCategoryMapping(8000, TorznabCatType.Books);
|
||||
|
||||
TorznabCaps.SupportsImdbMovieSearch = false;
|
||||
|
||||
webclient.requestDelay = 0;
|
||||
}
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration (JToken configJson) {
|
||||
configData.LoadValuesFromJson (configJson);
|
||||
var releases = await PerformQuery (new TorznabQuery ());
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
configData.LoadValuesFromJson(configJson);
|
||||
var releases = await PerformQuery(new TorznabQuery());
|
||||
|
||||
await ConfigureIfOK (string.Empty, releases.Count () > 0, () => {
|
||||
throw new Exception ("Error: No data returned!");
|
||||
await ConfigureIfOK(string.Empty, releases.Count() > 0, () =>
|
||||
{
|
||||
throw new Exception("Error: No data returned!");
|
||||
});
|
||||
|
||||
return IndexerConfigurationStatus.Completed;
|
||||
}
|
||||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery (TorznabQuery query) {
|
||||
return await PerformQuery (query, 0);
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
return await PerformQuery(query, 0);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ReleaseInfo>> PerformQuery (TorznabQuery query, int attempts) {
|
||||
var releases = new List<ReleaseInfo> ();
|
||||
var searchString = query.GetQueryString ();
|
||||
if (string.IsNullOrEmpty(searchString)) searchString = "%";
|
||||
public async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query, int attempts)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
var searchString = query.GetQueryString();
|
||||
if (string.IsNullOrEmpty(searchString))
|
||||
searchString = "%";
|
||||
|
||||
var queryCollection = new NameValueCollection ();
|
||||
var queryCollection = new NameValueCollection();
|
||||
|
||||
queryCollection.Add ("q", searchString);
|
||||
queryCollection.Add ("size", "500");
|
||||
queryCollection.Add ("type_", "torrent");
|
||||
queryCollection.Add("q", searchString);
|
||||
queryCollection.Add("size", "500");
|
||||
queryCollection.Add("type_", "torrent");
|
||||
|
||||
var searchUrl = ApiEndpoint + "?" + queryCollection.GetQueryString ();
|
||||
var response = await RequestStringWithCookiesAndRetry (searchUrl, string.Empty);
|
||||
var searchUrl = ApiEndpoint + "?" + queryCollection.GetQueryString();
|
||||
var response = await RequestStringWithCookiesAndRetry(searchUrl, string.Empty);
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
var jsonStart = response.Content;
|
||||
var jsonContent = JArray.Parse (jsonStart);
|
||||
var jsonContent = JArray.Parse(jsonStart);
|
||||
|
||||
foreach (var torrent in jsonContent) {
|
||||
|
||||
if (torrent == null)
|
||||
throw new Exception ("Error: No data returned!");
|
||||
foreach (var torrent in jsonContent)
|
||||
{
|
||||
|
||||
var release = new ReleaseInfo ();
|
||||
release.Title = torrent.Value<string> ("name");
|
||||
if (torrent == null)
|
||||
throw new Exception("Error: No data returned!");
|
||||
|
||||
var release = new ReleaseInfo();
|
||||
release.Title = torrent.Value<string>("name");
|
||||
|
||||
// construct magnet link from infohash with all public trackers known to man
|
||||
string magnet_uri = "magnet:?xt=urn:btih:" + torrent.Value<JToken> ("infohash") +
|
||||
string magnet_uri = "magnet:?xt=urn:btih:" + torrent.Value<JToken>("infohash") +
|
||||
"&tr=udp://tracker.coppersurfer.tk:6969/announce" +
|
||||
"&tr=udp://tracker.leechers-paradise.org:6969/announce" +
|
||||
"&tr=udp://tracker.internetwarriors.net:1337/announce" +
|
||||
|
@ -127,67 +138,80 @@ namespace Jackett.Common.Indexers {
|
|||
"&tr=udp://torrentclub.tech:6969/announce" +
|
||||
"&tr=udp://tracker.tvunderground.org.ru:3218/announce" +
|
||||
"&tr=udp://tracker.open-tracker.org:1337/announce" +
|
||||
"&tr=udp://tracker.justseed.it:1337/announce";
|
||||
"&tr=udp://tracker.justseed.it:1337/announce";
|
||||
|
||||
release.MagnetUri = new Uri (magnet_uri);
|
||||
release.MagnetUri = new Uri(magnet_uri);
|
||||
// there is no comments or details link so we point to the web site instead
|
||||
release.Comments = new Uri (SiteLink);
|
||||
release.Comments = new Uri(SiteLink);
|
||||
release.Guid = release.MagnetUri;
|
||||
release.Link = release.MagnetUri;
|
||||
release.InfoHash = torrent.Value<JToken> ("infohash").ToString ();
|
||||
release.InfoHash = torrent.Value<JToken>("infohash").ToString();
|
||||
|
||||
// convert unix timestamp to human readable date
|
||||
double createdunix = torrent.Value<long> ("created_unix");
|
||||
System.DateTime dateTime = new System.DateTime (1970, 1, 1, 0, 0, 0, 0);
|
||||
dateTime = dateTime.AddSeconds (createdunix);
|
||||
double createdunix = torrent.Value<long>("created_unix");
|
||||
System.DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
dateTime = dateTime.AddSeconds(createdunix);
|
||||
release.PublishDate = dateTime;
|
||||
release.Seeders = torrent.Value<int> ("seeders");
|
||||
release.Peers = torrent.Value<int> ("leechers") + release.Seeders;
|
||||
release.Size = torrent.Value<long> ("size_bytes");
|
||||
release.Seeders = torrent.Value<int>("seeders");
|
||||
release.Peers = torrent.Value<int>("leechers") + release.Seeders;
|
||||
release.Size = torrent.Value<long>("size_bytes");
|
||||
var grabs = torrent.Value<string>("completed");
|
||||
if (grabs == null) grabs = "0";
|
||||
if (grabs == null)
|
||||
grabs = "0";
|
||||
release.Grabs = ParseUtil.CoerceInt(grabs);
|
||||
release.MinimumRatio = 1;
|
||||
release.MinimumSeedTime = 172800; // 48 hours
|
||||
release.DownloadVolumeFactor = 0;
|
||||
release.UploadVolumeFactor = 1;
|
||||
|
||||
// dummy mappings for sonarr, radarr, etc
|
||||
string categories = string.Join (";", MapTorznabCapsToTrackers (query));
|
||||
if (!string.IsNullOrEmpty (categories)) {
|
||||
if (categories.Contains ("1000")) {
|
||||
// dummy mappings for sonarr, radarr, etc
|
||||
string categories = string.Join(";", MapTorznabCapsToTrackers(query));
|
||||
if (!string.IsNullOrEmpty(categories))
|
||||
{
|
||||
if (categories.Contains("1000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.Console.ID };
|
||||
}
|
||||
if (categories.Contains ("2000")) {
|
||||
if (categories.Contains("2000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.Movies.ID };
|
||||
}
|
||||
if (categories.Contains ("3000")) {
|
||||
if (categories.Contains("3000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.Audio.ID };
|
||||
}
|
||||
if (categories.Contains ("4000")) {
|
||||
if (categories.Contains("4000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.PC.ID };
|
||||
}
|
||||
if (categories.Contains ("5000")) {
|
||||
if (categories.Contains("5000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.TV.ID };
|
||||
}
|
||||
if (categories.Contains ("6000")) {
|
||||
if (categories.Contains("6000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.XXX.ID };
|
||||
}
|
||||
if (categories.Contains ("7000")) {
|
||||
if (categories.Contains("7000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.Other.ID };
|
||||
}
|
||||
if (categories.Contains ("8000")) {
|
||||
if (categories.Contains("8000"))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.Books.ID };
|
||||
}
|
||||
}
|
||||
// for null category
|
||||
if (string.IsNullOrEmpty (categories)) {
|
||||
if (string.IsNullOrEmpty(categories))
|
||||
{
|
||||
release.Category = new List<int> { TorznabCatType.Other.ID };
|
||||
}
|
||||
releases.Add (release);
|
||||
releases.Add(release);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
OnParseError (response.Content, ex);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(response.Content, ex);
|
||||
}
|
||||
return releases;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
|
@ -62,73 +62,73 @@ namespace Jackett.Common.Indexers
|
|||
TorznabCaps.Categories.Clear();
|
||||
|
||||
// Movies
|
||||
AddCategoryMapping(118, TorznabCatType.MoviesBluRay, "UHD FULL BLURAY");
|
||||
AddCategoryMapping(119, TorznabCatType.MoviesBluRay, "UHD BLURAY REMUX");
|
||||
AddCategoryMapping(107, TorznabCatType.MoviesUHD, "UHD 2160P X265");
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesBluRay, "FULL BLURAY");
|
||||
AddCategoryMapping(2, TorznabCatType.MoviesBluRay, "BLURAY REMUX");
|
||||
AddCategoryMapping(100, TorznabCatType.MoviesHD, "HD 1080P X265");
|
||||
AddCategoryMapping(4, TorznabCatType.MoviesHD, "HD 1080P X264");
|
||||
AddCategoryMapping(5, TorznabCatType.MoviesHD, "HD 720P X264");
|
||||
AddCategoryMapping(7, TorznabCatType.MoviesSD, "SD X264");
|
||||
AddCategoryMapping(8, TorznabCatType.MoviesDVD, "FULL DVD");
|
||||
AddCategoryMapping(3, TorznabCatType.Movies3D, "3D");
|
||||
AddCategoryMapping(6, TorznabCatType.MoviesSD, "XVID");
|
||||
AddCategoryMapping(122, TorznabCatType.MoviesHD, "HDTV");
|
||||
AddCategoryMapping(94, TorznabCatType.MoviesWEBDL, "WEBDL");
|
||||
AddCategoryMapping(95, TorznabCatType.MoviesWEBDL, "WEBRIP");
|
||||
AddCategoryMapping(12, TorznabCatType.TVDocumentary, "DOCS");
|
||||
AddCategoryMapping(33, TorznabCatType.MoviesOther, "SPECTACLE");
|
||||
AddCategoryMapping(31, TorznabCatType.MoviesOther, "ANIMATION");
|
||||
AddCategoryMapping(9, TorznabCatType.MoviesOther, "VOSTFR");
|
||||
AddCategoryMapping(118, TorznabCatType.MoviesBluRay, "UHD FULL BLURAY");
|
||||
AddCategoryMapping(119, TorznabCatType.MoviesBluRay, "UHD BLURAY REMUX");
|
||||
AddCategoryMapping(107, TorznabCatType.MoviesUHD, "UHD 2160P X265");
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesBluRay, "FULL BLURAY");
|
||||
AddCategoryMapping(2, TorznabCatType.MoviesBluRay, "BLURAY REMUX");
|
||||
AddCategoryMapping(100, TorznabCatType.MoviesHD, "HD 1080P X265");
|
||||
AddCategoryMapping(4, TorznabCatType.MoviesHD, "HD 1080P X264");
|
||||
AddCategoryMapping(5, TorznabCatType.MoviesHD, "HD 720P X264");
|
||||
AddCategoryMapping(7, TorznabCatType.MoviesSD, "SD X264");
|
||||
AddCategoryMapping(8, TorznabCatType.MoviesDVD, "FULL DVD");
|
||||
AddCategoryMapping(3, TorznabCatType.Movies3D, "3D");
|
||||
AddCategoryMapping(6, TorznabCatType.MoviesSD, "XVID");
|
||||
AddCategoryMapping(122, TorznabCatType.MoviesHD, "HDTV");
|
||||
AddCategoryMapping(94, TorznabCatType.MoviesWEBDL, "WEBDL");
|
||||
AddCategoryMapping(95, TorznabCatType.MoviesWEBDL, "WEBRIP");
|
||||
AddCategoryMapping(12, TorznabCatType.TVDocumentary, "DOCS");
|
||||
AddCategoryMapping(33, TorznabCatType.MoviesOther, "SPECTACLE");
|
||||
AddCategoryMapping(31, TorznabCatType.MoviesOther, "ANIMATION");
|
||||
AddCategoryMapping(9, TorznabCatType.MoviesOther, "VOSTFR");
|
||||
|
||||
// Series
|
||||
AddCategoryMapping(104, TorznabCatType.TVOTHER, "BLURAY");
|
||||
AddCategoryMapping(13, TorznabCatType.TVOTHER, "PACK VF");
|
||||
AddCategoryMapping(15, TorznabCatType.TVHD, "HD VF");
|
||||
AddCategoryMapping(14, TorznabCatType.TVSD, "SD VF");
|
||||
AddCategoryMapping(98, TorznabCatType.TVOTHER, "PACK VOSTFR");
|
||||
AddCategoryMapping(17, TorznabCatType.TVHD, "HD VF VOSTFR");
|
||||
AddCategoryMapping(16, TorznabCatType.TVSD, "SD VF VOSTFR");
|
||||
AddCategoryMapping(101, TorznabCatType.TVAnime, "PACK ANIME");
|
||||
AddCategoryMapping(32, TorznabCatType.TVAnime, "ANIME VF");
|
||||
AddCategoryMapping(110, TorznabCatType.TVAnime, "ANIME VOSTFR");
|
||||
AddCategoryMapping(123, TorznabCatType.TVOTHER, "ANIMATION");
|
||||
AddCategoryMapping(109, TorznabCatType.TVDocumentary, "DOCS");
|
||||
AddCategoryMapping(30, TorznabCatType.TVOTHER, "EMISSIONS");
|
||||
AddCategoryMapping(34, TorznabCatType.TVOTHER, "SPORT");
|
||||
AddCategoryMapping(104, TorznabCatType.TVOTHER, "BLURAY");
|
||||
AddCategoryMapping(13, TorznabCatType.TVOTHER, "PACK VF");
|
||||
AddCategoryMapping(15, TorznabCatType.TVHD, "HD VF");
|
||||
AddCategoryMapping(14, TorznabCatType.TVSD, "SD VF");
|
||||
AddCategoryMapping(98, TorznabCatType.TVOTHER, "PACK VOSTFR");
|
||||
AddCategoryMapping(17, TorznabCatType.TVHD, "HD VF VOSTFR");
|
||||
AddCategoryMapping(16, TorznabCatType.TVSD, "SD VF VOSTFR");
|
||||
AddCategoryMapping(101, TorznabCatType.TVAnime, "PACK ANIME");
|
||||
AddCategoryMapping(32, TorznabCatType.TVAnime, "ANIME VF");
|
||||
AddCategoryMapping(110, TorznabCatType.TVAnime, "ANIME VOSTFR");
|
||||
AddCategoryMapping(123, TorznabCatType.TVOTHER, "ANIMATION");
|
||||
AddCategoryMapping(109, TorznabCatType.TVDocumentary, "DOCS");
|
||||
AddCategoryMapping(30, TorznabCatType.TVOTHER, "EMISSIONS");
|
||||
AddCategoryMapping(34, TorznabCatType.TVOTHER, "SPORT");
|
||||
|
||||
// Music
|
||||
AddCategoryMapping(20, TorznabCatType.AudioVideo, "CONCERT");
|
||||
AddCategoryMapping(20, TorznabCatType.AudioVideo, "CONCERT");
|
||||
|
||||
// Books
|
||||
AddCategoryMapping(24, TorznabCatType.BooksEbook, "ENOOKS NOVEL");
|
||||
AddCategoryMapping(96, TorznabCatType.BooksMagazines, "EBOOKS MAGAZINES");
|
||||
AddCategoryMapping(116, TorznabCatType.BooksEbook, "EBOOKS NOVEL JUNIOR");
|
||||
AddCategoryMapping(99, TorznabCatType.BooksOther, "EBOOKS BD");
|
||||
AddCategoryMapping(102, TorznabCatType.BooksComics, "EBOOKS COMICS");
|
||||
AddCategoryMapping(103, TorznabCatType.BooksOther, "EBOOKS MANGA");
|
||||
AddCategoryMapping(24, TorznabCatType.BooksEbook, "ENOOKS NOVEL");
|
||||
AddCategoryMapping(96, TorznabCatType.BooksMagazines, "EBOOKS MAGAZINES");
|
||||
AddCategoryMapping(116, TorznabCatType.BooksEbook, "EBOOKS NOVEL JUNIOR");
|
||||
AddCategoryMapping(99, TorznabCatType.BooksOther, "EBOOKS BD");
|
||||
AddCategoryMapping(102, TorznabCatType.BooksComics, "EBOOKS COMICS");
|
||||
AddCategoryMapping(103, TorznabCatType.BooksOther, "EBOOKS MANGA");
|
||||
|
||||
// SOFTWARE
|
||||
AddCategoryMapping(25, TorznabCatType.PCGames, "PC GAMES");
|
||||
AddCategoryMapping(27, TorznabCatType.ConsolePS3, "PS GAMES");
|
||||
AddCategoryMapping(111, TorznabCatType.PCMac, "MAC GAMES");
|
||||
AddCategoryMapping(112, TorznabCatType.PC, "LINUX GAMES");
|
||||
AddCategoryMapping(26, TorznabCatType.ConsoleXbox360, "XBOX GAMES");
|
||||
AddCategoryMapping(28, TorznabCatType.ConsoleWii, "WII GAMES");
|
||||
AddCategoryMapping(29, TorznabCatType.ConsoleNDS, "NDS GAMES");
|
||||
AddCategoryMapping(117, TorznabCatType.PC, "ROM");
|
||||
AddCategoryMapping(21, TorznabCatType.PC, "PC SOFTWARE");
|
||||
AddCategoryMapping(22, TorznabCatType.PCMac, "MAC SOFTWARE");
|
||||
AddCategoryMapping(23, TorznabCatType.PCPhoneAndroid, "ANDROID");
|
||||
AddCategoryMapping(25, TorznabCatType.PCGames, "PC GAMES");
|
||||
AddCategoryMapping(27, TorznabCatType.ConsolePS3, "PS GAMES");
|
||||
AddCategoryMapping(111, TorznabCatType.PCMac, "MAC GAMES");
|
||||
AddCategoryMapping(112, TorznabCatType.PC, "LINUX GAMES");
|
||||
AddCategoryMapping(26, TorznabCatType.ConsoleXbox360, "XBOX GAMES");
|
||||
AddCategoryMapping(28, TorznabCatType.ConsoleWii, "WII GAMES");
|
||||
AddCategoryMapping(29, TorznabCatType.ConsoleNDS, "NDS GAMES");
|
||||
AddCategoryMapping(117, TorznabCatType.PC, "ROM");
|
||||
AddCategoryMapping(21, TorznabCatType.PC, "PC SOFTWARE");
|
||||
AddCategoryMapping(22, TorznabCatType.PCMac, "MAC SOFTWARE");
|
||||
AddCategoryMapping(23, TorznabCatType.PCPhoneAndroid, "ANDROID");
|
||||
|
||||
// XxX
|
||||
AddCategoryMapping(36, TorznabCatType.XXX, "XxX / Films");
|
||||
AddCategoryMapping(105, TorznabCatType.XXX, "XxX / Séries");
|
||||
AddCategoryMapping(114, TorznabCatType.XXX, "XxX / Lesbiennes");
|
||||
AddCategoryMapping(115, TorznabCatType.XXX, "XxX / Gays");
|
||||
AddCategoryMapping(113, TorznabCatType.XXX, "XxX / Hentai");
|
||||
AddCategoryMapping(120, TorznabCatType.XXX, "XxX / Magazines");
|
||||
AddCategoryMapping(36, TorznabCatType.XXX, "XxX / Films");
|
||||
AddCategoryMapping(105, TorznabCatType.XXX, "XxX / Séries");
|
||||
AddCategoryMapping(114, TorznabCatType.XXX, "XxX / Lesbiennes");
|
||||
AddCategoryMapping(115, TorznabCatType.XXX, "XxX / Gays");
|
||||
AddCategoryMapping(113, TorznabCatType.XXX, "XxX / Hentai");
|
||||
AddCategoryMapping(120, TorznabCatType.XXX, "XxX / Magazines");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(25, TorznabCatType.PCGames, "Games/PC");
|
||||
AddCategoryMapping(26, TorznabCatType.Console, "Games/NSW");
|
||||
AddCategoryMapping(27, TorznabCatType.PCMac, "Games/Mac");
|
||||
|
||||
|
||||
AddCategoryMapping(28, TorznabCatType.Books, "Ebooks");
|
||||
|
||||
AddCategoryMapping(30, TorznabCatType.XXX, "XXX/SD");
|
||||
|
@ -205,7 +205,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
release.Description = string.Join("<br>\n", descriptions);
|
||||
|
||||
releases.Add(release);
|
||||
releases.Add(release);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -46,21 +46,21 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(22, TorznabCatType.Audio); // Audio - Musik
|
||||
AddCategoryMapping(52, TorznabCatType.Movies3D); // Filme - 3D
|
||||
AddCategoryMapping(51, TorznabCatType.MoviesBluRay); // Filme - BluRay Complete
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesDVD); // Filme - DVD
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesDVD); // Filme - DVD
|
||||
AddCategoryMapping(56, TorznabCatType.MoviesUHD); // Filme - UHD/4K
|
||||
AddCategoryMapping(54, TorznabCatType.MoviesHD); // Filme - HD/1080p
|
||||
AddCategoryMapping(3, TorznabCatType.MoviesHD); // Filme - HD/720p
|
||||
AddCategoryMapping(3, TorznabCatType.MoviesHD); // Filme - HD/720p
|
||||
AddCategoryMapping(48, TorznabCatType.XXX); // Filme - Heimatfilme.XXX
|
||||
AddCategoryMapping(50, TorznabCatType.Movies); // Filme - x264/H.264
|
||||
AddCategoryMapping(2, TorznabCatType.MoviesSD); // Filme - XViD
|
||||
AddCategoryMapping(2, TorznabCatType.MoviesSD); // Filme - XViD
|
||||
AddCategoryMapping(11, TorznabCatType.Console); // Games - Konsolen
|
||||
AddCategoryMapping(10, TorznabCatType.PCGames); // Games - PC
|
||||
AddCategoryMapping(53, TorznabCatType.Other); // International - Complete
|
||||
AddCategoryMapping(36, TorznabCatType.Books); // Sonstige - E-Books
|
||||
AddCategoryMapping(38, TorznabCatType.Other); // Sonstige - Handy
|
||||
AddCategoryMapping(59, TorznabCatType.TVAnime); // Sonstige - Anime
|
||||
AddCategoryMapping(7, TorznabCatType.TVDocumentary); // TV/HDTV - Dokus
|
||||
AddCategoryMapping(8, TorznabCatType.TV); // TV/HDTV - Serien
|
||||
AddCategoryMapping(7, TorznabCatType.TVDocumentary); // TV/HDTV - Dokus
|
||||
AddCategoryMapping(8, TorznabCatType.TV); // TV/HDTV - Serien
|
||||
AddCategoryMapping(57, TorznabCatType.TVSport); // Sport - Allgemein
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
|
@ -33,4 +33,4 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(7, TorznabCatType.Books, "Comics");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -333,8 +333,8 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
logger.Debug(string.Format("{0}: Download selector {1} matched:{2}", ID, downloadSelector, DlUri.OuterHtml));
|
||||
var href = DlUri.GetAttribute("href");
|
||||
downloadlink = new Uri(SiteLink + "forum/" +href);
|
||||
|
||||
downloadlink = new Uri(SiteLink + "forum/" + href);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1594,9 +1594,9 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
else if (configData.StripRussianLetters.Value)
|
||||
{
|
||||
if (release.Category.Contains(TorznabCatType.Movies.ID) ||
|
||||
release.Category.Contains(TorznabCatType.MoviesHD.ID) ||
|
||||
release.Category.Contains(TorznabCatType.Movies3D.ID) ||
|
||||
if (release.Category.Contains(TorznabCatType.Movies.ID) ||
|
||||
release.Category.Contains(TorznabCatType.MoviesHD.ID) ||
|
||||
release.Category.Contains(TorznabCatType.Movies3D.ID) ||
|
||||
release.Category.Contains(TorznabCatType.MoviesForeign.ID))
|
||||
{
|
||||
// remove director's name from title
|
||||
|
@ -1605,7 +1605,7 @@ namespace Jackett.Common.Indexers
|
|||
// this part should be removed: (Мартин Скорсезе / Martin Scorsese)
|
||||
var director = new Regex(@"(\([А-Яа-яЁё\W]+)\s/\s(.+?)\)");
|
||||
release.Title = director.Replace(release.Title, "");
|
||||
|
||||
|
||||
// Bluray quality fix: radarr parse Blu-ray Disc as Bluray-1080p but should be BR-DISK
|
||||
release.Title = Regex.Replace(release.Title, "Blu-ray Disc", "BR-DISK", RegexOptions.IgnoreCase);
|
||||
// language fix: all rutracker releases contains russian track
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
@ -111,11 +111,11 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(137, TorznabCatType.MoviesDVD, "|-Мультфільми та мультсеріали в DVD");
|
||||
AddCategoryMapping(137, TorznabCatType.TV, "|-Мультфільми та мультсеріали в DVD");
|
||||
AddCategoryMapping(138, TorznabCatType.MoviesDVD, "|-Документальні фільми в DVD");
|
||||
|
||||
|
||||
AddCategoryMapping(237, TorznabCatType.Movies, "Відео для мобільних (iOS, Android, Windows Phone)");
|
||||
|
||||
|
||||
AddCategoryMapping(33, TorznabCatType.AudioVideo, "Звукові доріжки та субтитри");
|
||||
|
||||
|
||||
AddCategoryMapping(8, TorznabCatType.Audio, "Українська музика (lossy)");
|
||||
AddCategoryMapping(23, TorznabCatType.Audio, "|-Поп, Естрада");
|
||||
AddCategoryMapping(24, TorznabCatType.Audio, "|-Джаз, Блюз");
|
||||
|
@ -125,7 +125,7 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(36, TorznabCatType.Audio, "|-Реп, Хіп-хоп, РнБ");
|
||||
AddCategoryMapping(38, TorznabCatType.Audio, "|-Електронна музика");
|
||||
AddCategoryMapping(56, TorznabCatType.Audio, "|-Невидане");
|
||||
|
||||
|
||||
AddCategoryMapping(98, TorznabCatType.AudioLossless, "Українська музика (lossless)");
|
||||
AddCategoryMapping(100, TorznabCatType.AudioLossless, "|-Поп, Естрада");
|
||||
AddCategoryMapping(101, TorznabCatType.AudioLossless, "|-Джаз, Блюз");
|
||||
|
@ -134,7 +134,7 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(104, TorznabCatType.AudioLossless, "|-Рок, Метал, Альтернатива, Панк, СКА");
|
||||
AddCategoryMapping(105, TorznabCatType.AudioLossless, "|-Реп, Хіп-хоп, РнБ");
|
||||
AddCategoryMapping(106, TorznabCatType.AudioLossless, "|-Електронна музика");
|
||||
|
||||
|
||||
AddCategoryMapping(11, TorznabCatType.Books, "Друкована література");
|
||||
AddCategoryMapping(134, TorznabCatType.Books, "|-Українська художня література (до 1991 р.)");
|
||||
AddCategoryMapping(177, TorznabCatType.Books, "|-Українська художня література (після 1991 р.)");
|
||||
|
@ -145,13 +145,13 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(181, TorznabCatType.BooksMagazines, "|-Періодика");
|
||||
AddCategoryMapping(182, TorznabCatType.Books, "|-Батькам та малятам");
|
||||
AddCategoryMapping(184, TorznabCatType.BooksComics, "|-Графіка (комікси, манґа, BD та інше)");
|
||||
|
||||
|
||||
AddCategoryMapping(185, TorznabCatType.AudioAudiobook, "Аудіокниги українською");
|
||||
AddCategoryMapping(135, TorznabCatType.AudioAudiobook, "|-Українська художня література");
|
||||
AddCategoryMapping(186, TorznabCatType.AudioAudiobook, "|-Зарубіжна художня література");
|
||||
AddCategoryMapping(187, TorznabCatType.AudioAudiobook, "|-Історія, біографістика, спогади");
|
||||
AddCategoryMapping(189, TorznabCatType.AudioAudiobook, "|-Сирий матеріал");
|
||||
|
||||
|
||||
AddCategoryMapping(9, TorznabCatType.PC, "Windows");
|
||||
AddCategoryMapping(25, TorznabCatType.PC, "|-Windows");
|
||||
AddCategoryMapping(199, TorznabCatType.PC, "|-Офіс");
|
||||
|
@ -165,7 +165,7 @@ namespace Jackett.Common.Indexers
|
|||
AddCategoryMapping(211, TorznabCatType.PCPhoneAndroid, "|-Android");
|
||||
AddCategoryMapping(122, TorznabCatType.PCPhoneIOS, "|-iOS");
|
||||
AddCategoryMapping(40, TorznabCatType.PCPhoneOther, "|-Інші мобільні платформи");
|
||||
|
||||
|
||||
// AddCategoryMapping(241, TorznabCatType.Other, "Інше");
|
||||
// AddCategoryMapping(203, TorznabCatType.Other, "|-Інфодиски, електронні підручники, відеоуроки");
|
||||
// AddCategoryMapping(12, TorznabCatType.Other, "|-Шпалери, фотографії та зображення");
|
||||
|
@ -258,7 +258,7 @@ namespace Jackett.Common.Indexers
|
|||
var qDownloadLink = Row.QuerySelector("td:nth-child(6) > a");
|
||||
if (qDownloadLink == null) // Expects moderation
|
||||
continue;
|
||||
|
||||
|
||||
var qDetailsLink = Row.QuerySelector("td:nth-child(3) > a");
|
||||
var qSize = Row.QuerySelector("td:nth-child(7)");
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
@ -138,7 +138,7 @@ namespace Jackett.Common.Indexers
|
|||
var type = torrent_info.Value<string>("type");
|
||||
switch (type)
|
||||
{
|
||||
case "web":
|
||||
case "web":
|
||||
type = " WEBRip";
|
||||
break;
|
||||
default:
|
||||
|
@ -169,7 +169,7 @@ namespace Jackett.Common.Indexers
|
|||
var dateStr = torrent_info.Value<string>("date_uploaded");
|
||||
var dateTime = DateTime.ParseExact(dateStr, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
|
||||
release.PublishDate = DateTime.SpecifyKind(dateTime, DateTimeKind.Utc).ToLocalTime();
|
||||
release.Link = new Uri(torrent_info.Value<string>("url"));
|
||||
release.Link = new Uri(torrent_info.Value<string>("url"));
|
||||
release.Seeders = torrent_info.Value<int>("seeds");
|
||||
release.Peers = torrent_info.Value<int>("peers") + release.Seeders;
|
||||
release.Size = torrent_info.Value<long>("size_bytes");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue