mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-24 23:04:33 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6929c0bab | ||
|
|
9e5dbf9a8f | ||
|
|
64abc61893 | ||
|
|
6151cc6e8b | ||
|
|
b02d62a662 | ||
|
|
0788640be7 | ||
|
|
0504dd31cd | ||
|
|
25f87c8ed2 | ||
|
|
58c4c37f90 | ||
|
|
1fa421884d | ||
|
|
8b723a3cea | ||
|
|
a2046ea73f |
18
README.md
18
README.md
@@ -63,7 +63,9 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Monova
|
||||
* MovCr
|
||||
* Newpct (aka: tvsinpagar, descargas2020, torrentlocura, torrentrapid, tumejortorrent, pctnew, etc)
|
||||
* Newstudio
|
||||
* Nitro
|
||||
* NoName Club (NNM-Club)
|
||||
* Nyaa.si
|
||||
* Nyaa-Pantsu
|
||||
* OxTorrent
|
||||
@@ -90,6 +92,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Torrent9
|
||||
* Torrent9Clone
|
||||
* Torrentz2
|
||||
* Underverse
|
||||
* YourBittorrent
|
||||
* YTS.ag
|
||||
* Zooqle
|
||||
@@ -116,9 +119,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Metal Tracker
|
||||
* MVGroup Forum
|
||||
* MVGroup Main
|
||||
* Newstudio
|
||||
* NetHD (VietTorrent)
|
||||
* NoName Club (NNM-Club)
|
||||
* RockBox
|
||||
* RuTracker
|
||||
* Sharewood
|
||||
@@ -126,7 +127,6 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* SoundPark
|
||||
* Toloka.to
|
||||
* Torrents-Local
|
||||
* Underverse
|
||||
* Union Fansub
|
||||
* Vanila
|
||||
* YggTorrent (YGG)
|
||||
@@ -610,7 +610,7 @@ All contributions are welcome just send a pull request.
|
||||
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
|
||||
* Clone Jackett
|
||||
* Open Powershell and from the `src` directory, run `dotnet restore`
|
||||
* Open the Jackett solution in Visual Studio 2017 (version 15.9 or above)
|
||||
* Open the Jackett solution in Visual Studio 2019 (version 16.3 or above)
|
||||
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
|
||||
* Select Jackett.Server as startup project
|
||||
* In the drop down menu of the run button select "Jackett.Server" instead of "IIS Express"
|
||||
@@ -627,21 +627,21 @@ git clone https://github.com/Jackett/Jackett.git
|
||||
cd Jackett/src
|
||||
|
||||
# dotnet core version
|
||||
dotnet publish Jackett.Server -f netcoreapp2.2 --self-contained -r osx-x64 -c Debug # takes care of everything
|
||||
./Jackett.Server/bin/Debug/netcoreapp2.2/osx-x64/jackett # run jackett
|
||||
dotnet publish Jackett.Server -f netcoreapp3.0 --self-contained -r osx-x64 -c Debug # takes care of everything
|
||||
./Jackett.Server/bin/Debug/netcoreapp3.0/osx-x64/jackett # run jackett
|
||||
```
|
||||
|
||||
### Linux
|
||||
|
||||
|
||||
```bash
|
||||
sudo apt install mono-complete nuget msbuild dotnet-sdk-2.2 # install build tools (debian/ubuntu)
|
||||
sudo apt install mono-complete nuget msbuild dotnet-sdk-3.0 # install build tools (debian/ubuntu)
|
||||
git clone https://github.com/Jackett/Jackett.git
|
||||
cd Jackett/src
|
||||
|
||||
# dotnet core version
|
||||
dotnet publish Jackett.Server -f netcoreapp2.2 --self-contained -r linux-x64 -c Debug # takes care of everything
|
||||
./Jackett.Server/bin/Debug/netcoreapp2.2/linux-x64/jackett # run jackett
|
||||
dotnet publish Jackett.Server -f netcoreapp3.0 --self-contained -r linux-x64 -c Debug # takes care of everything
|
||||
./Jackett.Server/bin/Debug/netcoreapp3.0/linux-x64/jackett # run jackett
|
||||
```
|
||||
|
||||
## Screenshots
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
version: 0.11.{build}
|
||||
version: 0.12.{build}
|
||||
skip_tags: true
|
||||
image:
|
||||
- Ubuntu
|
||||
- Visual Studio 2017
|
||||
- Visual Studio 2019
|
||||
environment:
|
||||
APPVEYOR_YML_DISABLE_PS_LINUX: true
|
||||
configuration: Release
|
||||
install:
|
||||
#Remove once .NET Core 2.2.5 is deployed to Appveyor
|
||||
- sh: sudo apt-get update
|
||||
- sh: sudo apt-get -y install dotnet-sdk-2.2
|
||||
assembly_info:
|
||||
patch: true
|
||||
file: '**\AssemblyInfo.*'
|
||||
|
||||
90
build.cake
90
build.cake
@@ -16,7 +16,7 @@ var configuration = Argument("configuration", "Debug");
|
||||
var workingDir = MakeAbsolute(Directory("./"));
|
||||
string artifactsDirName = "Artifacts";
|
||||
string testResultsDirName = "TestResults";
|
||||
string netCoreFramework = "netcoreapp2.2";
|
||||
string netCoreFramework = "netcoreapp3.0";
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string updaterProjectPath = "./src/Jackett.Updater/Jackett.Updater.csproj";
|
||||
|
||||
@@ -28,7 +28,7 @@ Task("Info")
|
||||
.Does(() =>
|
||||
{
|
||||
Information(@"Jackett Cake build script starting...");
|
||||
Information(@"Requires InnoSetup and C:\cygwin to be present for packaging (Pre-installed on AppVeyor) on Windows");
|
||||
Information(@"Requires InnoSetup and C:\msys64 to be present for packaging (Pre-installed on AppVeyor) on Windows");
|
||||
Information(@"Working directory is: " + workingDir);
|
||||
|
||||
if (IsRunningOnWindows())
|
||||
@@ -64,7 +64,7 @@ Task("Build-Full-Framework")
|
||||
|
||||
var buildSettings = new MSBuildSettings()
|
||||
.SetConfiguration(configuration)
|
||||
.UseToolVersion(MSBuildToolVersion.VS2017);
|
||||
.UseToolVersion(MSBuildToolVersion.VS2019);
|
||||
|
||||
MSBuild("./src/Jackett.sln", buildSettings);
|
||||
});
|
||||
@@ -106,6 +106,8 @@ Task("Package-Windows-Full-Framework")
|
||||
|
||||
InnoSetupSettings settings = new InnoSetupSettings();
|
||||
settings.OutputDirectory = workingDir + "/" + artifactsDirName;
|
||||
//Can remove below line once Cake is updated for InnoSetup 6 - https://github.com/cake-build/cake/pull/2565
|
||||
settings.ToolPath = @"C:\Program Files (x86)\Inno Setup 6\ISCC.exe";
|
||||
settings.Defines = new Dictionary<string, string>
|
||||
{
|
||||
{ "MyFileForVersion", sourceFolder + "/Jackett.Common.dll" },
|
||||
@@ -145,6 +147,7 @@ Task("Package-Mono-Full-Framework")
|
||||
|
||||
DeleteFile(buildOutputPath + "/System.Runtime.InteropServices.RuntimeInformation.dll");
|
||||
|
||||
InstallMsysTar();
|
||||
Gzip("./BuildOutput/net461/linux-x64", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.Mono.tar.gz");
|
||||
});
|
||||
|
||||
@@ -326,13 +329,13 @@ Task("Linux-Environment")
|
||||
});
|
||||
|
||||
|
||||
private void RunCygwinCommand(string utility, string utilityArguments)
|
||||
private void RunMsysCommand(string utility, string utilityArguments)
|
||||
{
|
||||
var cygwinDir = @"C:\cygwin\bin\";
|
||||
var utilityProcess = cygwinDir + utility + ".exe";
|
||||
var msysDir = @"C:\msys64\usr\bin\";
|
||||
var utilityProcess = msysDir + utility + ".exe";
|
||||
|
||||
Information("CygWin Utility: " + utility);
|
||||
Information("CygWin Directory: " + cygwinDir);
|
||||
Information("MSYS2 Utility: " + utility);
|
||||
Information("MSYS2 Directory: " + msysDir);
|
||||
Information("Utility Location: " + utilityProcess);
|
||||
Information("Utility Arguments: " + utilityArguments);
|
||||
|
||||
@@ -343,7 +346,7 @@ private void RunCygwinCommand(string utility, string utilityArguments)
|
||||
utilityProcess,
|
||||
new ProcessSettings {
|
||||
Arguments = utilityArguments,
|
||||
WorkingDirectory = cygwinDir,
|
||||
WorkingDirectory = msysDir,
|
||||
RedirectStandardOutput = true
|
||||
},
|
||||
out redirectedStandardOutput,
|
||||
@@ -364,11 +367,9 @@ private void RunCygwinCommand(string utility, string utilityArguments)
|
||||
Information(utility + " Exit code: {0}", exitCodeWithArgument);
|
||||
}
|
||||
|
||||
private string RelativeWinPathToCygPath(string relativePath)
|
||||
private string RelativeWinPathToFullPath(string relativePath)
|
||||
{
|
||||
var cygdriveBase = "/cygdrive/" + workingDir.ToString().Replace(":", "").Replace("\\", "/");
|
||||
var cygPath = cygdriveBase + relativePath.TrimStart('.');
|
||||
return cygPath;
|
||||
return (workingDir + relativePath.TrimStart('.'));
|
||||
}
|
||||
|
||||
private void RunLinuxCommand(string file, string arg)
|
||||
@@ -390,12 +391,12 @@ private void Gzip(string sourceFolder, string outputDirectory, string tarCdirect
|
||||
|
||||
if (IsRunningOnWindows())
|
||||
{
|
||||
var cygSourcePath = RelativeWinPathToCygPath(sourceFolder);
|
||||
var tarArguments = @"-cvf " + cygSourcePath + "/" + tarFileName + " -C " + cygSourcePath + $" {tarCdirectoryOption} --mode ='755'";
|
||||
var gzipArguments = @"-k " + cygSourcePath + "/" + tarFileName;
|
||||
var fullSourcePath = RelativeWinPathToFullPath(sourceFolder);
|
||||
var tarArguments = @"--force-local -cvf " + fullSourcePath + "/" + tarFileName + " -C " + fullSourcePath + $" {tarCdirectoryOption} --mode ='755'";
|
||||
var gzipArguments = @"-k " + fullSourcePath + "/" + tarFileName;
|
||||
|
||||
RunCygwinCommand("Tar", tarArguments);
|
||||
RunCygwinCommand("Gzip", gzipArguments);
|
||||
RunMsysCommand("tar", tarArguments);
|
||||
RunMsysCommand("gzip", gzipArguments);
|
||||
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
|
||||
}
|
||||
else
|
||||
@@ -421,16 +422,57 @@ private void Gzip(string sourceFolder, string outputDirectory, string tarCdirect
|
||||
}
|
||||
}
|
||||
|
||||
private void DotNetCorePublish(string projectPath, string framework, string runtime, string outputPath)
|
||||
private void InstallMsysTar()
|
||||
{
|
||||
var settings = new DotNetCorePublishSettings
|
||||
//Gzip is included by default with MSYS2, but not tar. Use the package manager to install tar
|
||||
|
||||
var startInfo = new System.Diagnostics.ProcessStartInfo()
|
||||
{
|
||||
Framework = framework,
|
||||
Runtime = runtime,
|
||||
OutputDirectory = outputPath
|
||||
Arguments = "-S --noconfirm tar",
|
||||
FileName = @"C:\msys64\usr\bin\pacman.exe",
|
||||
UseShellExecute = false
|
||||
};
|
||||
|
||||
DotNetCorePublish(projectPath, settings);
|
||||
var process = System.Diagnostics.Process.Start(startInfo);
|
||||
process.WaitForExit();
|
||||
|
||||
if (FileExists(@"C:\msys64\usr\bin\tar.exe") && FileExists(@"C:\msys64\usr\bin\gzip.exe"))
|
||||
{
|
||||
Information("tar.exe and gzip.exe were found");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("tar.exe and gzip.exe were NOT found");
|
||||
}
|
||||
}
|
||||
|
||||
private void DotNetCorePublish(string projectPath, string framework, string runtime, string outputPath)
|
||||
{
|
||||
bool publishSingleFile = false;
|
||||
|
||||
if (publishSingleFile && framework != "net461")
|
||||
{
|
||||
var settings = new DotNetCorePublishSettings
|
||||
{
|
||||
Framework = framework,
|
||||
Runtime = runtime,
|
||||
OutputDirectory = outputPath,
|
||||
ArgumentCustomization = args=>args.Append("/p:PublishSingleFile=true")
|
||||
};
|
||||
|
||||
DotNetCorePublish(projectPath, settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
var settings = new DotNetCorePublishSettings
|
||||
{
|
||||
Framework = framework,
|
||||
Runtime = runtime,
|
||||
OutputDirectory = outputPath
|
||||
};
|
||||
|
||||
DotNetCorePublish(projectPath, settings);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
search:
|
||||
paths:
|
||||
# https://anidex.info/?page=search&id=1,2,3&lang_id=5,1,10&group_id=0&q=rinshi
|
||||
- path: "?page=search&id={{if .Categories}}{{range .Categories}}{{.}},{{end}}{{else}}0{{end}}{{if .Config.lang-id}}&lang_id={{.Config.lang-id}}{{else}}{{end}}&group_id=0&q={{if .Keywords}}{{.Keywords}}{{else}}{{end}}"
|
||||
- path: "?page=search&id={{if .Categories}}{{range .Categories}},{{.}}{{end}}{{else}}0{{end}}{{if .Config.lang-id}}&lang_id={{.Config.lang-id}}{{else}}{{end}}&group_id=0&q={{if .Keywords}}{{.Keywords}}{{else}}{{end}}"
|
||||
rows:
|
||||
selector: div.table-responsive > table > tbody > tr
|
||||
fields:
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.elitetorrent.one/
|
||||
- https://www.elitetorrent.is/
|
||||
legacylinks:
|
||||
- https://www.elitetorrent.biz/
|
||||
- https://www.elitetorrent.io/
|
||||
- https://www.elitetorrent.one/
|
||||
|
||||
caps:
|
||||
categories:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
site: focusx
|
||||
name: FocusX
|
||||
description: "FocusX is a RUSSIAN Public torrent site for MOVIES and TV"
|
||||
language: re-RU
|
||||
language: ru-ru
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
|
||||
@@ -50,37 +50,19 @@
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
|
||||
settings:
|
||||
- name: cookie
|
||||
type: text
|
||||
label: Cookie
|
||||
- name: info
|
||||
type: info
|
||||
label: How to get the Cookie
|
||||
default: "<ol><li>Login to this tracker in your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button<li>Refresh the page by pressing <b>F5</b><li>Select the <b>Headers</b> tab<li>Find 'cookie:' in the <b>Request Headers</b> section<li>Copy & paste the whole cookie string to here</ol>"
|
||||
|
||||
login:
|
||||
method: cookie
|
||||
path: login.php
|
||||
method: form
|
||||
form: form[action="takelogin.php"]
|
||||
inputs:
|
||||
cookie: "{{ .Config.cookie }}"
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: tbody:has(td.colhead > span:contains("Error"))
|
||||
- selector: tbody:has(td.colhead > span:contains("failed"))
|
||||
test:
|
||||
path: browse.php
|
||||
|
||||
# login:
|
||||
# path: login.php
|
||||
# method: form
|
||||
# form: form[action="takelogin.php"]
|
||||
# inputs:
|
||||
# username: "{{ .Config.username }}"
|
||||
# password: "{{ .Config.password }}"
|
||||
# use_ssl: "1"
|
||||
# perm_ssl: "1"
|
||||
# error:
|
||||
# - selector: tbody:has(td.colhead > span:contains("Error"))
|
||||
# - selector: tbody:has(td.colhead > span:contains("failed"))
|
||||
# test:
|
||||
# path: browse.php
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: browse.php
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
site: newstudio
|
||||
name: Newstudio
|
||||
description: "Newstudio is a RUSSIAN Semi-Private site for TV"
|
||||
description: "Newstudio is a RUSSIAN Public site for TV"
|
||||
language: ru-ru
|
||||
type: semi-private
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- http://newstudio.tv/
|
||||
@@ -16,18 +16,7 @@
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
|
||||
login:
|
||||
path: login.php
|
||||
method: post
|
||||
inputs:
|
||||
login: 1
|
||||
login_username: "{{ .Config.username }}"
|
||||
login_password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: div.alert-error
|
||||
test:
|
||||
path: "/"
|
||||
selector: a[href="/login.php?logout=1"]
|
||||
settings: []
|
||||
|
||||
search:
|
||||
paths:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,12 @@
|
||||
---
|
||||
site: underverse
|
||||
name: Underverse
|
||||
description: "Underverse is a RUSSIAN Semi-Private Torrent Tracker for 0DAY / GENERAL"
|
||||
description: "Underverse is a RUSSIAN Public Torrent Tracker for MOVIES / TV / MUSIC / GENERAL"
|
||||
language: ru-ru
|
||||
type: semi-private
|
||||
type: public
|
||||
encoding: windows-1251
|
||||
links:
|
||||
- https://underver.se/
|
||||
- https://underverse.su/
|
||||
|
||||
caps:
|
||||
@@ -632,10 +633,6 @@
|
||||
# Cart???
|
||||
- {id: 614, cat: Other, desc: "Отстойник"}
|
||||
- {id: 615, cat: Other, desc: "Для поглощенных раздач"}
|
||||
# Приватные форумы
|
||||
# Private forums
|
||||
- {id: 603, cat: Other, desc: "Релизерская каптерка"}
|
||||
- {id: 604, cat: TV, desc: " |- Черновики"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
@@ -643,36 +640,11 @@
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: striprussian
|
||||
type: checkbox
|
||||
label: Strip Russian Letters
|
||||
default: false
|
||||
|
||||
login:
|
||||
path: login.php
|
||||
method: form
|
||||
form: form[action$="/login.php"]
|
||||
inputs:
|
||||
login_username: "{{ .Config.username }}"
|
||||
login_password: "{{ .Config.password }}"
|
||||
redirect: "index.php"
|
||||
autologin: 1
|
||||
selectorinputs:
|
||||
cookie_test:
|
||||
selector: input[name="cookie_test"]
|
||||
attribute: value
|
||||
error:
|
||||
- selector: h4.warnColor1
|
||||
test:
|
||||
path: index.php
|
||||
selector: a[href="./login.php?logout=1"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: tracker.php
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Jackett.Common.Indexers
|
||||
{ "agents of shield", "Agents of S.H.I.E.L.D."},
|
||||
{ "greys anatomy", "grey's anatomy"},
|
||||
};
|
||||
|
||||
|
||||
public override string[] LegacySiteLinks { get; protected set; } = new string[] {
|
||||
"https://bj-share.me/"
|
||||
};
|
||||
@@ -116,24 +116,43 @@ namespace Jackett.Common.Indexers
|
||||
// the season (wrong season) and episode as absolute, eg: One Piece - S08E836
|
||||
// 836 is the latest episode in absolute numbering, that is correct, but S08 is not the current season...
|
||||
// So for this show, i don't see a other way to make it work...
|
||||
//
|
||||
//
|
||||
// All others animes that i tested is with correct season and episode set, so i can't remove the season from all
|
||||
// or will break everything else
|
||||
//
|
||||
//
|
||||
// In this indexer, it looks that it is added "automatically", so all current and new releases will be broken
|
||||
// until they or the source from where they get that info fix it...
|
||||
|
||||
return title.Contains("One Piece") ? Regex.Replace(title, @"(Ep[\.]?[ ]?)|([S]\d\d[Ee])", "E") : title;
|
||||
if (title.Contains("One Piece"))
|
||||
{
|
||||
title = Regex.Replace(title, @"(Ep[\.]?[ ]?)|([S]\d\d[Ee])", "E");
|
||||
return title;
|
||||
}
|
||||
else if (title.Contains("[Novela]"))
|
||||
{
|
||||
title = Regex.Replace(title, @"(Cap[\.]?[ ]?)", "S01E");
|
||||
title = Regex.Replace(title, @"(\[Novela\]\ )", "");
|
||||
title = Regex.Replace(title, @"(\ \-\s*Completo)", " - S01");
|
||||
return title;
|
||||
}
|
||||
else
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// return title.Contains("One Piece") ? Regex.Replace(title, @"(Ep[\.]?[ ]?)|([S]\d\d[Ee])", "E") : 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
|
||||
if (string.IsNullOrWhiteSpace(query.SearchTerm) && !query.IsImdbQuery)
|
||||
@@ -318,14 +337,15 @@ namespace Jackett.Common.Indexers
|
||||
var title = qDetailsLink.TextContent;
|
||||
ICollection<int> category = null;
|
||||
string yearStr = null;
|
||||
|
||||
|
||||
|
||||
|
||||
if (row.ClassList.Contains("group") || row.ClassList.Contains("torrent")) // group/ungrouped headers
|
||||
{
|
||||
var qCatLink = row.QuerySelector("a[href^=\"/torrents.php?filter_cat\"]");
|
||||
categoryStr = qCatLink.GetAttribute("href").Split('=')[1].Split('&')[0];
|
||||
category = MapTrackerCatToNewznab(categoryStr);
|
||||
|
||||
|
||||
yearStr = qDetailsLink.NextSibling.TextContent.Trim().TrimStart('[').TrimEnd(']');
|
||||
|
||||
title = FixAbsoluteNumbering(title);
|
||||
@@ -361,7 +381,7 @@ namespace Jackett.Common.Indexers
|
||||
var cleanTitle = Regex.Replace(groupTitle, @" - ((S(\d{2}))?E(\d{1,4}))", "");
|
||||
title = Regex.Replace(title.Trim(), @"\s+", " ");
|
||||
var seasonEp = Regex.Replace(title, @"((S\d{2})?(E\d{2,4})?) .*", "$1");
|
||||
|
||||
|
||||
// do not include year to animes
|
||||
if (categoryStr == "14")
|
||||
{
|
||||
@@ -377,6 +397,7 @@ namespace Jackett.Common.Indexers
|
||||
{
|
||||
var qDescription = row.QuerySelector("div.torrent_info");
|
||||
release.Description = qDescription.TextContent;
|
||||
title = FixAbsoluteNumbering(title);
|
||||
|
||||
var cleanTitle = Regex.Replace(title, @" - ((S\d{2})?(E\d{2,4})?)", "");
|
||||
var seasonEp = Regex.Replace(title, @"^(.*?) - ((S\d{2})?(E\d{2,4})?)", "$2");
|
||||
@@ -386,11 +407,17 @@ namespace Jackett.Common.Indexers
|
||||
{
|
||||
release.Title = cleanTitle + " " + seasonEp;
|
||||
}
|
||||
else
|
||||
// the seasonEp RegEx is getting all when done with movies, and then cleaning again when getting international name,
|
||||
// so it was cutting of the year of movies and getting clonflict in Radarr
|
||||
else if (categoryStr == "2" || categoryStr == "6")
|
||||
{
|
||||
release.Title = cleanTitle + " " + yearStr + " " + seasonEp;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
release.Title = cleanTitle + " " + yearStr;
|
||||
}
|
||||
|
||||
release.Category = category;
|
||||
}
|
||||
|
||||
@@ -399,11 +426,29 @@ namespace Jackett.Common.Indexers
|
||||
release.Description = release.Description.Replace("/ HD / ", "/ 720p /");
|
||||
release.Description = release.Description.Replace(" / HD]", " / 720p]");
|
||||
release.Description = release.Description.Replace("4K", "2160p");
|
||||
release.Description = release.Description.Replace("SD", "480p");
|
||||
|
||||
// Adjust the description in order to can be read by Radarr and Sonarr
|
||||
|
||||
var cleanDescription = release.Description.Trim().TrimStart('[').TrimEnd(']');
|
||||
String[] titleElements;
|
||||
|
||||
string[] stringSeparators = new string[] {" / "};
|
||||
titleElements = cleanDescription.Split(stringSeparators,StringSplitOptions.None);
|
||||
|
||||
if (titleElements[titleElements.Length - 1] == "3D")
|
||||
{
|
||||
release.Title += " " + titleElements[titleElements.Length - 2] + " " + titleElements[titleElements.Length - 1] + " " + titleElements[3] + " " + titleElements[2] + " " + titleElements[1] + " " + titleElements[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
release.Title += " " + titleElements[titleElements.Length - 1] + " " + titleElements[3] + " " + titleElements[2] + " " + titleElements[1] + " " + titleElements[4];
|
||||
}
|
||||
|
||||
|
||||
// Get international title if available, or use the full title if not
|
||||
release.Title = Regex.Replace(release.Title, @".* \[(.*?)\](.*)", "$1$2");
|
||||
release.Title += " " + release.Description; // add year and Description to the release Title to add some meaning to it
|
||||
|
||||
|
||||
// This tracker does not provide an publish date to search terms (only on last 24h page)
|
||||
release.PublishDate = DateTime.Today;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Jackett.Common.Indexers
|
||||
AddCategoryMapping(48, TorznabCatType.Movies, "Movies/x265");
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesSD, "Movies/XviD");
|
||||
|
||||
AddCategoryMapping(17, TorznabCatType.Audio, "Music/Audio");
|
||||
AddCategoryMapping(17, TorznabCatType.AudioMP3, "Music/Audio");
|
||||
AddCategoryMapping(23, TorznabCatType.AudioForeign, "Music/Non-English");
|
||||
AddCategoryMapping(41, TorznabCatType.Audio, "Music/Packs");
|
||||
AddCategoryMapping(16, TorznabCatType.AudioVideo, "Music/Video");
|
||||
|
||||
@@ -7,23 +7,23 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="0.12.0" />
|
||||
<PackageReference Include="Autofac" Version="4.9.2" />
|
||||
<PackageReference Include="AngleSharp" Version="0.13.0" />
|
||||
<PackageReference Include="Autofac" Version="4.9.4" />
|
||||
<PackageReference Include="AutoMapper" Version="8.1.0" />
|
||||
<PackageReference Include="BencodeNET" Version="2.3.0" />
|
||||
<PackageReference Include="CloudflareSolverRe" Version="1.0.5" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.5.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.6.0" />
|
||||
<PackageReference Include="CsQuery.NETStandard" Version="1.3.6.1" />
|
||||
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
|
||||
<PackageReference Include="MimeMapping" Version="1.0.1.12" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
|
||||
<PackageReference Include="MimeMapping" Version="1.0.1.17" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
<PackageReference Include="NLog" Version="4.6.3" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.1.0" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.5.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
|
||||
<PackageReference Include="NLog" Version="4.6.7" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.2.0" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.6.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.6.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -8,15 +8,23 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using NLog;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
#if !NET461
|
||||
using Microsoft.Extensions.Hosting;
|
||||
#endif
|
||||
|
||||
namespace Jackett.Server
|
||||
{
|
||||
public static class Helper
|
||||
{
|
||||
public static IContainer ApplicationContainer { get; set; }
|
||||
public static IApplicationLifetime applicationLifetime;
|
||||
private static bool _automapperInitialised = false;
|
||||
|
||||
#if NET461
|
||||
public static IApplicationLifetime applicationLifetime;
|
||||
#else
|
||||
public static IHostApplicationLifetime applicationLifetime;
|
||||
#endif
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (_automapperInitialised == false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||
<ApplicationIcon>jackett.ico</ApplicationIcon>
|
||||
<AssemblyName>JackettConsole</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
@@ -13,25 +13,15 @@
|
||||
<AssemblyName>jackett</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.2'">
|
||||
<RuntimeIdentifiers>win-x86;osx-x64;linux-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||
<RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Conditionally obtain references for the .NET Core App 2.2 target -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
|
||||
<!-- Conditionally obtain references for the .NET Core App 3.0 target -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
|
||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
|
||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.9.2" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.4.0" />
|
||||
<PackageReference Include="AutoMapper" Version="8.1.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.5.0" />
|
||||
<!-- Conditionally obtain references for the .NET461 target -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
|
||||
@@ -39,11 +29,18 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.9.4" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.4.0" />
|
||||
<PackageReference Include="AutoMapper" Version="8.1.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.6.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
|
||||
<PackageReference Include="NLog" Version="4.6.3" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.8.1" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
|
||||
<PackageReference Include="NLog" Version="4.6.7" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.6.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using NLog;
|
||||
using System;
|
||||
#if NETCOREAPP2_2
|
||||
#if !NET461
|
||||
using Mono.Unix;
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Jackett.Server.Services
|
||||
|
||||
public void MakeFileExecutable(string path)
|
||||
{
|
||||
#if NETCOREAPP2_2
|
||||
#if !NET461
|
||||
|
||||
//Calling the file permission service to limit usage to netcoreapp. The Mono.Posix.NETStandard library causes issues outside of .NET Core
|
||||
//https://github.com/xamarin/XamarinComponents/issues/282
|
||||
|
||||
@@ -21,6 +21,9 @@ using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
#if !NET461
|
||||
using Microsoft.Extensions.Hosting;
|
||||
#endif
|
||||
|
||||
namespace Jackett.Server
|
||||
{
|
||||
@@ -49,6 +52,9 @@ namespace Jackett.Server
|
||||
options.Cookie.SameSite = SameSiteMode.None;
|
||||
});
|
||||
|
||||
|
||||
|
||||
#if NET461
|
||||
services.AddMvc(config =>
|
||||
{
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
@@ -59,8 +65,20 @@ namespace Jackett.Server
|
||||
.AddJsonOptions(options =>
|
||||
{
|
||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver(); //Web app uses Pascal Case JSON
|
||||
});
|
||||
#else
|
||||
services.AddControllers(config =>
|
||||
{
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
.RequireAuthenticatedUser()
|
||||
.Build();
|
||||
config.Filters.Add(new AuthorizeFilter(policy));
|
||||
})
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
.AddNewtonsoftJson(options =>
|
||||
{
|
||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver(); //Web app uses Pascal Case JSON
|
||||
});
|
||||
#endif
|
||||
|
||||
RuntimeSettings runtimeSettings = new RuntimeSettings();
|
||||
Configuration.GetSection("RuntimeSettings").Bind(runtimeSettings);
|
||||
@@ -96,6 +114,7 @@ namespace Jackett.Server
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
#if NET461
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime applicationLifetime)
|
||||
{
|
||||
applicationLifetime.ApplicationStopping.Register(OnShutdown);
|
||||
@@ -134,6 +153,53 @@ namespace Jackett.Server
|
||||
|
||||
app.UseMvc();
|
||||
}
|
||||
#else
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime applicationLifetime)
|
||||
{
|
||||
applicationLifetime.ApplicationStopping.Register(OnShutdown);
|
||||
Helper.applicationLifetime = applicationLifetime;
|
||||
app.UseResponseCompression();
|
||||
|
||||
app.UseDeveloperExceptionPage();
|
||||
|
||||
app.UseCustomExceptionHandler();
|
||||
|
||||
string serverBasePath = Helper.ServerService.BasePath() ?? string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(serverBasePath))
|
||||
{
|
||||
app.UsePathBase(serverBasePath);
|
||||
}
|
||||
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
// When adjusting these pareamters make sure it's well tested with various environments
|
||||
// See https://github.com/Jackett/Jackett/issues/3517
|
||||
ForwardLimit = 10,
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost
|
||||
});
|
||||
|
||||
var rewriteOptions = new RewriteOptions()
|
||||
.AddRewrite(@"^torznab\/([\w-]*)", "api/v2.0/indexers/$1/results/torznab", skipRemainingRules: true) //legacy torznab route
|
||||
.AddRewrite(@"^potato\/([\w-]*)", "api/v2.0/indexers/$1/results/potato", skipRemainingRules: true) //legacy potato route
|
||||
.Add(RedirectRules.RedirectToDashboard);
|
||||
|
||||
app.UseRewriter(rewriteOptions);
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseAuthentication();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
private void OnShutdown()
|
||||
{
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.9.2" />
|
||||
<PackageReference Include="FluentAssertions" Version="5.6.0" />
|
||||
<PackageReference Include="Autofac" Version="4.9.4" />
|
||||
<PackageReference Include="FluentAssertions" Version="5.9.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Jackett.Test
|
||||
};
|
||||
|
||||
//https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider?view=netcore-2.0
|
||||
#if NETCOREAPP2_0
|
||||
#if !NET461
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
{
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser">
|
||||
<Version>2.5.0</Version>
|
||||
<Version>2.6.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461;netcoreapp2.2</TargetFrameworks>
|
||||
<TargetFrameworks>net461;netcoreapp3.0</TargetFrameworks>
|
||||
<ApplicationIcon>jackett.ico</ApplicationIcon>
|
||||
<AssemblyName>JackettUpdater</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
|
||||
Reference in New Issue
Block a user