mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Merge branch 'master' of https://github.com/Jackett/Jackett
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
# Declare files that will always have LF line endings on checkout.
|
# Declare files that will always have LF line endings on checkout.
|
||||||
*.yml text eol=lf
|
*.yml text eol=lf
|
||||||
|
*.sh text eol=lf
|
||||||
|
|
||||||
# Declare files that will always have CRLF line endings on checkout.
|
# Declare files that will always have CRLF line endings on checkout.
|
||||||
*.cs text eol=crlf
|
*.cs text eol=crlf
|
||||||
|
@@ -461,7 +461,7 @@ All contributions are welcome just send a pull request. Jackett's framework all
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
|
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
|
||||||
* Open the Jackett solution in Visual Studio 2017 (version 15.7 or above)
|
* Open the Jackett solution in Visual Studio 2017 (version 15.8 or above)
|
||||||
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
|
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
|
||||||
* Select Jackett.Server as startup project
|
* Select Jackett.Server as startup project
|
||||||
* In the drop down menu of the run button select "Jackett.Server" instead of "IIS Express"
|
* In the drop down menu of the run button select "Jackett.Server" instead of "IIS Express"
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
version: 0.10.{build}
|
version: 0.10.{build}
|
||||||
skip_tags: true
|
skip_tags: true
|
||||||
image: Visual Studio 2017
|
image:
|
||||||
|
- Visual Studio 2017
|
||||||
|
- Ubuntu
|
||||||
|
environment:
|
||||||
|
APPVEYOR_YML_DISABLE_PS_LINUX: true
|
||||||
configuration: Release
|
configuration: Release
|
||||||
assembly_info:
|
assembly_info:
|
||||||
patch: true
|
patch: true
|
||||||
@@ -17,7 +21,8 @@ dotnet_csproj:
|
|||||||
file_version: '{version}'
|
file_version: '{version}'
|
||||||
informational_version: '{version}'
|
informational_version: '{version}'
|
||||||
build_script:
|
build_script:
|
||||||
- ps: .\build.ps1
|
- ps: .\build.ps1 --target=Default
|
||||||
|
- sh: ./build.sh --target=Linux
|
||||||
test: off
|
test: off
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- ps: ${env:release_description} = ( Get-Content -LiteralPath BuildOutput/ReleaseNotes.txt -Encoding UTF8 ) -join "`n";
|
- ps: ${env:release_description} = ( Get-Content -LiteralPath BuildOutput/ReleaseNotes.txt -Encoding UTF8 ) -join "`n";
|
||||||
|
131
build.cake
131
build.cake
@@ -25,8 +25,17 @@ Task("Info")
|
|||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
Information(@"Jackett Cake build script starting...");
|
Information(@"Jackett Cake build script starting...");
|
||||||
Information(@"Requires InnoSetup and C:\cygwin to be present for packaging (Pre-installed on AppVeyor)");
|
Information(@"Requires InnoSetup and C:\cygwin to be present for packaging (Pre-installed on AppVeyor) on Windows");
|
||||||
Information(@"Working directory is: " + workingDir);
|
Information(@"Working directory is: " + workingDir);
|
||||||
|
|
||||||
|
if (IsRunningOnWindows())
|
||||||
|
{
|
||||||
|
Information("Platform is Windows");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Information("Platform is Linux, Windows builds will be skipped");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Clean")
|
Task("Clean")
|
||||||
@@ -39,6 +48,8 @@ Task("Clean")
|
|||||||
CleanDirectories("./" + artifactsDirName);
|
CleanDirectories("./" + artifactsDirName);
|
||||||
CleanDirectories("./" + testResultsDirName);
|
CleanDirectories("./" + testResultsDirName);
|
||||||
|
|
||||||
|
CreateDirectory("./" + artifactsDirName);
|
||||||
|
|
||||||
Information("Clean completed");
|
Information("Clean completed");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -67,29 +78,14 @@ Task("Run-Unit-Tests")
|
|||||||
Results = new[] { new NUnit3Result { FileName = resultsFile } }
|
Results = new[] { new NUnit3Result { FileName = resultsFile } }
|
||||||
});
|
});
|
||||||
|
|
||||||
if(AppVeyor.IsRunningOnAppVeyor)
|
if (AppVeyor.IsRunningOnAppVeyor && IsRunningOnWindows())
|
||||||
{
|
{
|
||||||
AppVeyor.UploadTestResults(resultsFile, AppVeyorTestResultsType.NUnit3);
|
AppVeyor.UploadTestResults(resultsFile, AppVeyorTestResultsType.NUnit3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Check-Packaging-Platform")
|
|
||||||
.IsDependentOn("Run-Unit-Tests")
|
|
||||||
.Does(() =>
|
|
||||||
{
|
|
||||||
if (IsRunningOnWindows())
|
|
||||||
{
|
|
||||||
CreateDirectory("./" + artifactsDirName);
|
|
||||||
Information("Platform is Windows");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new Exception("Packaging is currently only implemented for a Windows environment");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Package-Windows-Full-Framework")
|
Task("Package-Windows-Full-Framework")
|
||||||
.IsDependentOn("Check-Packaging-Platform")
|
.IsDependentOn("Run-Unit-Tests")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||||
@@ -119,7 +115,7 @@ Task("Package-Windows-Full-Framework")
|
|||||||
});
|
});
|
||||||
|
|
||||||
Task("Package-Mono-Full-Framework")
|
Task("Package-Mono-Full-Framework")
|
||||||
.IsDependentOn("Check-Packaging-Platform")
|
.IsDependentOn("Run-Unit-Tests")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||||
@@ -149,7 +145,7 @@ Task("Package-Mono-Full-Framework")
|
|||||||
});
|
});
|
||||||
|
|
||||||
Task("Experimental-DotNetCore")
|
Task("Experimental-DotNetCore")
|
||||||
.IsDependentOn("Check-Packaging-Platform")
|
.IsDependentOn("Clean")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||||
@@ -165,20 +161,11 @@ Task("Experimental-DotNetCore")
|
|||||||
Gzip("./BuildOutput/Experimental/netcoreapp2.2/linux-arm", $"./{artifactsDirName}", "Jackett", "Experimental.netcoreapp.linux-arm.tar.gz");
|
Gzip("./BuildOutput/Experimental/netcoreapp2.2/linux-arm", $"./{artifactsDirName}", "Jackett", "Experimental.netcoreapp.linux-arm.tar.gz");
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Package")
|
|
||||||
.IsDependentOn("Package-Windows-Full-Framework")
|
|
||||||
.IsDependentOn("Package-Mono-Full-Framework")
|
|
||||||
.IsDependentOn("Experimental-DotNetCore")
|
|
||||||
.Does(() =>
|
|
||||||
{
|
|
||||||
Information("Packaging completed");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Appveyor-Push-Artifacts")
|
Task("Appveyor-Push-Artifacts")
|
||||||
.IsDependentOn("Package")
|
.IsDependentOn("Clean")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
if (AppVeyor.IsRunningOnAppVeyor)
|
if (AppVeyor.IsRunningOnAppVeyor && IsRunningOnWindows())
|
||||||
{
|
{
|
||||||
foreach (var file in GetFiles(workingDir + $"/{artifactsDirName}/*"))
|
foreach (var file in GetFiles(workingDir + $"/{artifactsDirName}/*"))
|
||||||
{
|
{
|
||||||
@@ -187,12 +174,12 @@ Task("Appveyor-Push-Artifacts")
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Information(@"Skipping as not running in AppVeyor Environment");
|
Information(@"Skipping artifact push as not running in AppVeyor Windows Environment");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Release-Notes")
|
Task("Release-Notes")
|
||||||
.IsDependentOn("Appveyor-Push-Artifacts")
|
.IsDependentOn("Clean")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
string latestTag = GitDescribe(".", false, GitDescribeStrategy.Tags, 0);
|
string latestTag = GitDescribe(".", false, GitDescribeStrategy.Tags, 0);
|
||||||
@@ -230,7 +217,7 @@ Task("Release-Notes")
|
|||||||
string buildNote = String.Join(Environment.NewLine, notesList);
|
string buildNote = String.Join(Environment.NewLine, notesList);
|
||||||
Information(buildNote);
|
Information(buildNote);
|
||||||
|
|
||||||
System.IO.File.WriteAllLines(workingDir + "\\BuildOutput\\ReleaseNotes.txt", notesList.ToArray());
|
System.IO.File.WriteAllLines(workingDir + "/BuildOutput/ReleaseNotes.txt", notesList.ToArray());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -239,6 +226,26 @@ Task("Release-Notes")
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Task("Windows-Environment")
|
||||||
|
.IsDependentOn("Package-Windows-Full-Framework")
|
||||||
|
.IsDependentOn("Package-Mono-Full-Framework")
|
||||||
|
.IsDependentOn("Experimental-DotNetCore")
|
||||||
|
.IsDependentOn("Appveyor-Push-Artifacts")
|
||||||
|
.IsDependentOn("Release-Notes")
|
||||||
|
.Does(() =>
|
||||||
|
{
|
||||||
|
Information("Windows-Environment Task Completed");
|
||||||
|
});
|
||||||
|
|
||||||
|
Task("Linux-Environment")
|
||||||
|
.IsDependentOn("Experimental-DotNetCore")
|
||||||
|
.IsDependentOn("Appveyor-Push-Artifacts")
|
||||||
|
.IsDependentOn("Release-Notes")
|
||||||
|
.Does(() =>
|
||||||
|
{
|
||||||
|
Information("Linux-Environment Task Completed");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
private void RunCygwinCommand(string utility, string utilityArguments)
|
private void RunCygwinCommand(string utility, string utilityArguments)
|
||||||
{
|
{
|
||||||
@@ -285,29 +292,52 @@ private string RelativeWinPathToCygPath(string relativePath)
|
|||||||
return cygPath;
|
return cygPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
private void Gzip(string sourceFolder, string outputDirectory, string tarCdirectoryOption, string outputFileName)
|
||||||
{
|
{
|
||||||
var cygSourcePath = RelativeWinPathToCygPath(sourceFolder);
|
|
||||||
var tarFileName = outputFileName.Remove(outputFileName.Length - 3, 3);
|
var tarFileName = outputFileName.Remove(outputFileName.Length - 3, 3);
|
||||||
var tarArguments = @"-cvf " + cygSourcePath + "/" + tarFileName + " -C " + cygSourcePath + $" {tarCdirectoryOption} --mode ='755'";
|
|
||||||
var gzipArguments = @"-k " + cygSourcePath + "/" + tarFileName;
|
|
||||||
|
|
||||||
RunCygwinCommand("Tar", tarArguments);
|
if (IsRunningOnWindows())
|
||||||
RunCygwinCommand("Gzip", gzipArguments);
|
{
|
||||||
|
var cygSourcePath = RelativeWinPathToCygPath(sourceFolder);
|
||||||
|
var tarArguments = @"-cvf " + cygSourcePath + "/" + tarFileName + " -C " + cygSourcePath + $" {tarCdirectoryOption} --mode ='755'";
|
||||||
|
var gzipArguments = @"-k " + cygSourcePath + "/" + tarFileName;
|
||||||
|
|
||||||
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
|
RunCygwinCommand("Tar", tarArguments);
|
||||||
|
RunCygwinCommand("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("tar", $"-C {sourceFolder} -zcvf {outputDirectory}/{tarFileName}.gz Jackett");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DotNetCorePublish(string projectPath, string framework, string runtime)
|
private void DotNetCorePublish(string projectPath, string framework, string runtime)
|
||||||
{
|
{
|
||||||
var settings = new DotNetCorePublishSettings
|
var settings = new DotNetCorePublishSettings
|
||||||
{
|
{
|
||||||
Framework = framework,
|
Framework = framework,
|
||||||
Runtime = runtime,
|
Runtime = runtime,
|
||||||
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
|
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
|
||||||
};
|
};
|
||||||
|
|
||||||
DotNetCorePublish(projectPath, settings);
|
DotNetCorePublish(projectPath, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
@@ -315,12 +345,19 @@ private void DotNetCorePublish(string projectPath, string framework, string runt
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
Task("Default")
|
Task("Default")
|
||||||
.IsDependentOn("Release-Notes")
|
.IsDependentOn("Windows-Environment")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
Information("Default Task Completed");
|
Information("Default Task Completed");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Task("Linux")
|
||||||
|
.IsDependentOn("Linux-Environment")
|
||||||
|
.Does(() =>
|
||||||
|
{
|
||||||
|
Information("Linux Task Completed");
|
||||||
|
});
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// EXECUTION
|
// EXECUTION
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
25
build.ps1
25
build.ps1
@@ -25,10 +25,6 @@ Specifies the amount of information to be displayed.
|
|||||||
Shows description about tasks.
|
Shows description about tasks.
|
||||||
.PARAMETER DryRun
|
.PARAMETER DryRun
|
||||||
Performs a dry run.
|
Performs a dry run.
|
||||||
.PARAMETER Experimental
|
|
||||||
Uses the nightly builds of the Roslyn script engine.
|
|
||||||
.PARAMETER Mono
|
|
||||||
Uses the Mono Compiler rather than the Roslyn script engine.
|
|
||||||
.PARAMETER SkipToolPackageRestore
|
.PARAMETER SkipToolPackageRestore
|
||||||
Skips restoring of packages.
|
Skips restoring of packages.
|
||||||
.PARAMETER ScriptArgs
|
.PARAMETER ScriptArgs
|
||||||
@@ -49,13 +45,25 @@ Param(
|
|||||||
[switch]$ShowDescription,
|
[switch]$ShowDescription,
|
||||||
[Alias("WhatIf", "Noop")]
|
[Alias("WhatIf", "Noop")]
|
||||||
[switch]$DryRun,
|
[switch]$DryRun,
|
||||||
[switch]$Experimental,
|
|
||||||
[switch]$Mono,
|
|
||||||
[switch]$SkipToolPackageRestore,
|
[switch]$SkipToolPackageRestore,
|
||||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||||
[string[]]$ScriptArgs
|
[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
|
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
|
||||||
function MD5HashFile([string] $filePath)
|
function MD5HashFile([string] $filePath)
|
||||||
{
|
{
|
||||||
@@ -118,7 +126,8 @@ if (!(Test-Path $PACKAGES_CONFIG)) {
|
|||||||
Write-Verbose -Message "Downloading packages.config..."
|
Write-Verbose -Message "Downloading packages.config..."
|
||||||
try {
|
try {
|
||||||
$wc = GetProxyEnabledWebClient
|
$wc = GetProxyEnabledWebClient
|
||||||
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
|
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG)
|
||||||
|
} catch {
|
||||||
Throw "Could not download packages.config."
|
Throw "Could not download packages.config."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -225,8 +234,6 @@ if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
|
|||||||
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
||||||
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
||||||
if ($DryRun) { $cakeArguments += "-dryrun" }
|
if ($DryRun) { $cakeArguments += "-dryrun" }
|
||||||
if ($Experimental) { $cakeArguments += "-experimental" }
|
|
||||||
if ($Mono) { $cakeArguments += "-mono" }
|
|
||||||
$cakeArguments += $ScriptArgs
|
$cakeArguments += $ScriptArgs
|
||||||
|
|
||||||
# Start Cake
|
# Start Cake
|
||||||
|
117
build.sh
Executable file
117
build.sh
Executable file
@@ -0,0 +1,117 @@
|
|||||||
|
#!/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[@]}"
|
@@ -131,6 +131,10 @@
|
|||||||
type: checkbox
|
type: checkbox
|
||||||
label: Replace VOSTFR with ENGLISH
|
label: Replace VOSTFR with ENGLISH
|
||||||
default: false
|
default: false
|
||||||
|
- name: enhancedAnime
|
||||||
|
type: checkbox
|
||||||
|
label: Enhance sonarr compatibility with anime by renaming episode (xxx to exxx). Works only if episode is at the end of the query. Can disturb movies search. (back to the future 3 -> back to the future e3)
|
||||||
|
default: false
|
||||||
login:
|
login:
|
||||||
method: form
|
method: form
|
||||||
path: /
|
path: /
|
||||||
@@ -147,8 +151,8 @@
|
|||||||
|
|
||||||
search:
|
search:
|
||||||
paths:
|
paths:
|
||||||
- path: "/engine/search?category={{ .Config.category }}&name={{ .Keywords }}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date"
|
- path: "/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: "/engine/search?category={{ .Config.category }}&name={{ .Keywords }}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50"
|
- path: "/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:
|
rows:
|
||||||
selector: "table.table > tbody > tr"
|
selector: "table.table > tbody > tr"
|
||||||
|
@@ -236,7 +236,7 @@ namespace Jackett.Common.Indexers
|
|||||||
banner.Remove();
|
banner.Remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip.QuerySelector("div:contains(\"Total Hits : \")").Remove();
|
tooltip.QuerySelector("div:contains(\"Total Hits\")").Remove();
|
||||||
|
|
||||||
var longtitle = tooltip.QuerySelectorAll("div").First();
|
var longtitle = tooltip.QuerySelectorAll("div").First();
|
||||||
release.Title = longtitle.TextContent;
|
release.Title = longtitle.TextContent;
|
||||||
|
@@ -36,7 +36,7 @@ namespace Jackett.Common.Indexers
|
|||||||
client: w,
|
client: w,
|
||||||
logger: l,
|
logger: l,
|
||||||
p: ps,
|
p: ps,
|
||||||
configData: new ConfigurationDataBasicLogin())
|
configData: new ConfigurationDataCookie())
|
||||||
{
|
{
|
||||||
Encoding = Encoding.UTF8;
|
Encoding = Encoding.UTF8;
|
||||||
Language = "sv-sw";
|
Language = "sv-sw";
|
||||||
|
Reference in New Issue
Block a user