mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-10 22:02:13 +02:00
Compare commits
77 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
43f0f03b05 | ||
![]() |
25c7d84f95 | ||
![]() |
37ccf7a7a9 | ||
![]() |
a2e92da5f6 | ||
![]() |
d1e57c25d6 | ||
![]() |
db2ba3ba0b | ||
![]() |
902961dc5a | ||
![]() |
689568d147 | ||
![]() |
1cd05963df | ||
![]() |
fbb3c1bdfc | ||
![]() |
de5b26032e | ||
![]() |
0761ad7aee | ||
![]() |
6cce59126b | ||
![]() |
347191ab6a | ||
![]() |
afac5ad1cf | ||
![]() |
fa10c625dd | ||
![]() |
c546fd7ac8 | ||
![]() |
fc96965e54 | ||
![]() |
feaf5d4361 | ||
![]() |
f146b3eaa6 | ||
![]() |
d07b6ae863 | ||
![]() |
a25f2016dc | ||
![]() |
a5f0e2b5db | ||
![]() |
6ac9555cb5 | ||
![]() |
e7d9360b51 | ||
![]() |
5a7091075e | ||
![]() |
2270b13435 | ||
![]() |
80a99ce69f | ||
![]() |
c54cbb4cbe | ||
![]() |
de55e6e14e | ||
![]() |
0983540493 | ||
![]() |
6cc262a6d3 | ||
![]() |
2484ff16f3 | ||
![]() |
4e1d7ac09b | ||
![]() |
b8aa2a16dd | ||
![]() |
cf7ca97f9c | ||
![]() |
cc01b0ca05 | ||
![]() |
a84b1dce4d | ||
![]() |
be54f1a532 | ||
![]() |
064786f379 | ||
![]() |
9d140b3ab4 | ||
![]() |
a65d855cc4 | ||
![]() |
2698ac2907 | ||
![]() |
28971c2303 | ||
![]() |
6428a7134b | ||
![]() |
b33f5764ef | ||
![]() |
ebb855bf45 | ||
![]() |
9e90edd397 | ||
![]() |
ee2743cdc9 | ||
![]() |
a9731b036c | ||
![]() |
58ed5421ec | ||
![]() |
dc25480844 | ||
![]() |
789d168648 | ||
![]() |
f6668c9777 | ||
![]() |
5903e6abdf | ||
![]() |
0de4c1da43 | ||
![]() |
53bd7ce0c4 | ||
![]() |
4d4c9fe645 | ||
![]() |
caf583a684 | ||
![]() |
b445072a4d | ||
![]() |
82617f961d | ||
![]() |
c28df96332 | ||
![]() |
88c6c4af6e | ||
![]() |
df49bb8578 | ||
![]() |
a968913bc4 | ||
![]() |
5c9880e410 | ||
![]() |
d7af20d4f6 | ||
![]() |
8dc832d64a | ||
![]() |
91b87ee7be | ||
![]() |
ee8fc6a78f | ||
![]() |
18f48cb04b | ||
![]() |
dd64739af6 | ||
![]() |
05c4d1e331 | ||
![]() |
f9ad475aa8 | ||
![]() |
ad17897edd | ||
![]() |
2356ef3837 | ||
![]() |
b63e97fecd |
43
README.md
43
README.md
@@ -17,7 +17,8 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
|
||||
#### Supported Systems
|
||||
* Windows using .NET 4.6.1 or above [Download here](https://www.microsoft.com/net/framework/versions/net461).
|
||||
* Linux and macOS using Mono 5.8 or above. [Download here](http://www.mono-project.com/download/).
|
||||
* Linux
|
||||
* macOS using Mono 5.8 or above. [Download here](http://www.mono-project.com/download/).
|
||||
|
||||
### Supported Public Trackers
|
||||
* 1337x
|
||||
@@ -39,7 +40,6 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Frozen Layer
|
||||
* GkTorrent
|
||||
* Horrible Subs
|
||||
* IdopeClone
|
||||
* Il Corsaro Nero <!-- maintained by bonny1992 -->
|
||||
* Il Corsaro Blu
|
||||
* Isohunt2
|
||||
@@ -68,7 +68,6 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* TNTVillage <!-- maintained by bonny1992 -->
|
||||
* Tokyo Tosho
|
||||
* Torlock
|
||||
* TorrentCouch
|
||||
* Torrent Downloads (TD)
|
||||
* TorrentFunk
|
||||
* TorrentGalaxy.org (TGx)
|
||||
@@ -175,6 +174,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* DataScene (DS)
|
||||
* DesiTorrents
|
||||
* Diablo Torrent
|
||||
* DigitalCore
|
||||
* DigitalHive
|
||||
* DivTeam
|
||||
* DocumentaryTorrents (DT)
|
||||
@@ -271,6 +271,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Psytorrents
|
||||
* PT99
|
||||
* PTFiles (PTF)
|
||||
* PThome
|
||||
* PuntoTorrent
|
||||
* PWTorrents (PWT)
|
||||
* Racing4Everyone (R4E)
|
||||
@@ -292,6 +293,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Secret Cinema
|
||||
* Shareisland
|
||||
* ShareSpaceDB
|
||||
* Sharingue
|
||||
* Shazbat
|
||||
* Shellife (SL)
|
||||
* SpaceTorrent
|
||||
@@ -332,6 +334,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Torrent-Syndikat
|
||||
* TOrrent-tuRK (TORK)
|
||||
* TorViet (HDVNBits)
|
||||
* TotallyKids (TK)
|
||||
* ToTheGlory
|
||||
* TranceTraffic
|
||||
* Trezzor
|
||||
@@ -389,7 +392,24 @@ When installed as a service the tray icon acts as a way to open/start/stop Jacke
|
||||
|
||||
Jackett can also be run from the command line if you would like to see log messages (Ensure the server isn't already running from the tray/service). This can be done by using "JackettConsole.exe" (for Command Prompt), found in the Jackett data folder: "%ProgramData%\Jackett".
|
||||
|
||||
## Installation on Linux
|
||||
### Install on Linux (AMDx64)
|
||||
1. Download and extract the latest `Jackett.Binaries.LinuxAMDx64.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett with the command `./jackett`
|
||||
2. (Optional) To install Jackett as a service, open the Terminal and run `sudo ./install_service_systemd.sh` You need root permissions to install the service. The service will start on each logon. You can always stop it by running `systemctl stop jackett.service` from Terminal. You can start it again it using `systemctl start jackett.service`. Logs are stored as usual under `~/.config/Jackett/log.txt` and also in `journalctl -u jackett.service`.
|
||||
|
||||
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x#linux-distribution-dependencies
|
||||
|
||||
If you want to run it with a user without a /home directory you need to add `Environment=XDG_CONFIG_HOME=/path/to/folder` to your systemd file, this folder will be used to store your config files.
|
||||
|
||||
### Install on Linux (ARMv7 or above)
|
||||
1. Download and extract the latest `Jackett.Binaries.LinuxARM32.tar.gz` or `Jackett.Binaries.LinuxARM64.tar.gz` (32 bit is the most common on ARM) release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett with the command `./jackett`
|
||||
2. (Optional) To install Jackett as a service, open the Terminal and run `sudo ./install_service_systemd.sh` You need root permissions to install the service. The service will start on each logon. You can always stop it by running `systemctl stop jackett.service` from Terminal. You can start it again it using `systemctl start jackett.service`. Logs are stored as usual under `~/.config/Jackett/log.txt` and also in `journalctl -u jackett.service`.
|
||||
|
||||
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x#linux-distribution-dependencies
|
||||
|
||||
If you want to run it with a user without a /home directory you need to add `Environment=XDG_CONFIG_HOME=/path/to/folder` to your systemd file, this folder will be used to store your config files.
|
||||
|
||||
|
||||
### Installation on Linux (ARMv6 or below)
|
||||
1. Install [Mono 5.8](http://www.mono-project.com/download/#download-lin) or better (using the latest stable release is recommended)
|
||||
* Follow the instructions on the mono website and install the `mono-devel` and the `ca-certificates-mono` packages.
|
||||
* On Red Hat/CentOS/openSUSE/Fedora the `mono-locale-extras` package is also required.
|
||||
@@ -398,21 +418,12 @@ Jackett can also be run from the command line if you would like to see log messa
|
||||
* Redhat/Fedora: `yum install libcurl-devel`
|
||||
* For other distros see the [Curl docs](http://curl.haxx.se/dlwiz/?type=devel).
|
||||
3. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono --debug JackettConsole.exe`.
|
||||
|
||||
Detailed instructions for [Ubuntu 14.x](http://www.htpcguides.com/install-jackett-on-ubuntu-14-x-for-custom-torrents-in-sonarr/) and [Ubuntu 15.x](http://www.htpcguides.com/install-jackett-ubuntu-15-x-for-custom-torrents-in-sonarr/)
|
||||
4. (Optional) To install Jackett as a service, open the Terminal and run `sudo ./install_service_systemd_mono.sh` You need root permissions to install the service. The service will start on each logon. You can always stop it by running `systemctl stop jackett.service` from Terminal. You can start it again it using `systemctl start jackett.service`. Logs are stored as usual under `~/.config/Jackett/log.txt` and also in `journalctl -u jackett.service`.
|
||||
|
||||
If you want to run it with a user without a /home directory you need to add `Environment=XDG_CONFIG_HOME=/path/to/folder` to your systemd file, this folder will be used to store your config files.
|
||||
|
||||
Mono must be compiled with the Roslyn compiler (default), using MCS will cause "An error has occurred." errors (See https://github.com/Jackett/Jackett/issues/2704).
|
||||
|
||||
### Install as service
|
||||
1. Install Jackett with the steps from above.
|
||||
2. Open the Terminal and run `sudo ./install_service_systemd.sh` You need root permissions to install the service.
|
||||
2. If the installation was a success, you can close the Terminal window.
|
||||
|
||||
The service will start on each logon. You can always stop it by running `systemctl stop jackett.service` from Terminal. You can start it again it using `systemctl start jackett.service`.
|
||||
Logs are stored as usual under `~/.config/Jackett/log.txt` and also in `journalctl -u jackett.service`.
|
||||
|
||||
### Installation on Linux via Ansible
|
||||
|
||||
On a RHEL/Centos 7 system: [linuxhq.jackett](https://galaxy.ansible.com/linuxhq/jackett)
|
||||
@@ -487,7 +498,7 @@ location /jackett {
|
||||
The logfiles (log.txt/updater.txt) are stored in `%ProgramData%\Jackett` on Windows and `~/.config/Jackett/` on Linux/macOS.
|
||||
|
||||
## Configuring OMDb
|
||||
This feature is used as a fallback to get the movie/series title if only the IMDB ID is provided in the request.
|
||||
This feature is used as a fallback (when using the aggregate Indexer) to get the movie/series title if only the IMDB ID is provided in the request.
|
||||
To use it, please just request a free API key on [OMDb](http://www.omdbapi.com/apikey.aspx) (1,000 daily requests limit) and paste the key in Jackett
|
||||
|
||||
## Creating an issue
|
||||
@@ -514,6 +525,8 @@ All contributions are welcome just send a pull request.
|
||||
|
||||
### Windows
|
||||
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
|
||||
* Clone Jackett
|
||||
* From the `src` directory, run `dotnet restore`
|
||||
* Open the Jackett solution in Visual Studio 2017 (version 15.9 or above)
|
||||
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
|
||||
* Select Jackett.Server as startup project
|
||||
|
@@ -1,8 +1,8 @@
|
||||
version: 0.10.{build}
|
||||
version: 0.11.{build}
|
||||
skip_tags: true
|
||||
image:
|
||||
- Visual Studio 2017
|
||||
image:
|
||||
- Ubuntu
|
||||
- Visual Studio 2017
|
||||
environment:
|
||||
APPVEYOR_YML_DISABLE_PS_LINUX: true
|
||||
configuration: Release
|
||||
@@ -28,12 +28,13 @@ before_deploy:
|
||||
- ps: ${env:release_description} = ( Get-Content -LiteralPath BuildOutput/ReleaseNotes.txt -Encoding UTF8 ) -join "`n";
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
tag: v$(appveyor_build_version)
|
||||
tag: v$(APPVEYOR_BUILD_VERSION)
|
||||
description: $(release_description)
|
||||
auth_token:
|
||||
secure: hOg+16YTIbq4kO9u4D1YVOTbWDqgCX6mAQYMbnmBBSw2CiUsZh7OKbupoUb3FtWa
|
||||
artifact: /^(?:(?![Ee]xperimental).)*$/
|
||||
draft: true
|
||||
force_update: true
|
||||
on:
|
||||
branch: master
|
||||
notifications:
|
||||
|
70
build.cake
70
build.cake
@@ -14,9 +14,11 @@ var configuration = Argument("configuration", "Debug");
|
||||
|
||||
// Define directories.
|
||||
var workingDir = MakeAbsolute(Directory("./"));
|
||||
var artifactsDirName = "Artifacts";
|
||||
var testResultsDirName = "TestResults";
|
||||
var netCoreFramework = "netcoreapp2.2";
|
||||
string artifactsDirName = "Artifacts";
|
||||
string testResultsDirName = "TestResults";
|
||||
string netCoreFramework = "netcoreapp2.2";
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string updaterProjectPath = "./src/Jackett.Updater/Jackett.Updater.csproj";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASKS
|
||||
@@ -89,7 +91,6 @@ Task("Package-Windows-Full-Framework")
|
||||
.IsDependentOn("Run-Unit-Tests")
|
||||
.Does(() =>
|
||||
{
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = "./BuildOutput/net461/win7-x86/Jackett";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "net461", "win7-x86", buildOutputPath);
|
||||
@@ -119,7 +120,6 @@ Task("Package-Mono-Full-Framework")
|
||||
.IsDependentOn("Run-Unit-Tests")
|
||||
.Does(() =>
|
||||
{
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = "./BuildOutput/net461/linux-x64/Jackett";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "net461", "linux-x64", buildOutputPath);
|
||||
@@ -127,7 +127,7 @@ Task("Package-Mono-Full-Framework")
|
||||
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath); //builds against multiple frameworks
|
||||
|
||||
CopyFileToDirectory("./install_service_macos", buildOutputPath);
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
CopyFileToDirectory("./install_service_systemd_mono.sh", buildOutputPath);
|
||||
CopyFileToDirectory("./Upstart.config", buildOutputPath);
|
||||
|
||||
//There is an issue with Mono 5.8 (fixed in Mono 5.12) where its expecting to use its own patched version of System.Net.Http.dll, instead of the version supplied in folder
|
||||
@@ -154,30 +154,37 @@ Task("Package-DotNetCore-macOS")
|
||||
.Does(() =>
|
||||
{
|
||||
string runtimeId = "osx-x64";
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
|
||||
string updaterOutputPath = buildOutputPath + "/Updater";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
|
||||
|
||||
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
|
||||
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
|
||||
DeleteDirectory(updaterOutputPath, new DeleteDirectorySettings {Recursive = true, Force = true});
|
||||
|
||||
CopyFileToDirectory("./install_service_macos", buildOutputPath);
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Experimental.Jackett.Binaries.macOS.tar.gz");
|
||||
});
|
||||
|
||||
Task("Package-DotNetCore-LinuxAMD64")
|
||||
Task("Package-DotNetCore-LinuxAMDx64")
|
||||
.IsDependentOn("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
string runtimeId = "linux-x64";
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
|
||||
string updaterOutputPath = buildOutputPath + "/Updater";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
|
||||
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
CopyFileToDirectory("./Upstart.config", buildOutputPath);
|
||||
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
|
||||
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
|
||||
DeleteDirectory(updaterOutputPath, new DeleteDirectorySettings {Recursive = true, Force = true});
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Experimental.Jackett.Binaries.LinuxAMD64.tar.gz");
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxAMDx64.tar.gz");
|
||||
});
|
||||
|
||||
Task("Package-DotNetCore-LinuxARM32")
|
||||
@@ -185,15 +192,18 @@ Task("Package-DotNetCore-LinuxARM32")
|
||||
.Does(() =>
|
||||
{
|
||||
string runtimeId = "linux-arm";
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
|
||||
string updaterOutputPath = buildOutputPath + "/Updater";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
|
||||
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
CopyFileToDirectory("./Upstart.config", buildOutputPath);
|
||||
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
|
||||
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
|
||||
DeleteDirectory(updaterOutputPath, new DeleteDirectorySettings {Recursive = true, Force = true});
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Experimental.Jackett.Binaries.LinuxARM32.tar.gz");
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxARM32.tar.gz");
|
||||
});
|
||||
|
||||
Task("Package-DotNetCore-LinuxARM64")
|
||||
@@ -201,22 +211,25 @@ Task("Package-DotNetCore-LinuxARM64")
|
||||
.Does(() =>
|
||||
{
|
||||
string runtimeId = "linux-arm64";
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
|
||||
string updaterOutputPath = buildOutputPath + "/Updater";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
|
||||
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
CopyFileToDirectory("./Upstart.config", buildOutputPath);
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Experimental.Jackett.Binaries.LinuxARM64.tar.gz");
|
||||
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
|
||||
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
|
||||
DeleteDirectory(updaterOutputPath, new DeleteDirectorySettings {Recursive = true, Force = true});
|
||||
|
||||
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
|
||||
|
||||
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxARM64.tar.gz");
|
||||
});
|
||||
|
||||
Task("Appveyor-Push-Artifacts")
|
||||
.IsDependentOn("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
if (AppVeyor.IsRunningOnAppVeyor && IsRunningOnWindows())
|
||||
if (AppVeyor.IsRunningOnAppVeyor)
|
||||
{
|
||||
foreach (var file in GetFiles(workingDir + $"/{artifactsDirName}/*"))
|
||||
{
|
||||
@@ -280,10 +293,10 @@ Task("Release-Notes")
|
||||
Task("Windows-Environment")
|
||||
.IsDependentOn("Package-Windows-Full-Framework")
|
||||
.IsDependentOn("Package-Mono-Full-Framework")
|
||||
.IsDependentOn("Package-DotNetCore-macOS")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxAMD64")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxARM32")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxARM64")
|
||||
//.IsDependentOn("Package-DotNetCore-macOS")
|
||||
//.IsDependentOn("Package-DotNetCore-LinuxAMDx64")
|
||||
//.IsDependentOn("Package-DotNetCore-LinuxARM32")
|
||||
//.IsDependentOn("Package-DotNetCore-LinuxARM64")
|
||||
.IsDependentOn("Appveyor-Push-Artifacts")
|
||||
.IsDependentOn("Release-Notes")
|
||||
.Does(() =>
|
||||
@@ -293,7 +306,7 @@ Task("Windows-Environment")
|
||||
|
||||
Task("Linux-Environment")
|
||||
.IsDependentOn("Package-DotNetCore-macOS")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxAMD64")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxAMDx64")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxARM32")
|
||||
.IsDependentOn("Package-DotNetCore-LinuxARM64")
|
||||
.IsDependentOn("Appveyor-Push-Artifacts")
|
||||
@@ -380,7 +393,8 @@ private void Gzip(string sourceFolder, string outputDirectory, string tarCdirect
|
||||
{
|
||||
RunLinuxCommand("find", MakeAbsolute(Directory(sourceFolder)) + @" -type d -exec chmod 755 {} \;");
|
||||
RunLinuxCommand("find", MakeAbsolute(Directory(sourceFolder)) + @" -type f -exec chmod 644 {} \;");
|
||||
//RunLinuxCommand("chmod", $"755 {MakeAbsolute(Directory(sourceFolder))} /Jackett/jackett");
|
||||
RunLinuxCommand("chmod", $"755 {MakeAbsolute(Directory(sourceFolder))}/Jackett/jackett");
|
||||
RunLinuxCommand("chmod", $"755 {MakeAbsolute(Directory(sourceFolder))}/Jackett/JackettUpdater");
|
||||
RunLinuxCommand("tar", $"-C {sourceFolder} -zcvf {outputDirectory}/{tarFileName}.gz {tarCdirectoryOption}");
|
||||
}
|
||||
}
|
||||
|
12
install_service_systemd.sh
Executable file → Normal file
12
install_service_systemd.sh
Executable file → Normal file
@@ -13,23 +13,19 @@ systemctl stop ${jackettservice}
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Check if we're running from Jackett's directory
|
||||
if [ ! -f ./JackettConsole.exe ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Couldn't locate JackettConsole.exe. Is the script in the right directory?"
|
||||
if [ ! -f ./jackett ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Couldn't locate jackett. Is the script in the right directory?"
|
||||
exit 1
|
||||
fi
|
||||
jackettdir="$(pwd)"
|
||||
|
||||
# Check if Jackett's owner is root
|
||||
jackettuser="$(stat -c "%U" ./JackettConsole.exe)"
|
||||
jackettuser="$(stat -c "%U" ./jackett)"
|
||||
if [ "${jackettuser}" == "root" ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett shouldn't run as root. Please, change the owner of the Jackett directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if mono is installed
|
||||
command -v mono >/dev/null 2>&1 || { echo >&2 "${BOLDRED}ERROR${NC}: Jackett requires Mono but it's not installed. Aborting."; exit 1; }
|
||||
monodir="$(dirname $(command -v mono))"
|
||||
|
||||
# Check that no other service called Jackett is already running
|
||||
if [[ $(systemctl status ${jackettservice} | grep "active (running)") ]]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett already seems to be running as a service. Please stop it before running this script again."
|
||||
@@ -50,7 +46,7 @@ Type=simple
|
||||
User=${jackettuser}
|
||||
Group=${jackettuser}
|
||||
WorkingDirectory=${jackettdir}
|
||||
ExecStart=${monodir}/mono --debug ${jackettdir}/JackettConsole.exe --NoRestart
|
||||
ExecStart=${jackettdir}/jackett --NoRestart
|
||||
TimeoutStopSec=20
|
||||
|
||||
[Install]
|
||||
|
82
install_service_systemd_mono.sh
Normal file
82
install_service_systemd_mono.sh
Normal file
@@ -0,0 +1,82 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Setting up colors
|
||||
BOLDRED="$(printf '\033[1;31m')"
|
||||
BOLDGREEN="$(printf '\033[1;32m')"
|
||||
NC="$(printf '\033[0m')" # No Color
|
||||
|
||||
# Stop and unload the service if it's running
|
||||
jackettservice="jackett.service"
|
||||
systemctl stop ${jackettservice}
|
||||
|
||||
# Move working directory to Jackett's
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Check if we're running from Jackett's directory
|
||||
if [ ! -f ./JackettConsole.exe ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Couldn't locate JackettConsole.exe. Is the script in the right directory?"
|
||||
exit 1
|
||||
fi
|
||||
jackettdir="$(pwd)"
|
||||
|
||||
# Check if Jackett's owner is root
|
||||
jackettuser="$(stat -c "%U" ./JackettConsole.exe)"
|
||||
if [ "${jackettuser}" == "root" ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett shouldn't run as root. Please, change the owner of the Jackett directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if mono is installed
|
||||
command -v mono >/dev/null 2>&1 || { echo >&2 "${BOLDRED}ERROR${NC}: Jackett requires Mono but it's not installed. Aborting."; exit 1; }
|
||||
monodir="$(dirname $(command -v mono))"
|
||||
|
||||
# Check that no other service called Jackett is already running
|
||||
if [[ $(systemctl status ${jackettservice} | grep "active (running)") ]]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett already seems to be running as a service. Please stop it before running this script again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Write the systemd service descriptor
|
||||
cat >"/etc/systemd/system/${jackettservice}" <<EOL
|
||||
[Unit]
|
||||
Description=Jackett Daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
SyslogIdentifier=jackett
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Type=simple
|
||||
User=${jackettuser}
|
||||
Group=${jackettuser}
|
||||
WorkingDirectory=${jackettdir}
|
||||
ExecStart=${monodir}/mono --debug ${jackettdir}/JackettConsole.exe --NoRestart
|
||||
TimeoutStopSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
EOL
|
||||
|
||||
# Reload systemd daemon
|
||||
systemctl daemon-reload
|
||||
|
||||
# Enable the service for following restarts
|
||||
systemctl enable ${jackettservice}
|
||||
|
||||
# Run the service
|
||||
systemctl start ${jackettservice}
|
||||
|
||||
# Check that it's running
|
||||
if [[ $(systemctl status ${jackettservice} | grep "active (running)") ]]; then
|
||||
echo "${BOLDGREEN}Agent successfully installed and launched!${NC}"
|
||||
else
|
||||
cat << EOL
|
||||
${BOLDRED}ERROR${NC}: Could not launch service. The installation might have failed.
|
||||
Please open an issue on https://github.com/Jackett/Jackett/issues and paste following information:
|
||||
Mono directory: \`${monodir}\`
|
||||
Jackett directory: \`${jackettdir}\`
|
||||
Jackett user: \`${jackettuser}\`
|
||||
|
||||
EOL
|
||||
fi
|
@@ -48,11 +48,11 @@
|
||||
selector: table > tbody > tr
|
||||
fields:
|
||||
category:
|
||||
selector: a[href*="/categories/"]
|
||||
selector: a[href*="/category/"]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "/categories/.*?\\.(\\d+)"
|
||||
args: "/category/.*?\\.(\\d+)"
|
||||
title:
|
||||
selector: a.view-torrent
|
||||
download:
|
||||
|
@@ -14,7 +14,9 @@
|
||||
- {id: 2, cat: TV/HD, desc: "TV-Shows"}
|
||||
|
||||
modes:
|
||||
searchstr: [q]
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: cookie
|
||||
|
@@ -49,7 +49,7 @@
|
||||
sent: "yes"
|
||||
returnto: "/"
|
||||
error:
|
||||
- selector: table:contains("Login failed!")
|
||||
- selector: div.error
|
||||
test:
|
||||
path: index.php
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
- path: browse.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
search: "{{if .Keywords}}{{ .Keywords }}{{else}} {{end}}"
|
||||
rows:
|
||||
selector: table#torrent_table > tbody > tr:has(a[href^="browse.php?cat="])
|
||||
fields:
|
||||
|
@@ -5,8 +5,9 @@
|
||||
language: en-us
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- http://cnbtkitty.ws/
|
||||
- http://btkitty.pet/
|
||||
legacylinks:
|
||||
- https://cnbtkitty.org/
|
||||
- http://cnbtkitty.org/
|
||||
@@ -14,6 +15,7 @@
|
||||
- http://cnbtkitty.com/
|
||||
- https://cnbtkitty.me/
|
||||
- http://cnbtkitty.me/
|
||||
- http://cnbtkitty.ws/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
|
@@ -34,7 +34,7 @@
|
||||
- path: torrents-search.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
search: "{{if .Keywords}}\"{{.Keywords}}\"{{else}}{{end}}"
|
||||
rows:
|
||||
selector: table > tbody > tr:has(a[href^="torrents.php?cat="])
|
||||
fields:
|
||||
|
@@ -27,9 +27,9 @@
|
||||
search:
|
||||
# site returns just 30 results, attempt to fetch upto 90
|
||||
paths:
|
||||
- path: index.php
|
||||
- path: index.php/page/2/
|
||||
- path: index.php/page/3/
|
||||
- path: /
|
||||
- path: /page/2/
|
||||
- path: /page/3/
|
||||
keywordsfilters:
|
||||
# most ES/ITA TV torrents are in XXxYY format, so we search without S/E prefixes and filter later
|
||||
- name: re_replace
|
||||
|
@@ -7,7 +7,7 @@
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- https://www.gktorrent.cx/
|
||||
- https://www.gktorrent.tv/
|
||||
legacylinks:
|
||||
- https://www.gktorrent.com/
|
||||
- http://www.gktorrent.com/
|
||||
@@ -24,7 +24,7 @@
|
||||
- https://www.gktorrent.me/
|
||||
- https://www.rantop.org/
|
||||
- https://www.gktorrent.net/
|
||||
- https://www.gktorrent.tv/
|
||||
- https://www.gktorrent.cx/
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: movies, cat: Movies, desc: "Movies"}
|
||||
|
@@ -26,7 +26,7 @@
|
||||
- {id: 26, cat: PC/Games, desc: "Games/PC"}
|
||||
- {id: 38, cat: PC/Phone-Other, desc: "Mobile"}
|
||||
- {id: 59, cat: Movies/3D, desc: "Movies/3D"}
|
||||
- {id: 92, cat: Movies/HD, desc: "Movies/4K-UHD"}
|
||||
- {id: 92, cat: Movies/UHD, desc: "Movies/4K-UHD"}
|
||||
- {id: 32, cat: Movies/BluRay, desc: "Movies/Blu-Ray"}
|
||||
- {id: 28, cat: Movies/DVD, desc: "Movies/DVD"}
|
||||
- {id: 42, cat: Movies/HD, desc: "Movies/HD-x264"}
|
||||
@@ -79,7 +79,7 @@
|
||||
incldead: 1
|
||||
search_by: "{{ if .Query.IMDBID }}imdb{{else}}name{{end}}"
|
||||
rows:
|
||||
selector: table.torrenttable > tbody > tr:has(a[title][href^="details.php?id="])
|
||||
selector: table.table-striped > tbody > tr:has(a[title][href^="details.php?id="])
|
||||
fields:
|
||||
title:
|
||||
selector: a[title][href^="details.php?id="]
|
||||
@@ -93,13 +93,10 @@
|
||||
filters:
|
||||
- name: querystring
|
||||
args: cat
|
||||
imdb:
|
||||
selector: a[title="IMDB"]
|
||||
attribute: href
|
||||
banner:
|
||||
attribute: rel
|
||||
imdb:
|
||||
selector: a[href^="http://www.imdb.com/title/"]
|
||||
selector: a[href*="https://www.imdb.com/title/"]
|
||||
optional: true
|
||||
attribute: href
|
||||
download:
|
||||
@@ -114,13 +111,10 @@
|
||||
selector: td:has(a[href$="filelist=1#filelist"])
|
||||
remove: a
|
||||
date:
|
||||
selector: td > span:has(i.fa-clock)
|
||||
remove: b
|
||||
selector: td > small:has(i.fa-clock)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["\xA0", " "]
|
||||
- name: replace
|
||||
args: ["Added on ", ""]
|
||||
- name: replace
|
||||
args: ["st ", " "]
|
||||
- name: replace
|
||||
@@ -129,8 +123,8 @@
|
||||
args: ["rd ", " "]
|
||||
- name: replace
|
||||
args: ["th ", " "]
|
||||
- name: replace
|
||||
args: [" by", ""]
|
||||
- name: regexp
|
||||
args: "(.+?) by"
|
||||
- name: append
|
||||
args: " +02:00"
|
||||
- name: dateparse
|
||||
@@ -145,6 +139,3 @@
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": "1"
|
||||
description:
|
||||
selector: td:has(a[title][href^="details.php?id="])
|
||||
remove: a[title][href^="details.php?id="], div, font:contains("Added on")
|
||||
|
@@ -1,92 +0,0 @@
|
||||
---
|
||||
site: idopeclone
|
||||
name: IdopeClone
|
||||
description: "This Clone of iDope is a Public torrent search engine"
|
||||
language: en-us
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.idope.site/
|
||||
legacylinks:
|
||||
- https://idope.top/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: other, cat: Other, desc: "Others"}
|
||||
- {id: movies, cat: Movies, desc: "Movies"}
|
||||
- {id: videos, cat: Other, desc: "Videos"}
|
||||
- {id: tv, cat: TV, desc: "TV"}
|
||||
- {id: anime, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: xxx, cat: XXX, desc: "XXX"}
|
||||
- {id: adult, cat: XXX, desc: "XXX"}
|
||||
- {id: music, cat: Audio, desc: "Music"}
|
||||
- {id: games, cat: PC/Games, desc: "Games"}
|
||||
- {id: apps, cat: PC/0day, desc: "Apps"}
|
||||
- {id: applications, cat: PC/0day, desc: "Apps"}
|
||||
- {id: android, cat: PC/Phone-Android, desc: "Android"}
|
||||
- {id: software, cat: PC/0day, desc: "Apps"}
|
||||
- {id: books, cat: Books, desc: "Books"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings: []
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: "{{if .Keywords}}search/{{ .Keywords}}/{{else}}recent/{{end}}"
|
||||
- path: "{{if .Keywords}}s/{{ .Keywords}}/page/2{{else}}recent/2{{end}}"
|
||||
- path: "{{if .Keywords}}s/{{ .Keywords}}/page/3{{else}}recent/3{{end}}"
|
||||
- path: "{{if .Keywords}}s/{{ .Keywords}}/page/4{{else}}recent/4{{end}}"
|
||||
- path: "{{if .Keywords}}s/{{ .Keywords}}/page/5{{else}}recent/5{{end}}"
|
||||
rows:
|
||||
selector: li:has(div.opt-text-w3layouts)
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
title:
|
||||
selector: div.opt-text-w3layouts a
|
||||
details:
|
||||
selector: div.opt-text-w3layouts a
|
||||
attribute: href
|
||||
category:
|
||||
optional: true
|
||||
selector: a[href^="/browse/"]
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["/browse/", ""]
|
||||
magnet:
|
||||
selector: a[href^="magnet:?"]
|
||||
attribute: href
|
||||
date:
|
||||
selector: div.seedbar span:nth-child(4)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Age: ", ""]
|
||||
- name: timeago
|
||||
files:
|
||||
selector: div.seedbar span:nth-child(5)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Files: ", ""]
|
||||
size:
|
||||
selector: div.seedbar span:nth-child(3)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Size: ", ""]
|
||||
seeders:
|
||||
selector: div.seedbar span:nth-child(1)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Seed: ", ""]
|
||||
leechers:
|
||||
selector: div.seedbar span:nth-child(2)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Leech: ", ""]
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
@@ -6,8 +6,9 @@
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://ilcorsaronero.vip/
|
||||
- https://ilcorsaronero.live/
|
||||
legacylinks:
|
||||
- https://ilcorsaronero.vip/
|
||||
- https://ilcorsaronero.info/
|
||||
- https://ilcorsaronero.ch/
|
||||
- https://ilcorsaronero.cc/
|
||||
|
@@ -12,6 +12,7 @@
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://nyaa.pantsu.cat/
|
||||
- https://nyaa.pt/
|
||||
|
||||
settings:
|
||||
- name: cat-id
|
||||
|
123
src/Jackett.Common/Definitions/pthome.yml
Normal file
123
src/Jackett.Common/Definitions/pthome.yml
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
site: pthome
|
||||
name: PThome
|
||||
description: "PThome is a CHINESE Private Torrent Tracker for 0DAY / GENERAL"
|
||||
language: zh-CN
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- https://www.pthome.net/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 401, cat: Movies, desc: "Movies(电影)"}
|
||||
- {id: 404, cat: TV/Documentary, desc: "Documentaries(记录片)"}
|
||||
- {id: 405, cat: TV/Anime, desc: "Animations(动漫)"}
|
||||
- {id: 402, cat: TV, desc: "TV Series(电视剧)"}
|
||||
- {id: 403, cat: TV/OTHER, desc: "TV Shows(综艺)"}
|
||||
- {id: 406, cat: Audio/Video, desc: "Music Videos(MV)"}
|
||||
- {id: 407, cat: TV/Sport, desc: "Sports(体育)"}
|
||||
- {id: 408, cat: Audio/Lossless, desc: "HQ Audio(音乐)"}
|
||||
- {id: 410, cat: Console, desc: "Games(游戏)"}
|
||||
- {id: 411, cat: PC, desc: "Software(软件)"}
|
||||
- {id: 412, cat: Books, desc: "Study(学习)"}
|
||||
- {id: 409, cat: Other, desc: "Misc(其他)"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
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
|
||||
inputs:
|
||||
cookie: "{{ .Config.cookie }}"
|
||||
test:
|
||||
path: index.php
|
||||
|
||||
ratio:
|
||||
path: index.php
|
||||
selector: table tr td.bottom
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["分享率:","Ratio:"] # for simplified chinese language setting
|
||||
- name: regexp
|
||||
args: "Ratio:\\s(.*?)\\s\\s"
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: torrents.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}cat{{.}}=1&{{end}}"
|
||||
incldead: "0"
|
||||
spstate: "0"
|
||||
inclbookmarked: "0"
|
||||
search: "{{if .Query.IMDBID}}{{.Query.IMDBID}}{{else}}{{.Keywords}}{{end}}"
|
||||
search_area: "{{if .Query.IMDBID}}4{{else}}0{{end}}"
|
||||
search_mode: "0"
|
||||
|
||||
rows:
|
||||
selector: table.torrents tr:has(a[href^="?cat="])
|
||||
filters:
|
||||
- name: andmatch
|
||||
|
||||
fields:
|
||||
title:
|
||||
selector: td.torrents-box a
|
||||
attribute: title
|
||||
category:
|
||||
selector: a[href^="?cat="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: cat
|
||||
details:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["details.php", "download.php"]
|
||||
imdb:
|
||||
selector: a[href^="http://www.imdb.com/title/tt"]
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(5)
|
||||
grabs:
|
||||
selector: td:nth-child(8)
|
||||
seeders:
|
||||
selector: td:nth-child(6)
|
||||
leechers:
|
||||
selector: td:nth-child(7)
|
||||
date:
|
||||
selector: td:nth-child(4) span
|
||||
attribute: title
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "2006-01-02 15:04:05"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img.pro_free: "0"
|
||||
img.pro_free2up: "0"
|
||||
img.pro_50pctdown: "0.5"
|
||||
img.pro_50pctdown2up: "0.5"
|
||||
img.pro_30pctdown: "0.3"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
img.pro_50pctdown2up: "2"
|
||||
img.pro_free2up: "2"
|
||||
img.pro_2up: "2"
|
||||
"*": "1"
|
@@ -1,40 +1,54 @@
|
||||
---
|
||||
site: scenerush
|
||||
name: SceneRush
|
||||
description: "SceneRush is a Portuguese general tracker."
|
||||
description: "SceneRush is a PORTUGUESE Private Torrent Tracker for 0DAY / GENERAL"
|
||||
language: pt-PT
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.scene-rush.pt/
|
||||
legacylinks:
|
||||
- http://www.scene-rush.pt/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: PC, desc: "Apps"}
|
||||
- {id: 2, cat: Movies, desc: "XVID"}
|
||||
- {id: 3, cat: Movies/DVD, desc: "DVD"}
|
||||
- {id: 4, cat: TV, desc: "TV XVID"}
|
||||
- {id: 5, cat: PC/Games, desc: "PC Games"}
|
||||
- {id: 6, cat: Movies/HD, desc: "HD"}
|
||||
- {id: 7, cat: XXX, desc: "XXX"}
|
||||
- {id: 8, cat: TV/Anime, desc: "ANIME"}
|
||||
- {id: 8, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 9, cat: Audio, desc: "Audio"}
|
||||
- {id: 10, cat: Other, desc: "Other"}
|
||||
- {id: 11, cat: Console/Xbox 360, desc: "XBOX 360"}
|
||||
- {id: 12, cat: Console/PSP, desc: "PSP"}
|
||||
- {id: 13, cat: TV/Documentary, desc: "DOC"}
|
||||
- {id: 17, cat: TV/HD, desc: "TV-X264"}
|
||||
- {id: 13, cat: TV/Documentary, desc: "Doc"}
|
||||
- {id: 14, cat: Movies/DVD, desc: "Movies DVD"}
|
||||
- {id: 15, cat: Console, desc: "PS2"}
|
||||
- {id: 16, cat: TV/Sport, desc: "TV WWE"}
|
||||
- {id: 17, cat: TV/HD, desc: "TV X264"}
|
||||
- {id: 18, cat: TV, desc: "TV DVD"}
|
||||
- {id: 19, cat: XXX/DVD, desc: "XXX DVD"}
|
||||
- {id: 20, cat: Movies/DVD, desc: "A.DVD"}
|
||||
- {id: 21, cat: PC/Mac, desc: "MAC"}
|
||||
- {id: 20, cat: TV/Anime, desc: "Anime DVD"}
|
||||
- {id: 21, cat: PC/Mac, desc: "Mac"}
|
||||
- {id: 23, cat: Movies, desc: "Boxset"}
|
||||
- {id: 31, cat: Other, desc: "OFF"}
|
||||
- {id: 32, cat: Movies/BluRay, desc: "BluRay"}
|
||||
- {id: 33, cat: Console/Wii, desc: "WII"}
|
||||
- {id: 34, cat: Console/PS3, desc: "PS3"}
|
||||
- {id: 35, cat: Movies/HD, desc: "A.HD"}
|
||||
- {id: 35, cat: TV/Anime, desc: "Anime HD"}
|
||||
- {id: 36, cat: PC/Phone-Android, desc: "Android"}
|
||||
- {id: 37, cat: Movies/DVD, desc: "C.DVDR"}
|
||||
- {id: 37, cat: Movies/DVD, desc: "Custom DVDR"}
|
||||
- {id: 38, cat: Movies/Other, desc: "CAM TS"}
|
||||
- {id: 39, cat: Other, desc: "GPS"}
|
||||
- {id: 40, cat: Console/PS4, desc: "PS4"}
|
||||
- {id: 41, cat: Movies/SD, desc: "BDRIP"}
|
||||
- {id: 41, cat: Movies/BluRay, desc: "BDRIP"}
|
||||
- {id: 42, cat: Movies/WEBDL, desc: "WEB DL"}
|
||||
- {id: 43, cat: Books, desc: "EBOOK"}
|
||||
- {id: 44, cat: TV/Sport, desc: "SPORTS"}
|
||||
- {id: 43, cat: Books, desc: "Ebook"}
|
||||
- {id: 44, cat: TV/Sport, desc: "Sports"}
|
||||
- {id: 46, cat: Movies/UHD, desc: "4K"}
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q]
|
||||
@@ -45,18 +59,23 @@
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: td.embedded:has(h2:contains("failed")+table)
|
||||
- selector: h2:contains("Falhou")
|
||||
message:
|
||||
selector: table tr td.text
|
||||
test:
|
||||
path: browse.php
|
||||
path: index.php
|
||||
selector: a[href="logout.php"]
|
||||
|
||||
ratio:
|
||||
path: browse.php
|
||||
selector: td[width='60'][style=['text-align:center;'] > span > font
|
||||
selector: td.text:contains("Ratio")
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Ratio actual ›(.*?) ]"
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: browse.php
|
||||
method: post
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
@@ -93,7 +112,7 @@
|
||||
- name: re_replace
|
||||
args: ["(\\d{4}-\\d{2}-\\d{2})(\\d{2}:\\d{2}:\\d{2})","$1 $2"]
|
||||
- name: dateparse
|
||||
args: "2018-12-30 22:30:31"
|
||||
args: "2006-01-02 15:04:05"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"i.fg-gold": "0"
|
||||
|
124
src/Jackett.Common/Definitions/sharingue.yml
Normal file
124
src/Jackett.Common/Definitions/sharingue.yml
Normal file
@@ -0,0 +1,124 @@
|
||||
---
|
||||
site: sharingue
|
||||
name: Sharingue
|
||||
description: "Sharingue is a BRAZILIAN Private Tracker for TV / MOVIES / ANIME / MUSIC"
|
||||
language: pt-br
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.sharingue.live/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Movies (Filmes)"}
|
||||
- {id: 3, cat: Audio, desc: "Music (Músicas)"}
|
||||
- {id: 4, cat: TV, desc: "TV (Séries)"}
|
||||
- {id: 5, cat: TV/Anime, desc: "Anime (Animes)"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
login:
|
||||
path: login
|
||||
method: form
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
remember: 1
|
||||
selectorinputs:
|
||||
_token:
|
||||
selector: meta[name="csrf-token"]
|
||||
attribute: content
|
||||
error:
|
||||
- selector: form[action$="/login"] .text-red
|
||||
test:
|
||||
path: /
|
||||
selector: a[href$="/logout"]
|
||||
|
||||
ratio:
|
||||
path: /
|
||||
selector: span:has(i.fa-sync-alt)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Ratio : (\\d+)"
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: filterTorrents
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}categories[]={{.}}&{{end}}"
|
||||
search: "{{if .Query.IMDBID}}{{else}}{{ .Keywords }}{{end}}"
|
||||
uploader: ""
|
||||
imdb: "{{ .Query.IMDBIDShort }}"
|
||||
tvdb: ""
|
||||
tmdb: ""
|
||||
mal: ""
|
||||
sort: created_at
|
||||
direction: desc
|
||||
qty: 100
|
||||
rows:
|
||||
selector: table > tbody > tr
|
||||
fields:
|
||||
category:
|
||||
selector: a[href*="/categories/"]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "/categories/.*?\\.(\\d+)"
|
||||
title:
|
||||
selector: a.view-torrent
|
||||
download:
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
details:
|
||||
selector: a.view-torrent
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(5)
|
||||
seeders:
|
||||
selector: td:nth-child(7)
|
||||
leechers:
|
||||
selector: td:nth-child(8)
|
||||
grabs:
|
||||
selector: td:nth-child(6)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: ([\d\.]+)
|
||||
date:
|
||||
selector: time
|
||||
filters:
|
||||
# translations for Turkish|Estonian|Danish|Italian|Polish|Norwegian|Portoguese|Czech|Russian|Romanian|Spanish|French|German|Bulgarian|Dutch
|
||||
- name: re_replace
|
||||
args: ["(önce|tagasi|geleden|fa|temu|siden|atrás|nazpět|назад|acum|hace|il y a|vor|преди)", "ago"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minut|minuto|minuta|minutt|минута|Minute|minuut)", "minute"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minutit|minutter|minuti|minuty|minutos|минуты|минут|Minuten|минути|minuten)", "minutes"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tund|time|ora|godzina|hora|hodina|час|oră|heure|Stunde|uur)", "hour"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tundi|timer|ore|godziny|horas|hodiny|hoden|часа|часов|ore|heures|Stunden)", "hours"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päev|dag|giorno|dzień|dia|den|день|zi|día|jour|Tag|ден)", "day"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päeva|dage|giorni|dni|dias|dny|дня|дней|zile|días|jours|Tagen|дни|dagen)", "days"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädal|uge|settimana|tydzień|uke|semana|týden|неделю|săptămână|semaine|Woche|седмица)", "week"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädalat|uger|settimane|tygodnie|uker|semanas|týdny|недели|недель|săptămâni|semaines|Wochen|седмици|weken)", "weeks"]
|
||||
- name: re_replace
|
||||
args: [" (ay|kuu|måned|mese|miesiąc|mês|měsíc|месяц|lună|mes|mois|Monat|месец|maand)", "month"]
|
||||
- name: re_replace
|
||||
args: [" (ay|kuud|måneder|mesi|miesiące|meses|měsíce|месяца|месяцев|luni|meses|mois|Monaten|месеца|maanden)", "months"]
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"100% Free\"]": "0" # Single Torrent Freeleech
|
||||
"i[data-original-title=\"Global freeleech\"]": "0" # Global Freeleech
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"Double upload\"]": "2" # Single Torrent Double Upload
|
||||
"i[data-original-title=\"Double Upload\"]": "2" # Global Double Upload
|
||||
"*": "1"
|
@@ -6,6 +6,8 @@
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://torrent-turk.co/
|
||||
legacylinks:
|
||||
- https://torrent-turk.org/
|
||||
|
||||
caps:
|
||||
@@ -13,23 +15,43 @@
|
||||
- {id: 149, cat: Movies, desc: "Movies/Turkish"}
|
||||
- {id: 151, cat: Movies/HD, desc: "Movies/Turkish/1080p"}
|
||||
- {id: 152, cat: Movies/HD, desc: "Movies/Turkish/720p"}
|
||||
- {id: 153, cat: Movies/DVD, desc: "Movies/Turkish/DVD5-DVD9"}
|
||||
- {id: 154, cat: Movies/WEBDL, desc: "Movies/Turkish/BRRip-HDRip-DVDRip-WebDL"}
|
||||
- {id: 155, cat: Movies/Other, desc: "Movies/Turkish/Boxset"}
|
||||
|
||||
- {id: 156, cat: Movies, desc: "Movies/Foreign"}
|
||||
- {id: 157, cat: Movies/UHD, desc: "Movies/Foreign/4K"}
|
||||
- {id: 157, cat: Movies/UHD, desc: "Movies/Foreign/4K / 3D"}
|
||||
- {id: 159, cat: Movies/HD, desc: "Movies/Foreign/1080p"}
|
||||
- {id: 160, cat: Movies/HD, desc: "Movies/Foreign/720p"}
|
||||
- {id: 161, cat: Movies/DVD, desc: "Movies/Foreign/DVD5-DVD9"}
|
||||
- {id: 162, cat: Movies/WEBDL, desc: "Movies/Foreign/BRRip-HDRip-DVDRip-WebDL"}
|
||||
- {id: 163, cat: Movies/Other, desc: "Movies/Foreign/Boxset"}
|
||||
|
||||
- {id: 164, cat: TV, desc: "TV"}
|
||||
- {id: 165, cat: TV, desc: "TV/Turkish"}
|
||||
- {id: 166, cat: TV, desc: "TV/Foreign"}
|
||||
- {id: 167, cat: TV/Other, desc: "TV Programs"}
|
||||
- {id: 185, cat: TV/Documentary, desc: "TV/Documentary"}
|
||||
- {id: 168, cat: TV/Other, desc: "TV/Other"}
|
||||
|
||||
- {id: 171, cat: Audio, desc: "Music"}
|
||||
- {id: 172, cat: Audio, desc: "Music/Turkish"}
|
||||
- {id: 173, cat: Audio, desc: "Music/Foreign"}
|
||||
- {id: 184, cat: Audio, desc: "Music/Discography"}
|
||||
- {id: 174, cat: Audio/Video, desc: "Music/Video"}
|
||||
|
||||
- {id: 175, cat: PC, desc: "Apps / Game / Graphics"}
|
||||
- {id: 176, cat: PC, desc: "Apps"}
|
||||
- {id: 177, cat: Other, desc: "Pictures"}
|
||||
- {id: 183, cat: Books/Ebook, desc: "EBook"}
|
||||
- {id: 178, cat: Books/Technical, desc: "Training Sets"}
|
||||
- {id: 179, cat: PC, desc: "OS"}
|
||||
- {id: 180, cat: PC/Games, desc: "PC/Games"}
|
||||
- {id: 181, cat: Console, desc: "Playstation"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
@@ -42,18 +64,18 @@
|
||||
- name: info
|
||||
type: info
|
||||
label: Layout
|
||||
default: Only the classic profile is supported. Make sure to set the "Torrent listesi" option in your profile to "Klasik".
|
||||
default: "<ol><li>Only the English Classic profile is supported.<li>Make sure to set the <b>Torrent Listing (Listeleme Biçimi)</b> option in your profile to <b>Classic (Klasik)</b><li>And set the <b>Language (Dil)</b> to <b>English</b><li>Using the <i>Modern</i> theme will prevent results, and using <i>Turkish</i> will prevent upload dates.</ol>"
|
||||
|
||||
login:
|
||||
path: ?p=home&pid=1
|
||||
method: form
|
||||
form: form#loginbox_form
|
||||
form: form#sls_form
|
||||
submitpath: ajax/login.php
|
||||
inputs:
|
||||
action: "login"
|
||||
loginbox_membername: "{{ .Config.username }}"
|
||||
loginbox_password: "{{ .Config.password }}"
|
||||
loginbox_remember: "true"
|
||||
loginbox_remember: 1
|
||||
selectorinputs:
|
||||
securitytoken:
|
||||
selector: "script:contains(\"stKey: \")"
|
||||
@@ -98,6 +120,26 @@
|
||||
download:
|
||||
selector: a[href*="?p=torrents&pid=10&action=download"]
|
||||
attribute: href
|
||||
date:
|
||||
optional: true
|
||||
# Uploaded 30-01-2019 15:02 by
|
||||
selector: td.torrent_name:not(:contains(" at "))
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Uploaded (.+?) by"
|
||||
- name: dateparse
|
||||
args: "02-01-2006 15:04"
|
||||
date:
|
||||
optional: true
|
||||
# Uploaded Friday at 05:11 by
|
||||
# Uploaded Today at 00:48 by
|
||||
# Uploaded Yesterday at 23:57 by
|
||||
selector: td.torrent_name:contains(" at ")
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Uploaded (.+?) by"
|
||||
- name: replace
|
||||
args: [" at ", " "]
|
||||
size:
|
||||
selector: a[rel="torrent_size"]
|
||||
seeders:
|
||||
@@ -113,11 +155,9 @@
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"img[title=\"FREE!\"]": "0"
|
||||
"img[title=\"Download Multiplier: 0.5\"]": "0.5"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"img[title=\"Upload Multiplier: 2\"]": "2"
|
||||
"*": "1"
|
||||
date:
|
||||
selector: td.torrent_name > abbr.timeago
|
||||
optional: true
|
||||
attribute: data-time
|
||||
|
@@ -8,6 +8,7 @@
|
||||
followredirect: true
|
||||
links:
|
||||
- https://wvw.torrent9.uno/
|
||||
- https://wvw.t9.pe/
|
||||
legacylinks:
|
||||
- http://www.torrent9.ec/
|
||||
- http://www.torrent9.red/
|
||||
@@ -43,7 +44,7 @@
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: "{{ if .Keywords }}/search_torrent/{{ .Keywords }}/page-0{{else}}/top_torrent.php{{end}}"
|
||||
- path: "{{ if .Keywords }}/search_torrent/{{ re_replace .Keywords \"[']+\" \"\" }}/page-0{{else}}/top_torrent.php{{end}}"
|
||||
rows:
|
||||
selector: div.table-responsive > table tbody tr
|
||||
fields:
|
||||
|
@@ -84,8 +84,7 @@
|
||||
|
||||
login:
|
||||
path: torrent/account-login.php
|
||||
method: form
|
||||
form: form[action="account-login.php"]
|
||||
method: post
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
@@ -93,7 +92,7 @@
|
||||
- selector: div.row p.red-text
|
||||
test:
|
||||
path: torrent/torrents-search.php
|
||||
selector: a[href*="logout"]
|
||||
selector: div.myB-content:contains("Ratio:")
|
||||
|
||||
ratio:
|
||||
path: torrent/torrents-search.php
|
||||
|
@@ -1,63 +0,0 @@
|
||||
---
|
||||
site: torrentcouch
|
||||
name: TorrentCouch
|
||||
description: "TorrentCounch is a Public TV tracker"
|
||||
language: en-us
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://torrentcouch.net/
|
||||
legacylinks:
|
||||
- https://torrentcouch.com/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: TV, desc: "TV"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
|
||||
settings: []
|
||||
|
||||
download:
|
||||
selector: tr td a[href*="/files/download/"]
|
||||
|
||||
search:
|
||||
# https://torrentcouch.com/?s=expanse
|
||||
# https://torrentcouch.net/page/3/?s=expanse
|
||||
paths:
|
||||
- path: "{{if .Keywords}}/?s={{ .Keywords}}{{else}}/{{end}}"
|
||||
- path: "{{if .Keywords}}/page/2/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/page/3/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/page/4/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
rows:
|
||||
selector: article
|
||||
fields:
|
||||
title:
|
||||
selector: h1.entry-title a
|
||||
category:
|
||||
text: "1"
|
||||
details:
|
||||
selector: h1.entry-title a
|
||||
attribute: href
|
||||
description:
|
||||
selector: p
|
||||
download:
|
||||
selector: h1.entry-title a
|
||||
attribute: href
|
||||
size:
|
||||
text: "500 MB"
|
||||
seeders:
|
||||
text: "1"
|
||||
leechers:
|
||||
text: "1"
|
||||
date:
|
||||
selector: span.posted-on a time
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "January 2, 2006"
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
@@ -66,39 +66,39 @@
|
||||
selector: div[class="tgxtablerow clickable-row click"]
|
||||
fields:
|
||||
title:
|
||||
selector: div.tgxtablecell:nth-child(3) div a
|
||||
selector: div a[href^="/torrent/"]
|
||||
attribute: title
|
||||
category:
|
||||
selector: div.tgxtablecell a
|
||||
selector: div a[href^="/torrents.php?cat="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: cat
|
||||
details:
|
||||
selector: div.tgxtablecell:nth-child(3) div a
|
||||
selector: div a[href^="/torrent/"]
|
||||
attribute: href
|
||||
download:
|
||||
selector: div.tgxtablecell:nth-child(4) a
|
||||
selector: div a[href*="/get/"]
|
||||
attribute: href
|
||||
magnet:
|
||||
selector: div.tgxtablecell:nth-child(4) a:nth-child(2)
|
||||
selector: div a[href^="magnet:?"]
|
||||
attribute: href
|
||||
size:
|
||||
selector: div.tgxtablecell:nth-child(7) span
|
||||
selector: div span[style^="border-radius"]
|
||||
seeders:
|
||||
selector: div.tgxtablecell:nth-child(10) span font b
|
||||
selector: div span[title="Seeders/Leechers"] font b
|
||||
leechers:
|
||||
selector: div.tgxtablecell:nth-child(10) span font:nth-child(2) b
|
||||
selector: div span[title="Seeders/Leechers"] font:nth-child(2) b
|
||||
date:
|
||||
# 20Mins ago
|
||||
optional: true
|
||||
selector: div.tgxtablecell:nth-child(11) small:contains("ago")
|
||||
selector: div.tgxtablecell:last-of-type:contains("ago")
|
||||
filters:
|
||||
- name: timeago
|
||||
date:
|
||||
# 24/12/18 13:55
|
||||
optional: true
|
||||
selector: div.tgxtablecell:nth-child(11) small:contains(":")
|
||||
selector: div.tgxtablecell:last-of-type small:contains(":")
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "02/01/06 15:04"
|
||||
|
@@ -6,6 +6,8 @@
|
||||
type: private
|
||||
encoding: windows-1252
|
||||
links:
|
||||
- https://tsctracker.org/
|
||||
legacylinks:
|
||||
- https://tsctracker.net/
|
||||
|
||||
caps:
|
||||
@@ -175,4 +177,4 @@
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": "1"
|
||||
"*": "1"
|
||||
|
125
src/Jackett.Common/Definitions/totallykids.yml
Normal file
125
src/Jackett.Common/Definitions/totallykids.yml
Normal file
@@ -0,0 +1,125 @@
|
||||
---
|
||||
site: totallykids
|
||||
name: TotallyKids
|
||||
description: "TotallyKids (TK) is a Private Torrent Tracker for CHILDRENS MOVIES / TV / GENERAL"
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- http://www.totallykids.tv/
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: info_results
|
||||
type: info
|
||||
label: "Search results"
|
||||
default: "For best results, increase the torrents number in your profile to 100.<br />Default is 15."
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 5, cat: Audio, desc: "Music"}
|
||||
- {id: 6, cat: Audio/Audiobook, desc: "Audiobooks"}
|
||||
- {id: 4, cat: Books/Comics, desc: "Comics"}
|
||||
- {id: 7, cat: Books/EBook, desc: "E-Books"}
|
||||
- {id: 16, cat: Movies, desc: "Family Movies"}
|
||||
- {id: 23, cat: Movies, desc: "Teen Movies"}
|
||||
- {id: 8, cat: PC/Games, desc: "Games"}
|
||||
- {id: 1, cat: TV, desc: "Kids"}
|
||||
- {id: 2, cat: TV, desc: "Family"}
|
||||
- {id: 15, cat: TV, desc: "Educational"}
|
||||
- {id: 24, cat: TV, desc: "Teens"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
music-search: [q]
|
||||
|
||||
login:
|
||||
path: index.php?page=login
|
||||
method: form
|
||||
form: form[action^="index.php?page=login"]
|
||||
inputs:
|
||||
uid: "{{ .Config.username }}"
|
||||
pwd: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: tr td span[style="color:#FF0000;"]
|
||||
test:
|
||||
path: index.php
|
||||
selector: a[href="logout.php"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
# http://www.totallykids.tv/index.php?page=torrents&search=scooby&category=1;2;5;6;4;7;8;15;24;16;23&options=0&active=0
|
||||
- path: index.php
|
||||
inputs:
|
||||
page: torrents
|
||||
search: "{{ if .Keywords }}{{ .Keywords }}{{else}}{{end}}"
|
||||
category: "{{if .Categories}}{{range .Categories}}{{.}};{{end}}{{else}}0{{end}}"
|
||||
options: 0
|
||||
active: 0
|
||||
|
||||
rows:
|
||||
selector: table.lista tr td table.lista tr:has(a[href^="index.php?page=torrent-details"])
|
||||
fields:
|
||||
title:
|
||||
selector: td a[href^="index.php?page=torrent-details"]
|
||||
details:
|
||||
selector: td a[href^="index.php?page=torrent-details"]
|
||||
attribute: href
|
||||
category:
|
||||
selector: td a[href^="index.php?page=torrents&category="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: category
|
||||
download:
|
||||
selector: td a[href^="download.php"]
|
||||
attribute: href
|
||||
imdb:
|
||||
optional: true
|
||||
selector: a[href*="http://www.imdb.com/title/"]
|
||||
attribute: href
|
||||
filters:
|
||||
# http://anonym.to?javascript:popdetails('http://www.imdb.com/title/tt0086817');
|
||||
- name: replace
|
||||
args: [" http://anonym.to?javascript:popdetails('", ""]
|
||||
- name: replace
|
||||
args: ["');", ""]
|
||||
size:
|
||||
selector: td:nth-child(10)
|
||||
# two flavours of dates
|
||||
date:
|
||||
# Yesterday at 10:03:30 PM
|
||||
selector: td:nth-child(5):contains("day")
|
||||
optional: true
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["[ ]at|[\\s+]|[//\xa0],\\/g", " "]
|
||||
date:
|
||||
# February 09, 2019, 06:35:08 AM
|
||||
selector: td:nth-child(5):not(:contains("day"))
|
||||
optional: true
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["[,]|[\\s+]|[//\xa0],\\/g", " "]
|
||||
- name: dateparse
|
||||
args: "January 02 2006 03:04:05 PM"
|
||||
seeders:
|
||||
selector: td:nth-child(6)
|
||||
leechers:
|
||||
selector: td:nth-child(7)
|
||||
grabs:
|
||||
selector: td:nth-child(8)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[src="gold/gold.gif"]: "0"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
||||
|
@@ -3,7 +3,7 @@
|
||||
name: Xtreme Zone
|
||||
description: "XtreMeZone (MYXZ) is a ROMANIAN Private Torrent Tracker for MOVIES / TV / GENERAL"
|
||||
language: ro-ro
|
||||
type: semi-private
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.myxz.eu/
|
||||
|
@@ -160,9 +160,10 @@
|
||||
args: ["(.*)[sS](\\d{1,4})$", "$1"]
|
||||
- name: replace
|
||||
args: ["\"", ""]
|
||||
- name: trim
|
||||
paths:
|
||||
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ re_replace .Keywords \"\\s\" \"\"\"\" }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date"
|
||||
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ re_replace .Keywords \"\\s\" \"\"\"\" }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50"
|
||||
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date"
|
||||
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50"
|
||||
rows:
|
||||
selector: "table.table > tbody > tr"
|
||||
fields:
|
||||
|
@@ -1617,23 +1617,22 @@ namespace Jackett.Common.Indexers
|
||||
queryCollection.Add("t", "0");
|
||||
queryCollection.Add("submit", "Search");
|
||||
queryCollection.Add("sr", "topics");
|
||||
//queryCollection.Add("sr", "posts");
|
||||
//queryCollection.Add("ch", "99999");
|
||||
|
||||
// if the search string is empty use the getnew view
|
||||
if (string.IsNullOrWhiteSpace(searchString))
|
||||
{
|
||||
queryCollection.Add("search_id", "newposts");
|
||||
//queryCollection.Add("search_id", "newposts");
|
||||
searchString = "test";
|
||||
}
|
||||
else // use the normal search
|
||||
{
|
||||
//else // use the normal search
|
||||
//{
|
||||
searchString = searchString.Replace("-", " ");
|
||||
queryCollection.Add("terms", "all");
|
||||
queryCollection.Add("keywords", searchString);
|
||||
queryCollection.Add("author", "");
|
||||
queryCollection.Add("sc", "1");
|
||||
queryCollection.Add("sf", "titleonly");
|
||||
}
|
||||
//}
|
||||
|
||||
var searchUrl = SearchUrl + "?" + queryCollection.GetQueryString();
|
||||
results = await RequestStringWithCookies(searchUrl);
|
||||
|
@@ -18,7 +18,7 @@ namespace Jackett.Common.Indexers
|
||||
{
|
||||
public class BeyondHD : BaseWebIndexer
|
||||
{
|
||||
private string SearchUrl { get { return SiteLink + "browse.php?searchin=title&incldead=0&"; } }
|
||||
private string SearchUrl { get { return SiteLink + "browse.php?searchin=descr&incldead=1&"; } }
|
||||
|
||||
private new ConfigurationDataLoginLink configData
|
||||
{
|
||||
@@ -145,6 +145,8 @@ namespace Jackett.Common.Indexers
|
||||
var descCol = row.ChildElements.ElementAt(3);
|
||||
var qCommentLink = descCol.FirstChild.Cq();
|
||||
release.Title = qCommentLink.Text();
|
||||
if ((query.ImdbID == null || !TorznabCaps.SupportsImdbSearch) && !query.MatchQueryStringAND(release.Title))
|
||||
continue;
|
||||
release.Comments = new Uri(SiteLink + "/" + qCommentLink.Attr("href"));
|
||||
release.Guid = release.Comments;
|
||||
release.Link = new Uri($"{SiteLink}download.php?torrent={torrentId}");
|
||||
@@ -164,7 +166,7 @@ namespace Jackett.Common.Indexers
|
||||
var grabs = qRow.Find("td:nth-child(9) > a").Get(0).FirstChild.ToString();
|
||||
release.Grabs = ParseUtil.CoerceInt(grabs);
|
||||
|
||||
release.DownloadVolumeFactor = 1;
|
||||
release.DownloadVolumeFactor = 0;
|
||||
release.UploadVolumeFactor = 1;
|
||||
|
||||
releases.Add(release);
|
||||
|
@@ -117,7 +117,7 @@ namespace Jackett.Common.Indexers
|
||||
return IndexerConfigurationStatus.RequiresTesting;
|
||||
}
|
||||
|
||||
List<ReleaseInfo> parseTorrents(WebClientStringResult results, String seasonep, TorznabQuery query, int already_founded, int limit)
|
||||
List<ReleaseInfo> parseTorrents(WebClientStringResult results, String seasonep, TorznabQuery query, int already_founded, int limit, int previously_parsed_on_page)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
try
|
||||
@@ -128,7 +128,7 @@ 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=0; (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
|
||||
{
|
||||
@@ -172,7 +172,7 @@ namespace Jackett.Common.Indexers
|
||||
release.Category = MapTrackerCatToNewznab(cat);
|
||||
|
||||
/* if the release name not contains the language we add it because it is know from category */
|
||||
if (cat.Contains("hun") && !release.Title.Contains("hun"))
|
||||
if (cat.Contains("hun") && !release.Title.ToLower().Contains("hun"))
|
||||
release.Title += ".hun";
|
||||
|
||||
if (seasonep == null)
|
||||
@@ -272,6 +272,15 @@ namespace Jackett.Common.Indexers
|
||||
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)
|
||||
return releases;
|
||||
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;
|
||||
|
||||
// find pagelinks in the bottom
|
||||
var pagelinks = dom["div[id=pager_bottom]"].Find("a");
|
||||
if (pagelinks.Length > 0)
|
||||
@@ -293,15 +302,22 @@ namespace Jackett.Common.Indexers
|
||||
if (limit == 0)
|
||||
limit = 100;
|
||||
|
||||
releases = parseTorrents(results, seasonep, query, releases.Count, limit);
|
||||
if (start_page == 1)
|
||||
{
|
||||
releases = parseTorrents(results, seasonep, query, releases.Count, limit, previously_parsed_on_page);
|
||||
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=2; (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);
|
||||
releases.AddRange(parseTorrents(results, seasonep, query, releases.Count, limit));
|
||||
releases.AddRange(parseTorrents(results, seasonep, query, releases.Count, limit, previously_parsed_on_page));
|
||||
previously_parsed_on_page = 0;
|
||||
pairs.Remove(new KeyValuePair<string, string>("oldal", i.ToString()));
|
||||
}
|
||||
|
||||
|
@@ -23,9 +23,9 @@ namespace Jackett.Common.Indexers
|
||||
"https://polishtracker.net/",
|
||||
};
|
||||
|
||||
private new ConfigurationDataBasicLoginWithRSSAndDisplay configData
|
||||
private new ConfigurationDataBasicLoginWithEmail configData
|
||||
{
|
||||
get { return (ConfigurationDataBasicLoginWithRSSAndDisplay)base.configData; }
|
||||
get { return (ConfigurationDataBasicLoginWithEmail)base.configData; }
|
||||
set { base.configData = value; }
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers
|
||||
client: wc,
|
||||
logger: l,
|
||||
p: ps,
|
||||
configData: new ConfigurationDataBasicLoginWithRSSAndDisplay())
|
||||
configData: new ConfigurationDataBasicLoginWithEmail())
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "pl-pl";
|
||||
@@ -64,7 +64,7 @@ Encoding = Encoding.UTF8;
|
||||
|
||||
var pairs = new Dictionary<string, string>
|
||||
{
|
||||
{ "email", configData.Username.Value },
|
||||
{ "email", configData.Email.Value },
|
||||
{ "pass", configData.Password.Value }
|
||||
};
|
||||
var result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, null, true, null, SiteLink);
|
||||
@@ -72,6 +72,8 @@ Encoding = Encoding.UTF8;
|
||||
await ConfigureIfOK(result.Cookies, result.Cookies != null && result.Cookies.Contains("id="), () =>
|
||||
{
|
||||
var errorMessage = result.Content;
|
||||
if (errorMessage.Contains("Error!"))
|
||||
errorMessage = "E-mail or password is incorrect";
|
||||
throw new ExceptionWithConfigData(errorMessage, configData);
|
||||
});
|
||||
return IndexerConfigurationStatus.RequiresTesting;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
@@ -32,7 +33,7 @@ namespace Jackett.Common.Indexers
|
||||
set { base.configData = value; }
|
||||
}
|
||||
|
||||
public TVstore(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
||||
public TVstore(IIndexerConfigurationService configService, Utils.Clients.WebClient wc, Logger l, IProtectionService ps)
|
||||
: base(name: "TVstore",
|
||||
description: "TV Store is a HUNGARIAN Private Torrent Tracker for TV",
|
||||
link: "https://tvstore.me/",
|
||||
@@ -215,7 +216,7 @@ namespace Jackett.Common.Indexers
|
||||
try
|
||||
{
|
||||
var id = seriesknowbysite[i];
|
||||
string[] serieselement = id.Split(';');
|
||||
string[] serieselement = WebUtility.HtmlDecode(id).Split(';');
|
||||
SeriesDetail sd = new SeriesDetail();
|
||||
sd.HunName = serieselement[1].Split('=')[1].Trim('\'').ToLower();
|
||||
sd.EngName = serieselement[2].Split('=')[1].Trim('\'').ToLower();
|
||||
@@ -224,7 +225,9 @@ namespace Jackett.Common.Indexers
|
||||
series.Add(sd);
|
||||
}
|
||||
catch (IndexOutOfRangeException e)
|
||||
{ }
|
||||
{
|
||||
throw (e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -129,6 +129,8 @@ namespace Jackett.Common.Indexers {
|
||||
"&tr=udp://tracker.justseed.it:1337/announce";
|
||||
|
||||
release.MagnetUri = new Uri (magnet_uri);
|
||||
release.Comments = release.MagnetUri;
|
||||
release.Guid = release.MagnetUri;
|
||||
release.InfoHash = torrent.Value<JToken> ("infohash").ToString ();
|
||||
|
||||
// convert unix timestamp to human readable date
|
||||
|
200
src/Jackett.Common/Indexers/digitalcore.cs
Normal file
200
src/Jackett.Common/Indexers/digitalcore.cs
Normal file
@@ -0,0 +1,200 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
|
||||
namespace Jackett.Common.Indexers
|
||||
{
|
||||
public class Digitalcore : BaseWebIndexer
|
||||
{
|
||||
private string SearchUrl { get { return SiteLink + "api/v1/torrents"; } }
|
||||
private string LoginUrl { get { return SiteLink + "api/v1/auth"; } }
|
||||
|
||||
private new ConfigurationDataBasicLogin configData
|
||||
{
|
||||
get { return (ConfigurationDataBasicLogin)base.configData; }
|
||||
set { base.configData = value; }
|
||||
}
|
||||
|
||||
public Digitalcore(IIndexerConfigurationService configService, WebClient w, Logger l, IProtectionService ps)
|
||||
: base(name: "DigitalCore",
|
||||
description: "DigitalCore is a Private Torrent Tracker for MOVIES / TV / GENERAL",
|
||||
link: "https://digitalcore.club/",
|
||||
caps: new TorznabCapabilities(),
|
||||
configService: configService,
|
||||
client: w,
|
||||
logger: l,
|
||||
p: ps,
|
||||
configData: new ConfigurationDataBasicLogin())
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "en-us";
|
||||
Type = "private";
|
||||
|
||||
TorznabCaps.SupportsImdbSearch = true;
|
||||
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesDVD, "Movies/DVDR");
|
||||
AddCategoryMapping(2, TorznabCatType.MoviesSD, "Movies/XviD");
|
||||
AddCategoryMapping(3, TorznabCatType.MoviesBluRay, "Movies/BluRay");
|
||||
AddCategoryMapping(4, TorznabCatType.MoviesUHD, "Movies/4K");
|
||||
AddCategoryMapping(5, TorznabCatType.MoviesHD, "Movies/720p");
|
||||
AddCategoryMapping(6, TorznabCatType.MoviesHD, "Movies/1080p");
|
||||
|
||||
AddCategoryMapping(8, TorznabCatType.TVHD, "Tv/720p");
|
||||
AddCategoryMapping(9, TorznabCatType.TVHD, "Tv/1080p");
|
||||
AddCategoryMapping(10, TorznabCatType.TVSD, "Tv/XVID");
|
||||
AddCategoryMapping(11, TorznabCatType.TVSD, "Tv/DVDR");
|
||||
AddCategoryMapping(12, TorznabCatType.TVHD, "Tv/PACKS");
|
||||
AddCategoryMapping(13, TorznabCatType.TVUHD, "Tv/4K");
|
||||
AddCategoryMapping(14, TorznabCatType.TVHD, "Tv/BluRay");
|
||||
|
||||
AddCategoryMapping(17, TorznabCatType.Other, "Unknown");
|
||||
AddCategoryMapping(18, TorznabCatType.PC0day, "Apps/0day");
|
||||
AddCategoryMapping(19, TorznabCatType.PCGames, "Games/PC");
|
||||
AddCategoryMapping(20, TorznabCatType.PCISO, "Apps/PC");
|
||||
|
||||
AddCategoryMapping(22, TorznabCatType.AudioMP3, "Music/MP3");
|
||||
AddCategoryMapping(23, TorznabCatType.AudioLossless, "Music/FLAC");
|
||||
AddCategoryMapping(24, TorznabCatType.Audio, "Music/MTV");
|
||||
|
||||
AddCategoryMapping(30, TorznabCatType.XXX, "XXX/SD");
|
||||
AddCategoryMapping(31, TorznabCatType.XXX, "XXX/HD");
|
||||
AddCategoryMapping(32, TorznabCatType.XXX, "XXX/4K");
|
||||
|
||||
}
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
LoadValuesFromJson(configJson);
|
||||
var queryCollection = new NameValueCollection();
|
||||
|
||||
queryCollection.Add("username", configData.Username.Value);
|
||||
queryCollection.Add("password", configData.Password.Value);
|
||||
|
||||
var loginUrl = LoginUrl + "?" + queryCollection.GetQueryString();
|
||||
var loginResult = await RequestStringWithCookies(loginUrl, null, SiteLink);
|
||||
|
||||
await ConfigureIfOK(loginResult.Cookies, loginResult.Content.Contains("\"user\""), () =>
|
||||
{
|
||||
throw new ExceptionWithConfigData(loginResult.Content, configData);
|
||||
});
|
||||
return IndexerConfigurationStatus.RequiresTesting;
|
||||
}
|
||||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
List<ReleaseInfo> releases = new List<ReleaseInfo>();
|
||||
var queryCollection = new NameValueCollection();
|
||||
var searchString = query.GetQueryString();
|
||||
var searchUrl = SearchUrl;
|
||||
|
||||
queryCollection.Add("extendedSearch", "false");
|
||||
queryCollection.Add("freeleech", "false");
|
||||
queryCollection.Add("index", "0");
|
||||
queryCollection.Add("limit", "100");
|
||||
queryCollection.Add("order", "desc");
|
||||
queryCollection.Add("page", "search");
|
||||
if (query.ImdbID != null)
|
||||
queryCollection.Add("searchText", query.ImdbID);
|
||||
else
|
||||
queryCollection.Add("searchText", searchString);
|
||||
queryCollection.Add("sort", "d");
|
||||
queryCollection.Add("section", "all");
|
||||
queryCollection.Add("stereoscopic", "false");
|
||||
queryCollection.Add("watchview", "false");
|
||||
|
||||
searchUrl += "?" + queryCollection.GetQueryString();
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query))
|
||||
searchUrl += "&categories[]=" + cat;
|
||||
var results = await RequestStringWithCookies(searchUrl, null, SiteLink);
|
||||
|
||||
try
|
||||
{
|
||||
//var json = JArray.Parse(results.Content);
|
||||
dynamic json = JsonConvert.DeserializeObject<dynamic>(results.Content);
|
||||
foreach (var row in json ?? System.Linq.Enumerable.Empty<dynamic>())
|
||||
{
|
||||
var release = new ReleaseInfo();
|
||||
var descriptions = new List<string>();
|
||||
var tags = new List<string>();
|
||||
|
||||
release.MinimumRatio = 1.1;
|
||||
release.MinimumSeedTime = 48 * 60 * 60;
|
||||
release.Title = row.name;
|
||||
release.Category = MapTrackerCatToNewznab(row.category.ToString());
|
||||
release.Size = row.size;
|
||||
release.Seeders = row.seeders;
|
||||
release.Peers = row.leechers + release.Seeders;
|
||||
release.PublishDate = DateTime.ParseExact(row.added.ToString() + " +01:00", "yyyy-MM-dd HH:mm:ss zzz", CultureInfo.InvariantCulture);
|
||||
release.Files = row.numfiles;
|
||||
release.Grabs = row.times_completed;
|
||||
|
||||
release.Comments = new Uri(SiteLink + "torrent/" + row.id.ToString() + "/");
|
||||
release.Guid = release.Comments;
|
||||
release.Link = new Uri(SiteLink + "api/v1/torrents/download/" + row.id.ToString());
|
||||
|
||||
if (row.frileech == 1)
|
||||
release.DownloadVolumeFactor = 0;
|
||||
else
|
||||
release.DownloadVolumeFactor = 1;
|
||||
release.UploadVolumeFactor = 1;
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(row.customcover.ToString()))
|
||||
// {
|
||||
// release.BannerUrl = new Uri(SiteLink + row.customcover);
|
||||
//}
|
||||
|
||||
if (row.imdbid2 != null && row.imdbid2.ToString().StartsWith("tt"))
|
||||
{
|
||||
release.Imdb = ParseUtil.CoerceLong(row.imdbid2.ToString().Substring(2));
|
||||
descriptions.Add("Title: " + row.title);
|
||||
descriptions.Add("Year: " + row.year);
|
||||
descriptions.Add("Genres: " + row.genres);
|
||||
descriptions.Add("Tagline: " + row.tagline);
|
||||
descriptions.Add("Cast: " + row.cast);
|
||||
descriptions.Add("Rating: " + row.rating);
|
||||
//descriptions.Add("Plot: " + row.plot);
|
||||
|
||||
release.BannerUrl = new Uri(SiteLink + "img/imdb/" + row.imdbid2 + ".jpg");
|
||||
}
|
||||
|
||||
if ((int)row.p2p == 1)
|
||||
tags.Add("P2P");
|
||||
if ((int)row.pack == 1)
|
||||
tags.Add("Pack");
|
||||
if ((int)row.reqid != 0)
|
||||
tags.Add("Request");
|
||||
|
||||
if (tags.Count > 0)
|
||||
descriptions.Add("Tags: " + string.Join(", ", tags));
|
||||
|
||||
// var preDate = row.preDate.ToString();
|
||||
// if (!string.IsNullOrWhiteSpace(preDate) && preDate != "1970-01-01 01:00:00")
|
||||
// descriptions.Add("PRE: " + preDate);
|
||||
|
||||
descriptions.Add("Section: " + row.section);
|
||||
|
||||
release.Description = string.Join("<br>\n", descriptions);
|
||||
|
||||
releases.Add(release);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(results.Content, ex);
|
||||
}
|
||||
|
||||
return releases;
|
||||
}
|
||||
}
|
||||
}
|
@@ -7,14 +7,15 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="0.10.1" />
|
||||
<PackageReference Include="Autofac" Version="4.8.1" />
|
||||
<PackageReference Include="AngleSharp" Version="0.11.0" />
|
||||
<PackageReference Include="Autofac" Version="4.9.1" />
|
||||
<PackageReference Include="AutoMapper" Version="8.0.0" />
|
||||
<PackageReference Include="BencodeNET" Version="2.2.24" />
|
||||
<PackageReference Include="BencodeNET" Version="2.3.0" />
|
||||
<PackageReference Include="CloudFlareUtilities" Version="1.2.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.4.3" />
|
||||
<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.0" />
|
||||
<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" />
|
||||
@@ -23,7 +24,7 @@
|
||||
<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="YamlDotNet" Version="5.3.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="5.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -0,0 +1,18 @@
|
||||
namespace Jackett.Common.Models.IndexerConfig
|
||||
{
|
||||
public class ConfigurationDataBasicLoginWithEmail : ConfigurationData
|
||||
{
|
||||
public StringItem Email { get; private set; }
|
||||
public StringItem Password { get; private set; }
|
||||
public DisplayItem Instructions { get; private set; }
|
||||
|
||||
public ConfigurationDataBasicLoginWithEmail(string instructionMessageOptional = null)
|
||||
{
|
||||
Email = new StringItem { Name = "Email" };
|
||||
Password = new StringItem { Name = "Password" };
|
||||
Instructions = new DisplayItem(instructionMessageOptional) { Name = "" };
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
namespace Jackett.Common.Services.Interfaces
|
||||
{
|
||||
public interface IFilePermissionService
|
||||
{
|
||||
void MakeFileExecutable(string path);
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Jackett.Common.Services.Interfaces
|
||||
{
|
||||
@@ -12,7 +12,7 @@ namespace Jackett.Common.Services.Interfaces
|
||||
void ReserveUrls(bool doInstall = true);
|
||||
Uri ConvertToProxyLink(Uri link, string serverUrl, string indexerId, string action = "dl", string file = "t");
|
||||
string BasePath();
|
||||
string GetServerUrl(object Request); //TODO: Once Mono is removed, change type to HttpRequest
|
||||
string GetServerUrl(HttpRequest Request);
|
||||
List<string> notices { get; }
|
||||
string GetBlackholeDirectory();
|
||||
string GetApiKey();
|
||||
|
@@ -30,17 +30,23 @@ namespace Jackett.Common.Services
|
||||
IConfigurationService configService;
|
||||
ManualResetEvent locker = new ManualResetEvent(false);
|
||||
ITrayLockService lockService;
|
||||
IProcessService processService;
|
||||
IServiceConfigService windowsService;
|
||||
IFilePermissionService filePermissionService;
|
||||
private ServerConfig serverConfig;
|
||||
bool forceupdatecheck = false;
|
||||
Variants.JackettVariant variant = Variants.JackettVariant.NotFound;
|
||||
|
||||
public UpdateService(Logger l, WebClient c, IConfigurationService cfg, ITrayLockService ls, ServerConfig sc)
|
||||
public UpdateService(Logger l, WebClient c, IConfigurationService cfg, ITrayLockService ls, IProcessService ps, IServiceConfigService ws, IFilePermissionService fps, ServerConfig sc)
|
||||
{
|
||||
logger = l;
|
||||
client = c;
|
||||
configService = cfg;
|
||||
lockService = ls;
|
||||
processService = ps;
|
||||
windowsService = ws;
|
||||
serverConfig = sc;
|
||||
filePermissionService = fps;
|
||||
}
|
||||
|
||||
private string ExePath()
|
||||
@@ -94,12 +100,6 @@ namespace Jackett.Common.Services
|
||||
variant = variants.GetVariant();
|
||||
logger.Info("Jackett variant: " + variant.ToString());
|
||||
|
||||
if (DotNetCoreUtil.IsRunningOnDotNetCore)
|
||||
{
|
||||
logger.Info($"Skipping update check as running Jackett on .NET Core is still in preview. Updates must be performed manually at this time.");
|
||||
return;
|
||||
}
|
||||
|
||||
forceupdatecheck = true;
|
||||
|
||||
var isWindows = System.Environment.OSVersion.Platform != PlatformID.Unix;
|
||||
@@ -117,7 +117,6 @@ namespace Jackett.Common.Services
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
var response = await client.GetString(new WebRequest()
|
||||
{
|
||||
Url = "https://api.github.com/repos/Jackett/Jackett/releases",
|
||||
@@ -147,12 +146,14 @@ namespace Jackett.Common.Services
|
||||
logger.Info($"New release found. Current: {currentVersion} New: {latestRelease.Name}");
|
||||
try
|
||||
{
|
||||
var tempDir = await DownloadRelease(latestRelease.Assets, isWindows, latestRelease.Name);
|
||||
var tempDir = await DownloadRelease(latestRelease.Assets, isWindows, latestRelease.Name);
|
||||
// Copy updater
|
||||
var installDir = Path.GetDirectoryName(ExePath());
|
||||
var updaterPath = Path.Combine(tempDir, "Jackett", "JackettUpdater.exe");
|
||||
var updaterPath = GetUpdaterPath(tempDir);
|
||||
if (updaterPath != null)
|
||||
{
|
||||
StartUpdate(updaterPath, installDir, isWindows, serverConfig.RuntimeSettings.NoRestart, trayIsRunning);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -178,6 +179,19 @@ namespace Jackett.Common.Services
|
||||
}
|
||||
}
|
||||
|
||||
private string GetUpdaterPath(string tempDirectory)
|
||||
{
|
||||
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64 ||
|
||||
variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
|
||||
{
|
||||
return Path.Combine(tempDirectory, "Jackett", "JackettUpdater");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Path.Combine(tempDirectory, "Jackett", "JackettUpdater.exe");
|
||||
}
|
||||
}
|
||||
|
||||
private string GetCurrentVersion()
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
@@ -204,8 +218,8 @@ namespace Jackett.Common.Services
|
||||
logger.Error("Temp dir doesn't exist: " + tempDir.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
try {
|
||||
DirectoryInfo d = new DirectoryInfo(tempDir);
|
||||
foreach (var dir in d.GetDirectories("JackettUpdate-*"))
|
||||
{
|
||||
@@ -276,6 +290,21 @@ namespace Jackett.Common.Services
|
||||
tarArchive.Close();
|
||||
gzipStream.Close();
|
||||
inStream.Close();
|
||||
|
||||
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64
|
||||
|| variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
|
||||
{
|
||||
//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
|
||||
|
||||
// When the files get extracted, the execute permission for jackett and JackettUpdater don't get carried across
|
||||
|
||||
string jackettPath = tempDir + "/Jackett/jackett";
|
||||
filePermissionService.MakeFileExecutable(jackettPath);
|
||||
|
||||
string jackettUpdaterPath = tempDir + "/Jackett/JackettUpdater";
|
||||
filePermissionService.MakeFileExecutable(jackettUpdaterPath);
|
||||
}
|
||||
}
|
||||
|
||||
return tempDir;
|
||||
@@ -284,9 +313,6 @@ namespace Jackett.Common.Services
|
||||
private void StartUpdate(string updaterExePath, string installLocation, bool isWindows, bool NoRestart, bool trayIsRunning)
|
||||
{
|
||||
string appType = "Console";
|
||||
//DI once off Owin
|
||||
IProcessService processService = new ProcessService(logger);
|
||||
IServiceConfigService windowsService = new WindowsServiceConfigService(processService, logger);
|
||||
|
||||
if (isWindows && windowsService.ServiceExists() && windowsService.ServiceRunning())
|
||||
{
|
||||
@@ -294,19 +320,14 @@ namespace Jackett.Common.Services
|
||||
}
|
||||
|
||||
var exe = Path.GetFileName(ExePath());
|
||||
var args = string.Join(" ", Environment.GetCommandLineArgs().Skip(1).Select(a => a.Contains(" ") ? "\"" +a + "\"" : a )).Replace("\"", "\\\"");
|
||||
var args = string.Join(" ", Environment.GetCommandLineArgs().Skip(1).Select(a => a.Contains(" ") ? "\"" + a + "\"" : a )).Replace("\"", "\\\"");
|
||||
|
||||
var startInfo = new ProcessStartInfo();
|
||||
startInfo.UseShellExecute = false;
|
||||
startInfo.CreateNoWindow = true;
|
||||
|
||||
// Note: add a leading space to the --Args argument to avoid parsing as arguments
|
||||
if (isWindows)
|
||||
{
|
||||
startInfo.Arguments = $"--Path \"{installLocation}\" --Type \"{appType}\" --Args \" {args}\"";
|
||||
startInfo.FileName = Path.Combine(updaterExePath);
|
||||
}
|
||||
else
|
||||
if (variant == Variants.JackettVariant.Mono)
|
||||
{
|
||||
// Wrap mono
|
||||
args = exe + " " + args;
|
||||
@@ -315,6 +336,11 @@ namespace Jackett.Common.Services
|
||||
startInfo.Arguments = $"{Path.Combine(updaterExePath)} --Path \"{installLocation}\" --Type \"{appType}\" --Args \" {args}\"";
|
||||
startInfo.FileName = "mono";
|
||||
}
|
||||
else
|
||||
{
|
||||
startInfo.Arguments = $"--Path \"{installLocation}\" --Type \"{appType}\" --Args \" {args}\"";
|
||||
startInfo.FileName = Path.Combine(updaterExePath);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Jackett.Common.Utils
|
||||
{
|
||||
@@ -14,7 +12,7 @@ namespace Jackett.Common.Utils
|
||||
Mono,
|
||||
CoreWindows,
|
||||
CoreMacOs,
|
||||
CoreLinuxAmd64,
|
||||
CoreLinuxAmdx64,
|
||||
CoreLinuxArm32,
|
||||
CoreLinuxArm64
|
||||
}
|
||||
@@ -37,7 +35,7 @@ namespace Jackett.Common.Utils
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.ProcessArchitecture == Architecture.X64)
|
||||
{
|
||||
return JackettVariant.CoreLinuxAmd64;
|
||||
return JackettVariant.CoreLinuxAmdx64;
|
||||
}
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.ProcessArchitecture == Architecture.Arm)
|
||||
@@ -67,7 +65,6 @@ namespace Jackett.Common.Utils
|
||||
return JackettVariant.NotFound;
|
||||
}
|
||||
|
||||
|
||||
public string GetArtifactFileName(JackettVariant variant)
|
||||
{
|
||||
switch (variant)
|
||||
@@ -88,9 +85,9 @@ namespace Jackett.Common.Utils
|
||||
{
|
||||
return "Jackett.Binaries.macOS.tar.gz";
|
||||
}
|
||||
case JackettVariant.CoreLinuxAmd64:
|
||||
case JackettVariant.CoreLinuxAmdx64:
|
||||
{
|
||||
return "Jackett.Binaries.LinuxAMD64.tar.gz";
|
||||
return "Jackett.Binaries.LinuxAMDx64.tar.gz";
|
||||
}
|
||||
case JackettVariant.CoreLinuxArm32:
|
||||
{
|
||||
|
@@ -22,12 +22,13 @@
|
||||
|
||||
<!-- Conditionally obtain references for the .NET Core App 2.2 target -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
|
||||
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
|
||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.8.1" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.1" />
|
||||
<PackageReference Include="Autofac" Version="4.9.1" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.4.0" />
|
||||
<PackageReference Include="AutoMapper" Version="8.0.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.4.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
||||
@@ -39,7 +40,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
|
||||
<PackageReference Include="NLog" Version="4.5.11" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.7.1" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.8.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
|
||||
</ItemGroup>
|
||||
|
41
src/Jackett.Server/Services/FilePermissionService.cs
Normal file
41
src/Jackett.Server/Services/FilePermissionService.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using NLog;
|
||||
using System;
|
||||
#if NETCOREAPP2_2
|
||||
using Mono.Unix;
|
||||
#endif
|
||||
|
||||
namespace Jackett.Server.Services
|
||||
{
|
||||
public class FilePermissionService : IFilePermissionService
|
||||
{
|
||||
private Logger logger;
|
||||
|
||||
public FilePermissionService(Logger l)
|
||||
{
|
||||
logger = l;
|
||||
}
|
||||
|
||||
public void MakeFileExecutable(string path)
|
||||
{
|
||||
#if NETCOREAPP2_2
|
||||
|
||||
//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
|
||||
|
||||
logger.Debug($"Attempting to give execute permission to: {path}");
|
||||
try
|
||||
{
|
||||
UnixFileInfo jackettUpdaterFI = new UnixFileInfo(path)
|
||||
{
|
||||
FileAccessPermissions = FileAccessPermissions.UserReadWriteExecute | FileAccessPermissions.GroupRead | FileAccessPermissions.OtherRead
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
@@ -314,36 +314,33 @@ namespace Jackett.Server.Services
|
||||
// Only needed for Owin
|
||||
}
|
||||
|
||||
public string GetServerUrl(Object obj)
|
||||
public string GetServerUrl(HttpRequest request)
|
||||
{
|
||||
string serverUrl = "";
|
||||
|
||||
if (obj is HttpRequest request)
|
||||
var scheme = request.Scheme;
|
||||
var port = request.HttpContext.Request.Host.Port;
|
||||
|
||||
// Check for protocol headers added by reverse proxys
|
||||
// X-Forwarded-Proto: A de facto standard for identifying the originating protocol of an HTTP request
|
||||
var X_Forwarded_Proto = request.Headers.Where(x => x.Key == "X-Forwarded-Proto").Select(x => x.Value).FirstOrDefault();
|
||||
if (X_Forwarded_Proto.Count > 0)
|
||||
{
|
||||
var scheme = request.Scheme;
|
||||
var port = request.HttpContext.Request.Host.Port;
|
||||
|
||||
// Check for protocol headers added by reverse proxys
|
||||
// X-Forwarded-Proto: A de facto standard for identifying the originating protocol of an HTTP request
|
||||
var X_Forwarded_Proto = request.Headers.Where(x => x.Key == "X-Forwarded-Proto").Select(x => x.Value).FirstOrDefault();
|
||||
if (X_Forwarded_Proto.Count > 0)
|
||||
{
|
||||
scheme = X_Forwarded_Proto.First();
|
||||
}
|
||||
// Front-End-Https: Non-standard header field used by Microsoft applications and load-balancers
|
||||
else if (request.Headers.Where(x => x.Key == "Front-End-Https" && x.Value.FirstOrDefault() == "on").Any())
|
||||
{
|
||||
scheme = "https";
|
||||
}
|
||||
|
||||
//default to 443 if the Host header doesn't contain the port (needed for reverse proxy setups)
|
||||
if (scheme == "https" && !request.HttpContext.Request.Host.Value.Contains(":"))
|
||||
{
|
||||
port = 443;
|
||||
}
|
||||
|
||||
serverUrl = string.Format("{0}://{1}:{2}{3}/", scheme, request.HttpContext.Request.Host.Host, port, BasePath());
|
||||
scheme = X_Forwarded_Proto.First();
|
||||
}
|
||||
// Front-End-Https: Non-standard header field used by Microsoft applications and load-balancers
|
||||
else if (request.Headers.Where(x => x.Key == "Front-End-Https" && x.Value.FirstOrDefault() == "on").Any())
|
||||
{
|
||||
scheme = "https";
|
||||
}
|
||||
|
||||
//default to 443 if the Host header doesn't contain the port (needed for reverse proxy setups)
|
||||
if (scheme == "https" && !request.HttpContext.Request.Host.Value.Contains(":"))
|
||||
{
|
||||
port = 443;
|
||||
}
|
||||
|
||||
serverUrl = string.Format("{0}://{1}:{2}{3}/", scheme, request.HttpContext.Request.Host.Host, port, BasePath());
|
||||
|
||||
return serverUrl;
|
||||
}
|
||||
|
@@ -83,6 +83,7 @@ namespace Jackett.Server
|
||||
builder.RegisterType<ServerService>().As<IServerService>().SingleInstance();
|
||||
builder.RegisterType<ProtectionService>().As<IProtectionService>().SingleInstance();
|
||||
builder.RegisterType<ServiceConfigService>().As<IServiceConfigService>().SingleInstance();
|
||||
builder.RegisterType<FilePermissionService>().As<IFilePermissionService>().SingleInstance();
|
||||
|
||||
IContainer container = builder.Build();
|
||||
Helper.ApplicationContainer = container;
|
||||
|
@@ -21,15 +21,15 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.8.1" />
|
||||
<PackageReference Include="FluentAssertions" Version="5.5.3" />
|
||||
<PackageReference Include="Autofac" Version="4.9.1" />
|
||||
<PackageReference Include="FluentAssertions" Version="5.6.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0" />
|
||||
<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="NUnit.ConsoleRunner" Version="3.9.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -19,6 +19,7 @@ namespace Jackett.Updater
|
||||
private IProcessService processService;
|
||||
private IServiceConfigService windowsService;
|
||||
private Logger logger;
|
||||
private Variants.JackettVariant variant = Variants.JackettVariant.NotFound;
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
@@ -38,6 +39,10 @@ namespace Jackett.Updater
|
||||
logger.Info("Jackett Updater v" + GetCurrentVersion());
|
||||
logger.Info("Options \"" + string.Join("\" \"", args) + "\"");
|
||||
|
||||
Variants variants = new Variants();
|
||||
variant = variants.GetVariant();
|
||||
logger.Info("Jackett variant: " + variant.ToString());
|
||||
|
||||
bool isWindows = Environment.OSVersion.Platform == PlatformID.Win32NT;
|
||||
if (isWindows)
|
||||
{
|
||||
@@ -45,7 +50,7 @@ namespace Jackett.Updater
|
||||
logger.Info("Pausing for 3 seconds to give Jackett & tray time to shutdown");
|
||||
System.Threading.Thread.Sleep(3000);
|
||||
}
|
||||
|
||||
|
||||
processService = new ProcessService(logger);
|
||||
windowsService = new WindowsServiceConfigService(processService, logger);
|
||||
|
||||
@@ -63,6 +68,7 @@ namespace Jackett.Updater
|
||||
{
|
||||
logger.Error(HelpText.AutoBuild(optionsResult));
|
||||
logger.Error("Failed to process update arguments!");
|
||||
logger.Error(errors.ToString());
|
||||
Console.ReadKey();
|
||||
});
|
||||
}
|
||||
@@ -94,9 +100,11 @@ namespace Jackett.Updater
|
||||
{
|
||||
try
|
||||
{
|
||||
var startInfo = new ProcessStartInfo();
|
||||
startInfo.Arguments = "-15 " + pid;
|
||||
startInfo.FileName = "kill";
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
Arguments = "-15 " + pid,
|
||||
FileName = "kill"
|
||||
};
|
||||
Process.Start(startInfo);
|
||||
System.Threading.Thread.Sleep(1000); // just sleep, WaitForExit() doesn't seem to work on mono/linux (returns immediantly), https://bugzilla.xamarin.com/show_bug.cgi?id=51742
|
||||
exited = proc.WaitForExit(2000);
|
||||
@@ -148,7 +156,7 @@ namespace Jackett.Updater
|
||||
var trayProcesses = Process.GetProcessesByName("JackettTray");
|
||||
if (isWindows)
|
||||
{
|
||||
if (trayProcesses.Count() > 0)
|
||||
if (trayProcesses.Length > 0)
|
||||
{
|
||||
foreach (var proc in trayProcesses)
|
||||
{
|
||||
@@ -172,9 +180,9 @@ namespace Jackett.Updater
|
||||
{
|
||||
var fileName = Path.GetFileName(file).ToLowerInvariant();
|
||||
|
||||
if (fileName.EndsWith(".zip") ||
|
||||
fileName.EndsWith(".tar") ||
|
||||
fileName.EndsWith(".gz"))
|
||||
if (fileName.EndsWith(".zip")
|
||||
|| fileName.EndsWith(".tar")
|
||||
|| fileName.EndsWith(".gz"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -280,6 +288,8 @@ namespace Jackett.Updater
|
||||
"Definitions/bt-scene.yml",
|
||||
"Definitions/extratorrentclone.yml",
|
||||
"Definitions/btdb.yml",
|
||||
"Definitions/torrentcouch.yml",
|
||||
"Definitions/idopeclone.yml",
|
||||
};
|
||||
|
||||
foreach (var oldFile in oldFiles)
|
||||
@@ -303,7 +313,7 @@ namespace Jackett.Updater
|
||||
if (!isWindows)
|
||||
KillPids(pids);
|
||||
|
||||
if (options.NoRestart == false)
|
||||
if (!options.NoRestart)
|
||||
{
|
||||
if (isWindows && (trayRunning || options.StartTray) && !string.Equals(options.Type, "WindowsService", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -344,14 +354,13 @@ namespace Jackett.Updater
|
||||
logger.Error("Failed to get admin rights to start the service.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var startInfo = new ProcessStartInfo()
|
||||
{
|
||||
Arguments = options.Args,
|
||||
FileName = Path.Combine(options.Path, "JackettConsole.exe"),
|
||||
FileName = GetJackettConsolePath(options.Path),
|
||||
UseShellExecute = true
|
||||
};
|
||||
|
||||
@@ -363,12 +372,20 @@ namespace Jackett.Updater
|
||||
startInfo.CreateNoWindow = false;
|
||||
startInfo.WindowStyle = ProcessWindowStyle.Normal;
|
||||
}
|
||||
else
|
||||
|
||||
if (variant == Variants.JackettVariant.Mono)
|
||||
{
|
||||
startInfo.Arguments = startInfo.FileName + " " + startInfo.Arguments;
|
||||
startInfo.FileName = "mono";
|
||||
}
|
||||
|
||||
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64
|
||||
|| variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
|
||||
{
|
||||
startInfo.UseShellExecute = false;
|
||||
startInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
logger.Info("Starting Jackett: " + startInfo.FileName + " " + startInfo.Arguments);
|
||||
Process.Start(startInfo);
|
||||
}
|
||||
@@ -380,5 +397,18 @@ namespace Jackett.Updater
|
||||
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
||||
return new FileInfo(WebUtility.UrlDecode(location.AbsolutePath)).DirectoryName;
|
||||
}
|
||||
|
||||
private string GetJackettConsolePath(string directoryPath)
|
||||
{
|
||||
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64
|
||||
|| variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
|
||||
{
|
||||
return Path.Combine(directoryPath, "jackett");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Path.Combine(directoryPath, "JackettConsole.exe");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user