Compare commits

...

22 Commits

Author SHA1 Message Date
Diego Heras
5d808e006d webui: fix search encode in url hash. resolves #7265 (#7299) 2020-02-23 16:30:57 +13:00
fnk93
694c39503b The Resurrection: Fix multiple logins (#7298) 2020-02-23 08:44:41 +13:00
Diego Heras
12b2de2725 iptorrents: remove login with user/pass. resolves #7063 resolves #6850 resolves #6485 resolves #6402 resolves #4624 (#7294) 2020-02-23 08:34:14 +13:00
Diego Heras
d806bb18a2 core: improve cookie configuration help (#7293) 2020-02-23 08:31:38 +13:00
Sen Jiang
5a02bb9c27 btschool: use cookie (#7290)
Got all kinds of error using username and password
2020-02-23 08:29:00 +13:00
Garfield69
a3dc1b295b bitspyder: fix login. resolves #7287
also add sort options in config
2020-02-22 13:36:28 +13:00
Garfield69
471ab7f204 btnext: add info note about classic theme. #7208
also add sort options to the config.
and update the categories.
add movie-search.
2020-02-22 11:06:13 +13:00
Garfield69
bdcdd78cee torrent9clone: new domain .pl resolves #7282 2020-02-22 10:33:07 +13:00
junglebus
966c64c48e No longer manually install ChromeDriver (#7271) 2020-02-22 08:03:15 +13:00
Patrick Koenig
d5724f2f63 Change cookie SameSite from None to Lax (#7269) 2020-02-22 08:02:28 +13:00
Garfield69
3ecdbfe7f4 gay-torrentsorg: now private again. resolves #7268 2020-02-21 12:55:10 +13:00
Garfield69
b1ad8ed0bf hddolby: is now private. resolves #7267 2020-02-21 12:48:57 +13:00
junglebus
3a35e4e40a Windows service and Tray: NET Core only (#7258)
We no longer need to support NET461 for Tray and Windows service since these are for Windows users only
2020-02-21 08:55:45 +13:00
junglebus
0d58b2d63f Don't check cert store on Mono 6 (#7260) resolves #7223 2020-02-21 07:55:46 +13:00
junglebus
3c596c978c Stop building on Appveyor (#7259)
Now that we are successfully building and releasing on Azure Pipelines, there is no need to build on Appveyor as well
2020-02-21 07:06:12 +13:00
Garfield69
cc2a69cc77 film-paleis: gone private #7254
also requires thanks before download
2020-02-20 21:07:16 +13:00
Garfield69
7627671900 torrentcsv: fix empty search error. resolves #7255 2020-02-20 17:28:27 +13:00
Garfield69
4a4af3d8c8 r4e: update for unit3d 2.2.7 resolves #7257
plus add new categories
add posters
2020-02-20 17:01:55 +13:00
Jonas Stendahl
950d38a651 Add codec and medium filters to HDBits API (#7209)
* Add codec and medium filters to HDBits API

* Add checkboxes support to CardigannIndexer

* Expose multi-select as template variable

* update datestamp to force cache refresh

Co-authored-by: garfield69 <garfield69@outlook.com>
2020-02-20 09:23:55 +13:00
Garfield69
49d4c3248c remove vanila, now using mediaget client. #4003 2020-02-20 07:33:09 +13:00
Garfield69
3da168ef6c prostylex: now semi-private. resolves #7248 2020-02-20 07:23:28 +13:00
Garfield69
d4da96559f moviesdvdr: new domain .co. #7244 2020-02-19 07:40:41 +13:00
35 changed files with 450 additions and 2611 deletions

View File

@@ -144,7 +144,6 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* DXP (Deaf Experts)
* EniaHD
* ExtremlymTorrents
* Film-Paleis
* Gay-Torrents.net
* Gay-Torrents.org
* HamsterStudio
@@ -171,7 +170,6 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* Torrents-Local
* TribalMixes
* Union Fansub
* Vanila
* YggTorrent (YGG)
* Ztracker
</details>
@@ -272,6 +270,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* FeedUrNeed (FuN)
* Femdomcult
* FileList (FL)
* Film-Paleis
* FinVip
* FocusX
* FreeTorrent

View File

@@ -1,47 +0,0 @@
version: 0.12.{build}
skip_tags: true
image:
- Ubuntu
- Visual Studio 2019
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
CAKE_SETTINGS_SKIPPACKAGEVERSIONCHECK: true
configuration: Release
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
build_script:
- ps: .\build.ps1 --target=Windows-Appveyor
- sh: ./build.sh --target=Linux
test: off
before_deploy:
- ps: ${env:release_description} = ( Get-Content -LiteralPath BuildOutput/ReleaseNotes.txt -Encoding UTF8 ) -join "`n";
deploy:
- provider: GitHub
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:
- provider: Webhook
url: https://skyhook.glitch.me/api/webhooks/346588605843767297/_VWi5abKliaWsBmQO7AX69tD28FhqSLjKyLBwkSwwT13uyWJQHx5TSWK_iAs-0RzmyvZ/appveyor
method: POST
on_build_success: true
on_build_failure: true
on_build_status_changed: true

View File

@@ -321,24 +321,6 @@ stages:
if [[ "$(artifactName)" == *"macOS"* ]]; then sudo ./install_service_macos; fi
if [[ "$(artifactName)" == *"LinuxAMDx64"* ]]; then sudo ./install_service_systemd.sh; fi
#Remove this task once ChromeDriver is deployed to Ubuntu image https://github.com/actions/virtual-environments/issues/9
- task: Bash@3
displayName: Install ChromeDriver (Linux and Mono)
condition: and(succeeded(), eq(variables['imageName'], 'ubuntu-latest'))
inputs:
targetType: inline
script: |
CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
&& CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
&& cd /tmp \
&& unzip chromedriver_linux64.zip \
&& rm -rf chromedriver_linux64.zip \
&& sudo mv chromedriver /usr/local/bin/chromedriver \
&& sudo chmod +x /usr/local/bin/chromedriver \
&& chromedriver --version
echo "##vso[task.setvariable variable=CHROMEWEBDRIVER]/usr/local/bin"
- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:

View File

@@ -1,510 +0,0 @@
#tool nuget:?package=NUnit.ConsoleRunner
#addin nuget:?package=Cake.Git
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Debug");
//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////
// Define directories.
var workingDir = MakeAbsolute(Directory("./"));
string artifactsDirName = "Artifacts";
string testResultsDirName = "TestResults";
string netCoreFramework = "netcoreapp3.1";
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string updaterProjectPath = "./src/Jackett.Updater/Jackett.Updater.csproj";
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Info")
.Does(() =>
{
Information(@"Jackett Cake build script starting...");
Information(@"Requires InnoSetup and C:\msys64 to be present for packaging (Pre-installed on AppVeyor) on Windows");
Information(@"Working directory is: " + workingDir);
if (IsRunningOnWindows())
{
Information("Platform is Windows");
}
else
{
Information("Platform is Linux, Windows builds will be skipped");
}
});
Task("Clean")
.IsDependentOn("Info")
.Does(() =>
{
CleanDirectories("./src/**/obj");
CleanDirectories("./src/**/bin");
CleanDirectories("./BuildOutput");
CleanDirectories("./" + artifactsDirName);
CleanDirectories("./" + testResultsDirName);
CreateDirectory("./" + artifactsDirName);
Information("Clean completed");
});
Task("Build-Full-Framework")
.IsDependentOn("Clean")
.Does(() =>
{
NuGetRestore("./src/Jackett.sln");
var buildSettings = new MSBuildSettings()
.SetConfiguration(configuration)
.UseToolVersion(MSBuildToolVersion.VS2019);
MSBuild("./src/Jackett.sln", buildSettings);
});
Task("Run-Unit-Tests")
.IsDependentOn("Build-Full-Framework")
.Does(() =>
{
CreateDirectory("./" + testResultsDirName);
var resultsFile = $"./{testResultsDirName}/JackettTestResult.xml";
NUnit3("./src/**/bin/" + configuration + "/net461/*.Test.dll", new NUnit3Settings
{
Results = new[] { new NUnit3Result { FileName = resultsFile } }
});
if (AppVeyor.IsRunningOnAppVeyor && IsRunningOnWindows())
{
AppVeyor.UploadTestResults(resultsFile, AppVeyorTestResultsType.NUnit3);
}
});
Task("Package-Windows-Full-Framework")
.IsDependentOn("Run-Unit-Tests")
.Does(() =>
{
string buildOutputPath = "./BuildOutput/net461/win7-x86/Jackett";
DotNetCorePublish(serverProjectPath, "net461", "win7-x86", buildOutputPath);
CopyFiles("./src/Jackett.Service/bin/" + configuration + "/net461" + "/JackettService.*", buildOutputPath);
CopyFiles("./src/Jackett.Tray/bin/" + configuration + "/net461" + "/JackettTray.*", buildOutputPath);
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath);
Zip("./BuildOutput/net461/win7-x86", $"./{artifactsDirName}/Jackett.Binaries.Windows.zip");
//InnoSetup
string sourceFolder = MakeAbsolute(Directory(buildOutputPath)).ToString();
InnoSetupSettings settings = new InnoSetupSettings();
settings.OutputDirectory = workingDir + "/" + artifactsDirName;
//Can remove below line once Cake is updated for InnoSetup 6 - https://github.com/cake-build/cake/pull/2565
settings.ToolPath = @"C:\Program Files (x86)\Inno Setup 6\ISCC.exe";
settings.Defines = new Dictionary<string, string>
{
{ "MyFileForVersion", sourceFolder + "/Jackett.Common.dll" },
{ "MySourceFolder", sourceFolder },
{ "MyOutputFilename", "Jackett.Installer.Windows" },
};
InnoSetup("./Installer.iss", settings);
});
Task("Package-Mono-Full-Framework")
.IsDependentOn("Run-Unit-Tests")
.Does(() =>
{
string buildOutputPath = "./BuildOutput/net461/linux-x64/Jackett";
DotNetCorePublish(serverProjectPath, "net461", "linux-x64", buildOutputPath);
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath); //builds against multiple frameworks
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
//https://github.com/dotnet/corefx/issues/19914
//https://bugzilla.xamarin.com/show_bug.cgi?id=60315
//The workaround is to delete System.Net.Http.dll and patch the .exe.config file
DeleteFile(buildOutputPath + "/System.Net.Http.dll");
var configFile = File(buildOutputPath + "/JackettConsole.exe.config");
XmlPoke(configFile, "configuration/runtime/*[name()='assemblyBinding']/*[name()='dependentAssembly']/*[name()='assemblyIdentity'][@name='System.Net.Http']/../*[name()='bindingRedirect']/@newVersion", "4.0.0.0");
//Mono on FreeBSD doesn't like the bundled System.Runtime.InteropServices.RuntimeInformation
//https://github.com/dotnet/corefx/issues/23989
//https://github.com/Jackett/Jackett/issues/3547
DeleteFile(buildOutputPath + "/System.Runtime.InteropServices.RuntimeInformation.dll");
CheckForGzipAndTar();
Gzip("./BuildOutput/net461/linux-x64", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.Mono.tar.gz");
});
Task("Package-DotNetCore-macOS")
.IsDependentOn("Clean")
.Does(() =>
{
string runtimeId = "osx-x64";
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", "Jackett.Binaries.macOS.tar.gz");
});
Task("Package-DotNetCore-LinuxAMDx64")
.IsDependentOn("Clean")
.Does(() =>
{
string runtimeId = "linux-x64";
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_systemd.sh", buildOutputPath);
CopyFileToDirectory("./jackett_launcher.sh", buildOutputPath);
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxAMDx64.tar.gz");
});
Task("Package-DotNetCore-LinuxARM32")
.IsDependentOn("Clean")
.Does(() =>
{
string runtimeId = "linux-arm";
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_systemd.sh", buildOutputPath);
CopyFileToDirectory("./jackett_launcher.sh", buildOutputPath);
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxARM32.tar.gz");
});
Task("Package-DotNetCore-LinuxARM64")
.IsDependentOn("Clean")
.Does(() =>
{
string runtimeId = "linux-arm64";
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_systemd.sh", buildOutputPath);
CopyFileToDirectory("./jackett_launcher.sh", buildOutputPath);
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxARM64.tar.gz");
});
Task("Appveyor-Push-Artifacts")
.IsDependentOn("Clean")
.Does(() =>
{
if (AppVeyor.IsRunningOnAppVeyor)
{
foreach (var file in GetFiles(workingDir + $"/{artifactsDirName}/*"))
{
AppVeyor.UploadArtifact(file.FullPath);
}
}
else
{
Information(@"Skipping artifact push as not running in AppVeyor Windows Environment");
}
});
Task("Release-Notes")
.IsDependentOn("Clean")
.Does(() =>
{
string latestTag = GitDescribe(".", false, GitDescribeStrategy.Tags, 0);
Information($"Latest tag is: {latestTag}" + Environment.NewLine);
List<GitCommit> relevantCommits = new List<GitCommit>();
var commitCollection = GitLog("./", 50);
foreach(GitCommit commit in commitCollection)
{
var commitTag = GitDescribe(".", commit.Sha, false, GitDescribeStrategy.Tags, 0);
if (commitTag == latestTag)
{
relevantCommits.Add(commit);
}
else
{
break;
}
}
relevantCommits = relevantCommits.AsEnumerable().Reverse().Skip(1).ToList();
if (relevantCommits.Count() > 0)
{
List<string> notesList = new List<string>();
foreach(GitCommit commit in relevantCommits)
{
notesList.Add($"{commit.MessageShort} (Thank you @{commit.Author.Name})");
}
string buildNote = String.Join(Environment.NewLine, notesList);
Information(buildNote);
System.IO.File.WriteAllLines(workingDir + "/BuildOutput/ReleaseNotes.txt", notesList.ToArray());
}
else
{
Information($"No commit messages found to create release notes");
}
});
Task("Windows-Environment-Dev")
.IsDependentOn("Package-Windows-Full-Framework")
.IsDependentOn("Package-Mono-Full-Framework")
.IsDependentOn("Package-DotNetCore-macOS")
.IsDependentOn("Package-DotNetCore-LinuxAMDx64")
.IsDependentOn("Package-DotNetCore-LinuxARM32")
.IsDependentOn("Package-DotNetCore-LinuxARM64")
.IsDependentOn("Appveyor-Push-Artifacts")
.IsDependentOn("Release-Notes")
.Does(() =>
{
Information("Windows-Environment Task Completed");
});
Task("Windows-Environment-Appveyor")
.IsDependentOn("Package-Windows-Full-Framework")
.IsDependentOn("Package-Mono-Full-Framework")
.IsDependentOn("Appveyor-Push-Artifacts")
.IsDependentOn("Release-Notes")
.Does(() =>
{
Information("Windows-Environment Task Completed");
});
Task("Linux-Environment")
.IsDependentOn("Package-DotNetCore-macOS")
.IsDependentOn("Package-DotNetCore-LinuxAMDx64")
.IsDependentOn("Package-DotNetCore-LinuxARM32")
.IsDependentOn("Package-DotNetCore-LinuxARM64")
.IsDependentOn("Appveyor-Push-Artifacts")
.IsDependentOn("Release-Notes")
.Does(() =>
{
Information("Linux-Environment Task Completed");
});
private void RunMsysCommand(string utility, string utilityArguments)
{
var msysDir = @"C:\msys64\usr\bin\";
var utilityProcess = msysDir + utility + ".exe";
Information("MSYS2 Utility: " + utility);
Information("MSYS2 Directory: " + msysDir);
Information("Utility Location: " + utilityProcess);
Information("Utility Arguments: " + utilityArguments);
IEnumerable<string> redirectedStandardOutput;
IEnumerable<string> redirectedErrorOutput;
var exitCodeWithArgument =
StartProcess(
utilityProcess,
new ProcessSettings {
Arguments = utilityArguments,
WorkingDirectory = msysDir,
RedirectStandardOutput = true
},
out redirectedStandardOutput,
out redirectedErrorOutput
);
Information(utility + " output:" + Environment.NewLine + string.Join(Environment.NewLine, redirectedStandardOutput.ToArray()));
// Throw exception if anything was written to the standard error.
if (redirectedErrorOutput != null && redirectedErrorOutput.Any())
{
throw new Exception(
string.Format(
utility + " Errors ocurred: {0}",
string.Join(", ", redirectedErrorOutput)));
}
Information(utility + " Exit code: {0}", exitCodeWithArgument);
}
private string RelativeWinPathToFullPath(string relativePath)
{
return (workingDir + relativePath.TrimStart('.'));
}
private void RunLinuxCommand(string file, string arg)
{
var startInfo = new System.Diagnostics.ProcessStartInfo()
{
Arguments = arg,
FileName = file,
UseShellExecute = true
};
var process = System.Diagnostics.Process.Start(startInfo);
process.WaitForExit();
}
private void Gzip(string sourceFolder, string outputDirectory, string tarCdirectoryOption, string outputFileName)
{
var tarFileName = outputFileName.Remove(outputFileName.Length - 3, 3);
if (IsRunningOnWindows())
{
var fullSourcePath = RelativeWinPathToFullPath(sourceFolder);
var tarArguments = @"--force-local -cvf " + fullSourcePath + "/" + tarFileName + " -C " + fullSourcePath + $" {tarCdirectoryOption} --mode ='755'";
var gzipArguments = @"-k " + fullSourcePath + "/" + tarFileName;
RunMsysCommand("tar", tarArguments);
RunMsysCommand("gzip", gzipArguments);
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
}
else
{
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/JackettUpdater");
string macOsServiceScript = MakeAbsolute(Directory(sourceFolder)) + "/Jackett/install_service_macos";
if (FileExists(macOsServiceScript))
{
RunLinuxCommand("chmod", $"755 {macOsServiceScript}");
}
string systemdMonoScript = MakeAbsolute(Directory(sourceFolder)) + "/Jackett/install_service_systemd_mono.sh";
if (FileExists(systemdMonoScript))
{
RunLinuxCommand("chmod", $"755 {systemdMonoScript}");
}
string systemdScript = MakeAbsolute(Directory(sourceFolder)) + "/Jackett/install_service_systemd.sh";
if (FileExists(systemdScript))
{
RunLinuxCommand("chmod", $"755 {systemdScript}");
}
string launcherScript = MakeAbsolute(Directory(sourceFolder)) + "/Jackett/jackett_launcher.sh";
if (FileExists(launcherScript))
{
RunLinuxCommand("chmod", $"755 {launcherScript}");
}
RunLinuxCommand("tar", $"-C {sourceFolder} -zcvf {outputDirectory}/{tarFileName}.gz {tarCdirectoryOption}");
}
}
private void CheckForGzipAndTar()
{
if (FileExists(@"C:\msys64\usr\bin\tar.exe") && FileExists(@"C:\msys64\usr\bin\gzip.exe"))
{
Information("tar.exe and gzip.exe were found");
}
else
{
throw new Exception("tar.exe and gzip.exe were NOT found");
}
}
private void DotNetCorePublish(string projectPath, string framework, string runtime, string outputPath)
{
bool publishSingleFile = false;
if (publishSingleFile && framework != "net461")
{
var settings = new DotNetCorePublishSettings
{
Framework = framework,
Runtime = runtime,
OutputDirectory = outputPath,
ArgumentCustomization = args=>args.Append("/p:PublishSingleFile=true")
};
DotNetCorePublish(projectPath, settings);
}
else
{
var settings = new DotNetCorePublishSettings
{
Framework = framework,
Runtime = runtime,
OutputDirectory = outputPath
};
DotNetCorePublish(projectPath, settings);
}
}
//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////
Task("Default")
.IsDependentOn("Windows-Environment-Dev")
.Does(() =>
{
Information("Default Task Completed");
});
Task("Windows-Appveyor")
.IsDependentOn("Windows-Environment-Appveyor")
.Does(() =>
{
Information("Windows Appveyor Task Completed");
});
Task("Linux")
.IsDependentOn("Linux-Environment")
.Does(() =>
{
Information("Linux Task Completed");
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);

242
build.ps1
View File

@@ -1,242 +0,0 @@
##########################################################################
# This is the Cake bootstrapper script for PowerShell.
# This file was downloaded from https://github.com/cake-build/resources
# Feel free to change this file to fit your needs.
##########################################################################
<#
.SYNOPSIS
This is a Powershell script to bootstrap a Cake build.
.DESCRIPTION
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
and execute your Cake build script with the parameters you provide.
.PARAMETER Script
The build script to execute.
.PARAMETER Target
The build script target to run.
.PARAMETER Configuration
The build configuration to use.
.PARAMETER Verbosity
Specifies the amount of information to be displayed.
.PARAMETER ShowDescription
Shows description about tasks.
.PARAMETER DryRun
Performs a dry run.
.PARAMETER SkipToolPackageRestore
Skips restoring of packages.
.PARAMETER ScriptArgs
Remaining arguments are added here.
.LINK
https://cakebuild.net
#>
[CmdletBinding()]
Param(
[string]$Script = "build.cake",
[string]$Target,
[string]$Configuration,
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity,
[switch]$ShowDescription,
[Alias("WhatIf", "Noop")]
[switch]$DryRun,
[switch]$SkipToolPackageRestore,
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
[string[]]$ScriptArgs
)
# Attempt to set highest encryption available for SecurityProtocol.
# PowerShell will not set this by default (until maybe .NET 4.6.x). This
# will typically produce a message for PowerShell v2 (just an info
# message though)
try {
# Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48)
# Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't
# exist in .NET 4.0, even though they are addressable if .NET 4.5+ is
# installed (.NET 4.5 is an in-place upgrade).
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48
} catch {
Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3'
}
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
function MD5HashFile([string] $filePath)
{
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
{
return $null
}
[System.IO.Stream] $file = $null;
[System.Security.Cryptography.MD5] $md5 = $null;
try
{
$md5 = [System.Security.Cryptography.MD5]::Create()
$file = [System.IO.File]::OpenRead($filePath)
return [System.BitConverter]::ToString($md5.ComputeHash($file))
}
finally
{
if ($file -ne $null)
{
$file.Dispose()
}
}
}
function GetProxyEnabledWebClient
{
$wc = New-Object System.Net.WebClient
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
$wc.Proxy = $proxy
return $wc
}
Write-Host "Preparing to run build script..."
if(!$PSScriptRoot){
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
}
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins"
$MODULES_DIR = Join-Path $TOOLS_DIR "Modules"
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config"
$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
# Make sure tools folder exists
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
Write-Verbose -Message "Creating tools directory..."
New-Item -Path $TOOLS_DIR -Type directory | out-null
}
# Make sure that packages.config exist.
if (!(Test-Path $PACKAGES_CONFIG)) {
Write-Verbose -Message "Downloading packages.config..."
try {
$wc = GetProxyEnabledWebClient
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG)
} catch {
Throw "Could not download packages.config."
}
}
# Try find NuGet.exe in path if not exists
if (!(Test-Path $NUGET_EXE)) {
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
}
}
# Try download NuGet.exe if not exists
if (!(Test-Path $NUGET_EXE)) {
Write-Verbose -Message "Downloading NuGet.exe..."
try {
$wc = GetProxyEnabledWebClient
$wc.DownloadFile($NUGET_URL, $NUGET_EXE)
} catch {
Throw "Could not download NuGet.exe."
}
}
# Save nuget.exe path to environment to be available to child processed
$ENV:NUGET_EXE = $NUGET_EXE
# Restore tools from NuGet?
if(-Not $SkipToolPackageRestore.IsPresent) {
Push-Location
Set-Location $TOOLS_DIR
# Check for changes in packages.config and remove installed tools if true.
[string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
Write-Verbose -Message "Missing or changed package.config hash..."
Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |
Remove-Item -Recurse
}
Write-Verbose -Message "Restoring tools from NuGet..."
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
if ($LASTEXITCODE -ne 0) {
Throw "An error occurred while restoring NuGet tools."
}
else
{
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
}
Write-Verbose -Message ($NuGetOutput | out-string)
Pop-Location
}
# Restore addins from NuGet
if (Test-Path $ADDINS_PACKAGES_CONFIG) {
Push-Location
Set-Location $ADDINS_DIR
Write-Verbose -Message "Restoring addins from NuGet..."
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
if ($LASTEXITCODE -ne 0) {
Throw "An error occurred while restoring NuGet addins."
}
Write-Verbose -Message ($NuGetOutput | out-string)
Pop-Location
}
# Restore modules from NuGet
if (Test-Path $MODULES_PACKAGES_CONFIG) {
Push-Location
Set-Location $MODULES_DIR
Write-Verbose -Message "Restoring modules from NuGet..."
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
if ($LASTEXITCODE -ne 0) {
Throw "An error occurred while restoring NuGet modules."
}
Write-Verbose -Message ($NuGetOutput | out-string)
Pop-Location
}
# Make sure that Cake has been installed.
if (!(Test-Path $CAKE_EXE)) {
Throw "Could not find Cake.exe at $CAKE_EXE"
}
# Build Cake arguments
$cakeArguments = @("$Script");
if ($Target) { $cakeArguments += "-target=$Target" }
if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
if ($ShowDescription) { $cakeArguments += "-showdescription" }
if ($DryRun) { $cakeArguments += "-dryrun" }
$cakeArguments += $ScriptArgs
# Start Cake
Write-Host "Running build script..."
&$CAKE_EXE $cakeArguments
exit $LASTEXITCODE

117
build.sh
View File

@@ -1,117 +0,0 @@
#!/usr/bin/env bash
##########################################################################
# This is the Cake bootstrapper script for Linux and OS X.
# This file was downloaded from https://github.com/cake-build/resources
# Feel free to change this file to fit your needs.
##########################################################################
# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
ADDINS_DIR=$TOOLS_DIR/Addins
MODULES_DIR=$TOOLS_DIR/Modules
NUGET_EXE=$TOOLS_DIR/nuget.exe
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
PACKAGES_CONFIG=$TOOLS_DIR/packages.config
PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum
ADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config
MODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config
# Define md5sum or md5 depending on Linux/OSX
MD5_EXE=
if [[ "$(uname -s)" == "Darwin" ]]; then
MD5_EXE="md5 -r"
else
MD5_EXE="md5sum"
fi
# Define default arguments.
SCRIPT="build.cake"
CAKE_ARGUMENTS=()
# Parse arguments.
for i in "$@"; do
case $1 in
-s|--script) SCRIPT="$2"; shift ;;
--) shift; CAKE_ARGUMENTS+=("$@"); break ;;
*) CAKE_ARGUMENTS+=("$1") ;;
esac
shift
done
# Make sure the tools folder exist.
if [ ! -d "$TOOLS_DIR" ]; then
mkdir "$TOOLS_DIR"
fi
# Make sure that packages.config exist.
if [ ! -f "$TOOLS_DIR/packages.config" ]; then
echo "Downloading packages.config..."
curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages
if [ $? -ne 0 ]; then
echo "An error occurred while downloading packages.config."
exit 1
fi
fi
# Download NuGet if it does not exist.
if [ ! -f "$NUGET_EXE" ]; then
echo "Downloading NuGet..."
curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
if [ $? -ne 0 ]; then
echo "An error occurred while downloading nuget.exe."
exit 1
fi
fi
# Restore tools from NuGet.
pushd "$TOOLS_DIR" >/dev/null
if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/\r$//' )" != "$( $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' )" ]; then
find . -type d ! -name . ! -name 'Cake.Bakery' | xargs rm -rf
fi
mono "$NUGET_EXE" install -ExcludeVersion
if [ $? -ne 0 ]; then
echo "Could not restore NuGet tools."
exit 1
fi
$MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5"
popd >/dev/null
# Restore addins from NuGet.
if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then
pushd "$ADDINS_DIR" >/dev/null
mono "$NUGET_EXE" install -ExcludeVersion
if [ $? -ne 0 ]; then
echo "Could not restore NuGet addins."
exit 1
fi
popd >/dev/null
fi
# Restore modules from NuGet.
if [ -f "$MODULES_PACKAGES_CONFIG" ]; then
pushd "$MODULES_DIR" >/dev/null
mono "$NUGET_EXE" install -ExcludeVersion
if [ $? -ne 0 ]; then
echo "Could not restore NuGet modules."
exit 1
fi
popd >/dev/null
fi
# Make sure that Cake has been installed.
if [ ! -f "$CAKE_EXE" ]; then
echo "Could not find Cake.exe at '$CAKE_EXE'."
exit 1
fi
# Start Cake
exec mono "$CAKE_EXE" $SCRIPT "${CAKE_ARGUMENTS[@]}"

View File

@@ -55,6 +55,14 @@ body {
max-width: 255px;
}
.setup-item-inputcheckbox label {
padding: 0 1.5em;
}
.setup-item-inputcheckbox input {
height: 20px;
}
.setup-item-inputbool input {
max-width: 100px;
height: 20px;
@@ -277,7 +285,7 @@ table td.fit{
.tooltip-inner img {
max-width: 250px;
height: auto;
height: auto;
}
.type-public {

View File

@@ -32,7 +32,15 @@ $(document).ready(function () {
return opts.fn(this);
else
return opts.inverse(this);
});
});
Handlebars.registerHelper('if_in', function(elem, list, opts) {
if(list.indexOf(elem) > -1) {
return opts.fn(this);
}
return opts.inverse(this);
});
var index = window.location.pathname.indexOf("/UI");
var pathPrefix = window.location.pathname.substr(0, index);
@@ -43,7 +51,12 @@ $(document).ready(function () {
});
function openSearchIfNecessary() {
const hashArgs = location.hash.substring(1).split('&').reduce((prev, item) => Object.assign({ [item.split('=')[0]]: (item.split('=').length < 2 ? undefined : decodeURIComponent(item.split('=')[1])) }, prev), {});
const hashArgs = location.hash.substring(1).split('&').reduce((prev, item) =>
Object.assign({
[item.split('=')[0]]: (item.split('=').length < 2 ?
undefined :
decodeURIComponent(item.split('=')[1].replace(/\+/g,'%20')))
}, prev), {});
if ("search" in hashArgs) {
showSearch(hashArgs.tracker, hashArgs.search, hashArgs.category);
}
@@ -608,6 +621,11 @@ function getConfigModalJson(configForm) {
case "inputbool":
itemEntry.value = $el.find(".setup-item-inputbool input").is(":checked");
break;
case "inputcheckbox":
itemEntry.values = [];
$el.find(".setup-item-inputcheckbox input:checked").each(function () {
itemEntry.values.push($(this).val());
});
case "inputselect":
itemEntry.value = $el.find(".setup-item-inputselect select").val();
break;
@@ -762,7 +780,7 @@ function updateReleasesRow(row)
}
function showSearch(selectedIndexer, query, category) {
var selectedIndexers = []
var selectedIndexers = [];
if (selectedIndexer)
selectedIndexers = selectedIndexer.split(",");
$('#select-indexer-modal').remove();
@@ -829,7 +847,11 @@ function showSearch(selectedIndexer, query, category) {
Tracker: releaseDialog.find('#searchTracker').val()
};
window.location.hash = $.param({ search: queryObj.Query, tracker: queryObj.Tracker.join(","), category: queryObj.Category.join(",") });
window.location.hash = Object.entries({
search: encodeURIComponent(queryObj.Query).replace(/%20/g,'+'),
tracker: queryObj.Tracker.join(","),
category: queryObj.Category.join(",")
}).map(([k, v], i) => k + '=' + v).join('&');
$('#jackett-search-perform').html($('#spinner').html());
$('#searchResults div.dataTables_filter input').val("");
@@ -877,7 +899,7 @@ function showSearch(selectedIndexer, query, category) {
enableCaseInsensitiveFiltering: true,
nonSelectedText: 'All'
});
if (category !== undefined) {
searchCategory.val(category.split(","));
@@ -1155,8 +1177,8 @@ function bindUIButtons() {
var jackett_port = Number($("#jackett-port").val());
var jackett_basepathoverride = $("#jackett-basepathoverride").val();
var jackett_external = $("#jackett-allowext").is(':checked');
var jackett_update = $("#jackett-allowupdate").is(':checked');
var jackett_prerelease = $("#jackett-prerelease").is(':checked');
var jackett_update = $("#jackett-allowupdate").is(':checked');
var jackett_prerelease = $("#jackett-prerelease").is(':checked');
var jackett_logging = $("#jackett-logging").is(':checked');
var jackett_omdb_key = $("#jackett-omdbkey").val();
var jackett_omdb_url = $("#jackett-omdburl").val();

View File

@@ -34,7 +34,7 @@
<link rel="stylesheet" type="text/css" href="../bootstrap/bootstrap.min.css?changed=2017083001">
<link rel="stylesheet" type="text/css" href="../animate.css?changed=2017083001">
<link rel="stylesheet" type="text/css" href="../custom.css?changed=20200102" media="only screen and (min-device-width: 480px)">
<link rel="stylesheet" type="text/css" href="../custom.css?changed=20200220" media="only screen and (min-device-width: 480px)">
<link rel="stylesheet" type="text/css" href="../custom_mobile.css?changed=20200102" media="only screen and (max-device-width: 480px)">
<link rel="stylesheet" type="text/css" href="../css/jquery.dataTables.min.css?changed=2017083001">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-multiselect.css?changed=2017083001" />
@@ -52,11 +52,11 @@
</div>
<hr />
<div id="can-upgrade-from-mono" hidden class="alert alert-info" role="alert">
<div id="can-upgrade-from-mono" hidden class="alert alert-info" role="alert">
<strong>Standalone version of Jackett is now available - Mono not required</strong> <br>
To upgrade to the standalone version of Jackett, <a href="https://github.com/Jackett/Jackett#install-on-linux-amdx64" target="_blank" class="alert-link">click here</a> for install instructions.
Upgrading is straight forward, simply install the standalone version and your indexers/configuration will carry over.
Benefits include: increased performance, improved stability and no dependency on Mono.
To upgrade to the standalone version of Jackett, <a href="https://github.com/Jackett/Jackett#install-on-linux-amdx64" target="_blank" class="alert-link">click here</a> for install instructions.
Upgrading is straight forward, simply install the standalone version and your indexers/configuration will carry over.
Benefits include: increased performance, improved stability and no dependency on Mono.
</div>
<div class="pull-right">
@@ -235,6 +235,19 @@
{{/if}}
</div>
</script>
<script id="setup-item-inputcheckbox" type="text/x-handlebars-template">
<div class="setup-item-inputcheckbox">
{{#each options}}
<div class="checkbox"><label>
{{#if_in @key ../values}}
<input type="checkbox" data-id="{{../../id}}" class="form-control" value="{{@key}}" checked />
{{else}}
<input type="checkbox" data-id="{{../../id}}" class="form-control" value="{{@key}}" />
{{/if_in}}
{{this}}</label></div>
{{/each}}
</div>
</script>
<script id="setup-item-inputselect" type="text/x-handlebars-template">
<div class="setup-item-inputselect">
<select class="form-control" data-id="{{id}}">
@@ -678,6 +691,6 @@
</script>
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
<script type="text/javascript" src="../custom.js?changed=20200102"></script>
<script type="text/javascript" src="../custom.js?changed=20200222"></script>
</body>
</html>

View File

@@ -6,6 +6,8 @@
type: private
encoding: windows-1252
links:
- https://bitspyder.net/
legacylinks:
- http://bitspyder.net/
caps:
@@ -47,9 +49,34 @@
modes:
search: [q]
settings:
- name: username
type: text
label: Username
- name: password
type: password
label: Password
- name: sort
type: select
label: Sort requested from site
default: "8"
options:
"8": "created"
"6": "seeders"
"4": "size"
"1": "title"
- name: type
type: select
label: Order requested from site
default: "desc"
options:
"desc": "desc"
"asc": "asc"
login:
path: processf.php
method: post
path: login.php
method: form
form: form
inputs:
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
@@ -61,17 +88,20 @@
search:
paths:
- path: browse.php
method: post
inputs:
search: "{{ .Keywords }}"
# 0 active 1 incldead 2 onlydead
incldead: 1
# 0 title 1 default
scope: 1
sort: "{{ .Config.sort }}"
type: "{{ .Config.type }}"
rows:
selector: table > tbody > tr[class]
filters:
- name: andmatch
fields:
# there are two styles, we support both
title:
@@ -101,7 +131,7 @@
selector: td.rowcol:nth-child(7):has(br), td.clear:nth-child(4)
filters:
- name: regexp
args: ([\d,]+)
args: (\d+)
seeders:
selector: td.rowcol:nth-last-child(3)
leechers:
@@ -138,3 +168,4 @@
description:
optional: true
selector: font[color="#990000"]
# custom v4

View File

@@ -7,6 +7,7 @@
encoding: UTF-8
links:
- http://tracker.btnext.com/
# note: the site forces http, https is not supported
caps:
categorymappings:
@@ -15,67 +16,76 @@
- {id: 89, cat: Console, desc: "Games"}
- {id: 87, cat: TV, desc: "Series"}
- {id: 93, cat: Audio, desc: "Musica"}
- {id: 108, cat: Movies, desc: "ViP"}
- {id: 1, cat: Movies, desc: "Movies"}
- {id: 70, cat: Movies/3D, desc: "3D"}
- {id: 71, cat: Movies/Sd, desc: "480p"}
- {id: 72, cat: Movies/BluRay, desc: "BD-R"}
- {id: 31, cat: Movies/HD, desc: "BDRIP/BRRip"}
- {id: 16, cat: Movies/SD, desc: "CAM"}
- {id: 74, cat: Movies/DVD, desc: "DvD-R"}
- {id: 17, cat: Movies/HD, desc: "HD"}
- {id: 91, cat: Movies/Other, desc: "Kids"}
- {id: 76, cat: Movies, desc: "Packs"}
- {id: 77, cat: Movies/WEBDL, desc: "WEB-DL"}
- {id: 14, cat: Movies/SD, desc: "DVDRip/XViD"}
- {id: 85, cat: Movies/DVD, desc: "Custom-DVDR"}
- {id: 96, cat: Movies/HD, desc: "4K"}
- {id: 6, cat: PC, desc: "Applications"}
- {id: 18, cat: PC/ISO, desc: "PC Applications"}
- {id: 19, cat: PC/Mac, desc: "Macintosh Applications"}
- {id: 34, cat: PC/ISO, desc: "Linux Applications"}
- {id: 7, cat: Audio, desc: "Music"}
- {id: 20, cat: Audio/Video, desc: "MVideo"}
- {id: 21, cat: Audio/MP3, desc: "Mp3"}
- {id: 33, cat: Audio/Other, desc: "Mp4"}
- {id: 32, cat: Audio/Lossless, desc: "FLAC"}
- {id: 2, cat: Console, desc: "Games"}
- {id: 78, cat: PC/Games, desc: "Linux"}
- {id: 79, cat: PC/Mac, desc: "MacOSX"}
- {id: 28, cat: Console/NDS, desc: "Nintendo DS"}
- {id: 27, cat: PC/Games, desc: "PC/Windows"}
- {id: 80, cat: Console/PS3, desc: "PS2"}
- {id: 81, cat: Console/PS3, desc: "PS3"}
- {id: 82, cat: Console/PS4, desc: "PS4"}
- {id: 83, cat: Console/PSP, desc: "PSP"}
- {id: 95, cat: Console/PSVita, desc: "PSVITA"}
- {id: 4, cat: Console/Wii, desc: "Wii"}
- {id: 26, cat: Console/Xbox360, desc: "XBOX360"}
- {id: 84, cat: Console/Xbox, desc: "XONE"}
- {id: 70, cat: Movies/3D, desc: "Movies 3D"}
- {id: 71, cat: Movies/SD, desc: "Movies 480p"}
- {id: 72, cat: Movies/BluRay, desc: "Movies BD-R"}
- {id: 31, cat: Movies/HD, desc: "Movies BDRIP/BRRip"}
- {id: 16, cat: Movies/SD, desc: "Movies CAM"}
- {id: 74, cat: Movies/DVD, desc: "Movies DvD-R"}
- {id: 76, cat: Movies, desc: "Movies Packs"}
- {id: 91, cat: Movies/Other, desc: "Movies Kids"}
- {id: 77, cat: Movies/WEBDL, desc: "Movies WEB-DL"}
- {id: 85, cat: Movies/DVD, desc: "Movies Custom-DVDR"}
- {id: 14, cat: Movies/SD, desc: "Movies DVDRip/XViD"}
- {id: 98, cat: Movies/Other, desc: "Movies Juvenil"}
- {id: 104, cat: Movies/UHD, desc: "Movies Bluray-UHD"}
- {id: 102, cat: Movies/HD, desc: "Movies HD-720p"}
- {id: 101, cat: Movies/HD, desc: "Movies HD-1080p"}
- {id: 103, cat: Movies/UHD, desc: "Movies HD-2160p"}
- {id: 42, cat: TV, desc: "TV Series"}
- {id: 45, cat: TV/Documentary, desc: "Documentaries"}
- {id: 46, cat: TV/Sport, desc: "Sports"}
- {id: 47, cat: TV/HD, desc: "TV-Bluray"}
- {id: 48, cat: TV/SD, desc: "TV-Dvd-R"}
- {id: 49, cat: TV/SD, desc: "TV-DVDRiP"}
- {id: 50, cat: TV, desc: "TV-Packs"}
- {id: 92, cat: TV/Anime, desc: "TV-Kids"}
- {id: 52, cat: TV/SD, desc: "TV-SDx264"}
- {id: 53, cat: TV/WEB-DL, desc: "TV-WEB-DL"}
- {id: 55, cat: TV/HD, desc: "TV-X264"}
- {id: 47, cat: TV/HD, desc: "TV Bluray"}
- {id: 48, cat: TV/SD, desc: "TV Dvd-R"}
- {id: 49, cat: TV/SD, desc: "TV DVDRiP"}
- {id: 50, cat: TV, desc: "TV Packs"}
- {id: 92, cat: TV, desc: "TV Kids"}
- {id: 112, cat: TV, desc: "TV Juvenil"}
- {id: 52, cat: TV/SD, desc: "TV SDx264"}
- {id: 53, cat: TV/WEB-DL, desc: "TV WEB-DL"}
- {id: 55, cat: TV/HD, desc: "TV X264"}
- {id: 56, cat: TV/SD, desc: "TV-XViD"}
- {id: 44, cat: TV, desc: "Miscellaneous"}
- {id: 51, cat: TV/Anime, desc: "Anime"}
- {id: 54, cat: Audio/Audiobook, desc: "Audiobook"}
- {id: 57, cat: Books, desc: "E-Books"}
- {id: 58, cat: Books/Comics, desc: "Comics"}
- {id: 59, cat: Books, desc: "Educational"}
- {id: 60, cat: Books, desc: "Magazines/Journals"}
- {id: 7, cat: Audio, desc: "Music"}
- {id: 20, cat: Audio/Video, desc: "Music MVideo"}
- {id: 21, cat: Audio/MP3, desc: "Music MP3"}
- {id: 33, cat: Audio/Other, desc: "Music MP4"}
- {id: 32, cat: Audio/Lossless, desc: "Music FLAC"}
- {id: 2, cat: Console, desc: "Games"}
- {id: 78, cat: PC/Games, desc: "Games Linux"}
- {id: 79, cat: PC/Mac, desc: "Games MacOSX"}
- {id: 28, cat: Console/NDS, desc: "Games Nintendo DS"}
- {id: 27, cat: PC/Games, desc: "Games PC/Windows"}
- {id: 80, cat: Console/PS3, desc: "Games PS2"}
- {id: 81, cat: Console/PS3, desc: "Games PS3"}
- {id: 82, cat: Console/PS4, desc: "Games PS4"}
- {id: 83, cat: Console/PSP, desc: "Games PSP"}
- {id: 95, cat: Console/PSVita, desc: "Games PSVITA"}
- {id: 4, cat: Console/Wii, desc: "Games Wii"}
- {id: 26, cat: Console/Xbox360, desc: "Games XBOX360"}
- {id: 84, cat: Console/Xbox, desc: "Games XONE"}
- {id: 6, cat: PC, desc: "Applications"}
- {id: 18, cat: PC/ISO, desc: "Applications PC"}
- {id: 19, cat: PC/Mac, desc: "Applications Macintosh"}
- {id: 34, cat: PC/ISO, desc: "Applications Linux"}
- {id: 44, cat: Other, desc: "Miscellaneous"}
- {id: 54, cat: Audio/Audiobook, desc: "Books Audiobook"}
- {id: 57, cat: Books, desc: "Books E-Books"}
- {id: 58, cat: Books/Comics, desc: "Books Comics"}
- {id: 59, cat: Books, desc: "Books Educational"}
- {id: 60, cat: Books, desc: "Books Magazines/Journals"}
- {id: 61, cat: Other, desc: "Pics/Wallpapers"}
- {id: 62, cat: PC/Phone-Android, desc: "Android"}
- {id: 63, cat: PC/Phone-IOS, desc: "iOS"}
- {id: 66, cat: PC/Phone-Other, desc: "WindowsPhone"}
- {id: 90, cat: Other, desc: "GPS"}
- {id: 68, cat: Other, desc: "Others"}
- {id: 100, cat: Other, desc: "Revistas"}
- {id: 109, cat: TV/Anime, desc: "Anime"}
- {id: 51, cat: TV/Anime, desc: "Anime Filmes"}
- {id: 99, cat: TV/Anime, desc: "Anime Hentai"}
- {id: 110, cat: TV/Anime, desc: "Anime TV Séries"}
- {id: 41, cat: XXX, desc: "XXX"}
- {id: 64, cat: XXX, desc: "XXX-Magazines"}
- {id: 65, cat: XXX, desc: "XXX-Movies"}
@@ -85,6 +95,34 @@
modes:
search: [q]
tv-search: [q, season, ep]
movie-search: [q]
settings:
- name: username
type: text
label: Username
- name: password
type: password
label: Password
- name: info
type: info
label: Layout
default: "<ol><li>Only the English Classic profile is supported.<li>Make sure to set the <b>Torrent Listing (Lista de Torrents)</b> option in your profile to <b>Classic (Clássico)</b><li>Using the <i>Moderna</i> theme will prevent results.</ol>"
- name: sort
type: select
label: Sort requested from site
default: "added"
options:
"added": "created"
"seeders": "seeders"
"size": "size"
- name: type
type: select
label: Order requested from site
default: "desc"
options:
"desc": "desc"
"asc": "asc"
login:
path: ?p=home&pid=1
@@ -92,7 +130,7 @@
form: form#loginbox_form
submitpath: /ajax/login.php
inputs:
action: "login"
action: login
loginbox_membername: "{{ .Config.username }}"
loginbox_password: "{{ .Config.password }}"
loginbox_remember: 1
@@ -121,6 +159,8 @@
keywords: "{{ .Keywords }}"
search_type: name
searchin: title
"sortOptions[sortBy]": "{{ .Config.sort }}"
"sortOptions[sortOrder]": "{{ .Config.type }}"
error:
- selector: div.error:not(:contains("Não existem resultados encontrados.")):not(:contains("There are no results found."))

View File

@@ -27,24 +27,23 @@
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:
path: login.php
method: form
form: form[action="takelogin.php"]
captcha:
type: image
selector: img[alt="CAPTCHA"]
input: imagestring
method: cookie
inputs:
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
error:
- selector: td.embedded:has(h2:contains("登錄失敗"))
- selector: td.embedded:has(h2:contains("失败"))
cookie: "{{ .Config.cookie }}"
test:
path: index.php
selector: a[href="logout.php"]
search:
paths:
- path: torrents.php

View File

@@ -1,9 +1,9 @@
---
site: film-paleis
name: Film-Paleis
description: "Film-Paleis is a DUTCH Semi-Private Torrent Tracker for MOVIES / TV / GENERAL"
description: "Film-Paleis is a DUTCH Private Torrent Tracker for MOVIES / TV / GENERAL"
language: nl-NL
type: semi-private
type: private
encoding: UTF-8
links:
- https://www.film-paleis.me/
@@ -39,6 +39,21 @@
tv-search: [q, season, ep]
movie-search: [q]
settings:
- name: username
type: text
label: Username
- name: password
type: password
label: Password
- name: thankyou
type: text
label: Thank You Comment
- name: info
type: info
label: Thank you comment
default: This site requires you to leave a Thank You comment before you can download. Enter your personalised comment above. Minimum of at least 10 characters.
login:
path: takelogin.php
method: post
@@ -51,6 +66,18 @@
path: /
selector: a[href="logout.php"]
download:
before:
path: comment.php
method: post
inputs:
action: add
tid: "{{ .DownloadUri.Query.id }}"
text: "{{ .Config.thankyou }}"
submit: Opslaan
selector: a[href^="download.php?id="]
attribute: href
search:
paths:
- path: browse.php
@@ -79,9 +106,6 @@
download:
selector: a[href^="details.php?id="]
attribute: href
filters:
- name: replace
args: ["details", "download"]
size:
selector: td:nth-child(4) table tr td:nth-child(2)
filters:

View File

@@ -1,11 +1,9 @@
---
# By LA5T for https://gay-torrents.org (29.07.2018 22:55 UTC+2)
#
site: gay-torrentsorg
name: gay-torrents.org
description: "Gay-Torrents.org is a Private Torrent Tracker for GAY XXX"
language: en-us
type: semi-private
type: private
encoding: UTF-8
links:
- https://gay-torrents.org/
@@ -148,4 +146,5 @@
"*": 1
uploadvolumefactor:
case:
"*": 1
"*": 1
# engine tbd

View File

@@ -1,9 +1,9 @@
---
site: hddolby
name: HDDolby
description: "HD Dolby is a CHINESE Semi-Private Torrent Tracker for HD MOVIES / TV / GENERAL"
description: "HD Dolby is a CHINESE Private Torrent Tracker for HD MOVIES / TV / GENERAL"
language: zh-cn
type: semi-private
type: private
encoding: UTF-8
links:
- https://www.hddolby.com/

View File

@@ -6,6 +6,8 @@
type: public
encoding: UTF-8
links:
- https://www.moviesdvdr.co/
legacylinks:
- https://www.moviesdvdr.me/
caps:

View File

@@ -1,9 +1,9 @@
---
site: prostylex
name: ProStyleX
description: "ProStyleX is a Public torrent site for 0Day and General"
description: "ProStyleX is a Semi-Private torrent site for 0Day and General"
language: en-us
type: public
type: semi-private
encoding: UTF-8
links:
- https://prostylex.org/
@@ -72,13 +72,12 @@
movie-search: [q]
settings:
- name: cookie
- name: username
type: text
label: Cookie
- name: info
type: info
label: How to get the Cookie
default: "<ol><li>Access to this tracker with 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>"
label: Username
- name: password
type: password
label: Password
- name: sort
type: select
label: Sort requested from site
@@ -97,9 +96,14 @@
"asc": "asc"
login:
method: cookie
path: account-login.php
method: post
inputs:
cookie: "{{ .Config.cookie }}"
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
remember: yes
error:
- selector: div.myFrame:contains("Access Denied")
test:
path: torrents-search.php

View File

@@ -16,6 +16,7 @@
- {id: 2, cat: TV/Sport, desc: "Documentaries TV"}
- {id: 3, cat: TV/Sport, desc: "DTM"}
- {id: 22, cat: TV/Sport, desc: "Formula 2"}
- {id: 23, cat: TV/Sport, desc: "Formula E"}
- {id: 24, cat: TV/Sport, desc: "Misc"}
- {id: 25, cat: TV/Sport, desc: "Other Bikes"}
- {id: 26, cat: TV/Sport, desc: "MotoGP 2-3-E"}
@@ -42,6 +43,8 @@
- {id: 76, cat: TV/Sport, desc: "ARCA"}
- {id: 77, cat: TV/Sport, desc: "Blancpain GT"}
- {id: 78, cat: TV/Sport, desc: "Porsche Supercup"}
- {id: 79, cat: TV/Sport, desc: "TV Series"}
- {id: 80, cat: TV/Sport, desc: "Touring Cars"}
modes:
search: [q]
@@ -95,7 +98,7 @@
search:
paths:
- path: filterTorrents
- path: torrents/filter
inputs:
$raw: "{{ range .Categories }}categories[]={{.}}&{{end}}"
search: "{{ if .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
@@ -118,7 +121,7 @@
attribute: href
filters:
- name: regexp
args: "/categories/.*?\\.(\\d+)"
args: "/categories/(\\d+)"
title:
selector: a.view-torrent
download:
@@ -127,6 +130,13 @@
details:
selector: a.view-torrent
attribute: href
banner:
optional: true
selector: div.torrent-poster img
attribute: src
filters:
- name: replace
args: ["https://via.placeholder.com/600x900", ""]
comments:
selector: a[href*="#comments"]
attribute: href
@@ -195,4 +205,4 @@
i[class*="fa-globe text-green"]: 2 # Global Double Upload
i[class*="fa-certificate text-pink"]: 2 # Featured Torrent
"*": 1
# UNIT3D 1.9.4
# UNIT3D 2.2.7

View File

@@ -75,16 +75,24 @@
# "asc": "asc"
login:
path: sbg_login_new.php
method: form
path: index.php?page=login
method: post
inputs:
uid: "{{ .Config.username }}"
pwd: "{{ .Config.password }}"
error:
- selector: div.altertBoxStyle:contains("Passwort falsch")
- selector: div.altertBoxStyle:contains("Benutzername falsch")
- selector: body[onLoad^="makeAlert('"]
message:
selector: body[onLoad^="makeAlert('"]
attribute: onLoad
filters:
- name: replace
args: ["makeAlert('Error' , '", ""]
- name: replace
args: ["');", ""]
test:
path: index.php
selector: a[href="logout.php"]
download:
selector: a[href^="download.php?id="]

View File

@@ -7,7 +7,7 @@
encoding: UTF-8
followredirect: true
links:
- https://www.torrent9.so/
- https://www.torrent9.pl/
legacylinks:
- https://www.torrents9.pw/
@@ -31,6 +31,7 @@
- https://www.t9.re/
- https://www.t9.vc/
- https://www.torrent9.ai/
- https://www.torrent9.so/
caps:
categorymappings:

File diff suppressed because it is too large Load Diff

View File

@@ -118,6 +118,14 @@ namespace Jackett.Common.Indexers
case "text":
item = new StringItem { Value = Setting.Default };
break;
case "multi-select":
if (Setting.Options == null)
{
throw new Exception("Options must be given for the 'multi-select' type.");
}
item = new CheckboxItem(Setting.Options) { Values = Setting.Defaults };
break;
case "select":
if (Setting.Options == null)
{
@@ -201,21 +209,30 @@ namespace Jackett.Common.Indexers
variables[".Config.sitelink"] = SiteLink;
foreach (var Setting in Definition.Settings)
{
string value;
var item = configData.GetDynamic(Setting.Name);
if (item.GetType() == typeof(BoolItem))
// CheckBox item is an array of strings
if (item.GetType() == typeof(CheckboxItem))
{
value = (((BoolItem)item).Value == true ? "true" : "");
}
else if (item.GetType() == typeof(SelectItem))
{
value = ((SelectItem)item).Value;
variables[".Config." + Setting.Name] = ((CheckboxItem)item).Values;
}
else
{
value = ((StringItem)item).Value;
string value;
if (item.GetType() == typeof(BoolItem))
{
value = (((BoolItem)item).Value == true ? "true" : "");
}
else if (item.GetType() == typeof(SelectItem))
{
value = ((SelectItem)item).Value;
}
else
{
value = ((StringItem)item).Value;
}
variables[".Config." + Setting.Name] = value;
}
variables[".Config." + Setting.Name] = value;
}
return variables;
}
@@ -1235,7 +1252,7 @@ namespace Jackett.Common.Indexers
variables[".Query.Keywords"] = string.Join(" ", KeywordTokens);
variables[".Keywords"] = applyFilters((string)variables[".Query.Keywords"], Search.Keywordsfilters);
// TODO: prepare queries first and then send them parallel
// TODO: prepare queries first and then send them parallel
var SearchPaths = Search.Paths;
foreach (var SearchPath in SearchPaths)
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Jackett.Common.Models;
using Jackett.Common.Models.IndexerConfig;
using Jackett.Common.Models.IndexerConfig.Bespoke;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
@@ -17,9 +17,9 @@ namespace Jackett.Common.Indexers
{
private string APIUrl { get { return SiteLink + "api/"; } }
private new ConfigurationDataUserPasskey configData
private new ConfigurationDataHDBitsApi configData
{
get { return (ConfigurationDataUserPasskey)base.configData; }
get { return (ConfigurationDataHDBitsApi)base.configData; }
set { base.configData = value; }
}
@@ -32,7 +32,7 @@ namespace Jackett.Common.Indexers
client: wc,
logger: l,
p: ps,
configData: new ConfigurationDataUserPasskey())
configData: new ConfigurationDataHDBitsApi())
{
Encoding = Encoding.UTF8;
Language = "en-us";
@@ -99,6 +99,26 @@ namespace Jackett.Common.Indexers
}
}
if (configData.Codecs.Values.Length > 0)
{
requestData["codec"] = new JArray();
foreach (var codec in configData.Codecs.Values)
{
requestData["codec"].Add(new JValue(int.Parse(codec)));
}
}
if (configData.Mediums.Values.Length > 0)
{
requestData["medium"] = new JArray();
foreach (var medium in configData.Mediums.Values)
{
requestData["medium"].Add(new JValue(int.Parse(medium)));
}
}
requestData["limit"] = 100;
var response = await MakeApiRequest("torrents", requestData);

View File

@@ -10,7 +10,6 @@ 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.Linq;
using NLog;
@@ -18,8 +17,6 @@ namespace Jackett.Common.Indexers
{
public class IPTorrents : BaseWebIndexer
{
private string LoginUrl => SiteLink + "login.php";
private string TakeLoginUrl => SiteLink + "take_login.php";
private string BrowseUrl => SiteLink + "t";
public override string[] AlternativeSiteLinks { get; protected set; } = {
@@ -45,9 +42,9 @@ namespace Jackett.Common.Indexers
"https://ipt.world/",
};
private new ConfigurationDataRecaptchaLogin configData
private new ConfigurationDataCookie configData
{
get => (ConfigurationDataRecaptchaLogin)base.configData;
get => (ConfigurationDataCookie)base.configData;
set => base.configData = value;
}
@@ -60,7 +57,7 @@ namespace Jackett.Common.Indexers
client: wc,
logger: l,
p: ps,
configData: new ConfigurationDataRecaptchaLogin())
configData: new ConfigurationDataCookie())
{
Encoding = Encoding.UTF8;
Language = "en-us";
@@ -142,83 +139,26 @@ namespace Jackett.Common.Indexers
AddCategoryMapping(84, TorznabCatType.XXXImageset, "XXX/Pics/Wallpapers");
}
public override async Task<ConfigurationData> GetConfigurationForSetup()
{
var loginPage = await RequestStringWithCookies(LoginUrl, string.Empty);
CQ cq = loginPage.Content;
var captcha = cq.Find(".g-recaptcha");
if (captcha.Any())
{
var result = configData;
result.CookieHeader.Value = loginPage.Cookies;
result.Captcha.SiteKey = captcha.Attr("data-sitekey");
result.Captcha.Version = "2";
return result;
}
else
{
var result = new ConfigurationDataBasicLogin
{
SiteLink = { Value = configData.SiteLink.Value },
Instructions = { Value = configData.Instructions.Value },
Username = { Value = configData.Username.Value },
Password = { Value = configData.Password.Value },
CookieHeader = { Value = loginPage.Cookies }
};
return result;
}
}
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
{
LoadValuesFromJson(configJson);
var pairs = new Dictionary<string, string> {
{ "username", configData.Username.Value },
{ "password", configData.Password.Value },
{ "g-recaptcha-response", configData.Captcha.Value }
};
if (!string.IsNullOrWhiteSpace(configData.Captcha.Cookie))
CookieHeader = configData.Cookie.Value;
try
{
CookieHeader = configData.Captcha.Cookie;
try
{
var results = await PerformQuery(new TorznabQuery());
if (!results.Any())
throw new Exception("Your cookie did not work");
var results = await PerformQuery(new TorznabQuery());
if (!results.Any())
throw new Exception("Your cookie did not work");
IsConfigured = true;
SaveConfig();
return IndexerConfigurationStatus.Completed;
}
catch (Exception e)
{
IsConfigured = false;
throw new Exception("Your cookie did not work: " + e.Message);
}
IsConfigured = true;
SaveConfig();
return IndexerConfigurationStatus.Completed;
}
var request = new Utils.Clients.WebRequest()
catch (Exception e)
{
Url = TakeLoginUrl,
Type = RequestType.POST,
Referer = SiteLink,
Encoding = Encoding,
PostData = pairs
};
var response = await webclient.GetString(request);
var firstCallCookies = response.Cookies;
// Redirect to ? then to /t
await FollowIfRedirect(response, request.Url, null, firstCallCookies);
await ConfigureIfOK(firstCallCookies, response.Content.Contains("/lout.php"), () =>
{
CQ dom = response.Content;
var messageEl = dom["body > div"].First();
var errorMessage = messageEl.Any() ? messageEl.Text().Trim() : response.Content;
throw new ExceptionWithConfigData(errorMessage, configData);
});
return IndexerConfigurationStatus.RequiresTesting;
IsConfigured = false;
throw new Exception("Your cookie did not work: " + e.Message);
}
}
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)

View File

@@ -78,7 +78,7 @@ namespace Jackett.Common.Indexers
var releases = new List<ReleaseInfo>();
var searchString = query.GetQueryString();
if (string.IsNullOrEmpty(searchString))
searchString = "%";
searchString = "2020";
var queryCollection = new NameValueCollection();

View File

@@ -4,6 +4,7 @@ namespace Jackett.Common.Models.DTO
{
public string id { get; set; }
public string value { get; set; }
public string[] values { get; set; } // for array data (e.g. checkboxes)
public string cookie { get; set; } // for cookie alternative login (captcha needed + remote host)
public string challenge { get; set; } // for reCaptcha V1 compatibility
public string version { get; set; } // for reCaptcha V1 compatibility

View File

@@ -0,0 +1,34 @@
using System.Collections.Generic;
namespace Jackett.Common.Models.IndexerConfig.Bespoke
{
internal class ConfigurationDataHDBitsApi : ConfigurationDataUserPasskey
{
public CheckboxItem Codecs { get; private set; }
public CheckboxItem Mediums { get; private set; }
public ConfigurationDataHDBitsApi(): base()
{
Codecs = new CheckboxItem(new Dictionary<string, string>()
{
{"1", "H.264"},
{"5", "HEVC"},
{"2", "MPEG-2"},
{"3", "VC-1"},
{"6", "VP9"},
{"4", "XviD"}
})
{ Name = "Codec", Values = new string[]{ "1", "5", "2", "3", "6", "4" } };
Mediums = new CheckboxItem(new Dictionary<string, string>()
{
{"1", "Blu-ray/HD DVD"},
{"4", "Capture"},
{"3", "Encode"},
{"5", "Remux"},
{"6", "WEB-DL"}
})
{ Name = "Medium", Values = new string[]{ "1", "4", "3", "5", "6" } };
}
}
}

View File

@@ -16,6 +16,7 @@ namespace Jackett.Common.Models.IndexerConfig
{
InputString,
InputBool,
InputCheckbox,
InputSelect,
DisplayImage,
DisplayInfo,
@@ -83,6 +84,11 @@ namespace Jackett.Common.Models.IndexerConfig
case ItemType.InputBool:
((BoolItem)item).Value = arrItem.Value<bool>("value");
break;
case ItemType.InputCheckbox:
var values = arrItem.Value<JArray>("values");
if (values != null)
((CheckboxItem)item).Values = values.Values<string>().ToArray();
break;
case ItemType.InputSelect:
((SelectItem)item).Value = arrItem.Value<string>("value");
break;
@@ -130,6 +136,15 @@ namespace Jackett.Common.Models.IndexerConfig
case ItemType.InputBool:
jObject["value"] = ((BoolItem)item).Value;
break;
case ItemType.InputCheckbox:
jObject["values"] = new JArray(((CheckboxItem)item).Values);
jObject["options"] = new JObject();
foreach (var option in ((CheckboxItem)item).Options)
{
jObject["options"][option.Key] = option.Value;
}
break;
case ItemType.InputSelect:
jObject["value"] = ((SelectItem)item).Value;
jObject["options"] = new JObject();
@@ -166,7 +181,7 @@ namespace Jackett.Common.Models.IndexerConfig
if (!forDisplay)
{
properties = properties
.Where(p => p.ItemType == ItemType.HiddenData || p.ItemType == ItemType.InputBool || p.ItemType == ItemType.InputString || p.ItemType == ItemType.InputSelect || p.ItemType == ItemType.Recaptcha || p.ItemType == ItemType.DisplayInfo)
.Where(p => p.ItemType == ItemType.HiddenData || p.ItemType == ItemType.InputBool || p.ItemType == ItemType.InputString || p.ItemType == ItemType.InputCheckbox || p.ItemType == ItemType.InputSelect || p.ItemType == ItemType.Recaptcha || p.ItemType == ItemType.DisplayInfo)
.ToList();
}
@@ -260,6 +275,19 @@ namespace Jackett.Common.Models.IndexerConfig
}
}
public class CheckboxItem : Item
{
public string[] Values { get; set; }
public Dictionary<string, string> Options { get; }
public CheckboxItem(Dictionary<string, string> options)
{
ItemType = ItemType.InputCheckbox;
Options = options;
}
}
public class SelectItem : Item
{
public string Value { get; set; }

View File

@@ -4,21 +4,16 @@ namespace Jackett.Common.Models.IndexerConfig
public class ConfigurationDataCookie : ConfigurationData
{
public StringItem Cookie { get; private set; }
public DisplayItem CookieHint { get; private set; }
public DisplayItem CookieExample { get; private set; }
public DisplayItem CookieInstructions { get; private set; }
public ConfigurationDataCookie()
{
Cookie = new StringItem { Name = "Cookie" };
CookieHint = new DisplayItem(
"<ol><li>Login to this tracker in your browser <li>Open the developer console, go the network tab <li>Find 'cookie' in the request headers <li>Copy & paste it to here</ol>")
CookieInstructions = new DisplayItem(
"Please enter the cookie for the site manually. <a href=\"https://github.com/Jackett/Jackett/wiki/Finding-cookies\" target=\"_blank\">See here</a> on how get the cookies." +
"<br>Example cookie header (usually longer than this):<br><code>PHPSESSID=8rk27odm; ipsconnect_63ad9c=1; more_stuff=etc;</code>")
{
Name = "CookieHint"
};
CookieExample = new DisplayItem(
"Example cookie header (usually longer than this):<br><code>PHPSESSID=8rk27odm; ipsconnect_63ad9c=1; more_stuff=etc;</code>")
{
Name = "CookieExample"
Name = "Cookie Instructions"
};
}
}

View File

@@ -83,6 +83,7 @@ namespace Jackett.Common.Models
public string Type { get; set; }
public string Label { get; set; }
public string Default { get; set; }
public string[] Defaults { get; set; }
public Dictionary<string, string> Options { get; set; }
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
@@ -198,48 +198,52 @@ namespace Jackett.Server.Services
Environment.Exit(2);
}
// check if the certificate store was initialized using Mono.Security.X509.X509StoreManager.TrustedRootCertificates.Count
try
if (monoVersionO.Major < 6)
{
var monoSecurity = Assembly.Load("Mono.Security");
var monoX509StoreManager = monoSecurity.GetType("Mono.Security.X509.X509StoreManager");
if (monoX509StoreManager != null)
//We don't check on Mono 6 since Mono.Security was removed
// check if the certificate store was initialized using Mono.Security.X509.X509StoreManager.TrustedRootCertificates.Count
try
{
var TrustedRootCertificatesProperty = monoX509StoreManager.GetProperty("TrustedRootCertificates");
var TrustedRootCertificates = (ICollection)TrustedRootCertificatesProperty.GetValue(null);
logger.Info("TrustedRootCertificates count: " + TrustedRootCertificates.Count);
if (TrustedRootCertificates.Count == 0)
var monoSecurity = Assembly.Load("Mono.Security");
var monoX509StoreManager = monoSecurity.GetType("Mono.Security.X509.X509StoreManager");
if (monoX509StoreManager != null)
{
var CACertificatesFiles = new string[] {
var TrustedRootCertificatesProperty = monoX509StoreManager.GetProperty("TrustedRootCertificates");
var TrustedRootCertificates = (ICollection)TrustedRootCertificatesProperty.GetValue(null);
logger.Info("TrustedRootCertificates count: " + TrustedRootCertificates.Count);
if (TrustedRootCertificates.Count == 0)
{
var CACertificatesFiles = new string[] {
"/etc/ssl/certs/ca-certificates.crt", // Debian based
"/etc/pki/tls/certs/ca-bundle.c", // RedHat based
"/etc/ssl/ca-bundle.pem", // SUSE
};
var notice = "The mono certificate store is not initialized.<br/>\n";
var logSpacer = " ";
var CACertificatesFile = CACertificatesFiles.Where(f => File.Exists(f)).FirstOrDefault();
var CommandRoot = "curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync /dev/stdin";
var CommandUser = "curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin";
if (CACertificatesFile != null)
{
CommandRoot = "cert-sync " + CACertificatesFile;
CommandUser = "cert-sync --user " + CACertificatesFile;
var notice = "The mono certificate store is not initialized.<br/>\n";
var logSpacer = " ";
var CACertificatesFile = CACertificatesFiles.Where(f => File.Exists(f)).FirstOrDefault();
var CommandRoot = "curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync /dev/stdin";
var CommandUser = "curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin";
if (CACertificatesFile != null)
{
CommandRoot = "cert-sync " + CACertificatesFile;
CommandUser = "cert-sync --user " + CACertificatesFile;
}
notice += logSpacer + "Please run the following command as root:<br/>\n";
notice += logSpacer + "<pre>" + CommandRoot + "</pre><br/>\n";
notice += logSpacer + "If you don't have root access or you're running MacOS, please run the following command as the jackett user (" + Environment.UserName + "):<br/>\n";
notice += logSpacer + "<pre>" + CommandUser + "</pre>";
_notices.Add(notice);
logger.Error(Regex.Replace(notice, "<.*?>", string.Empty));
}
notice += logSpacer + "Please run the following command as root:<br/>\n";
notice += logSpacer + "<pre>" + CommandRoot + "</pre><br/>\n";
notice += logSpacer + "If you don't have root access or you're running MacOS, please run the following command as the jackett user (" + Environment.UserName + "):<br/>\n";
notice += logSpacer + "<pre>" + CommandUser + "</pre>";
_notices.Add(notice);
logger.Error(Regex.Replace(notice, "<.*?>", string.Empty));
}
}
}
catch (Exception e)
{
logger.Error(e, "Error while chekcing the mono certificate store");
catch (Exception e)
{
logger.Error(e, "Error while chekcing the mono certificate store");
}
}
}

View File

@@ -48,7 +48,6 @@ namespace Jackett.Server
options.AccessDeniedPath = new PathString("/UI/Login");
options.LogoutPath = new PathString("/UI/Logout");
options.Cookie.Name = "Jackett";
options.Cookie.SameSite = SameSiteMode.None;
});

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<OutputType>WinExe</OutputType>
<AssemblyName>JackettService</AssemblyName>
<ApplicationIcon>jackett.ico</ApplicationIcon>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>JackettTray</AssemblyName>

View File

@@ -5,8 +5,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE7B0C8A-6144-47CD-821E-B09BA1B7BADE}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
..\appveyor.yml = ..\appveyor.yml
..\build.cake = ..\build.cake
..\Installer.iss = ..\Installer.iss
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md