Compare commits

..

38 Commits

Author SHA1 Message Date
Garfield69
4e1d7ac09b Revert "eztv: fetch magnets from details page. resolves #4813"
This reverts commit a84b1dce4d.
2019-03-06 13:00:28 +13:00
flightlevel
b8aa2a16dd Make execute permission conditional on .NET Core 2019-03-05 22:09:20 +11:00
flightlevel
cf7ca97f9c Make jackett and JackettUpdater executable 2019-03-05 21:25:37 +11:00
Garfield69
cc01b0ca05 add sharingue a Brazilian private tracker. resolves #4817 2019-03-05 19:37:46 +13:00
Garfield69
a84b1dce4d eztv: fetch magnets from details page. resolves #4813 2019-03-05 07:25:56 +13:00
flightlevel
be54f1a532 Fix copy/paste error 2019-03-04 17:52:17 +11:00
flightlevel
064786f379 Disable macOS .NET Core builds for now 2019-03-04 17:44:05 +11:00
Garfield69
9d140b3ab4 beyondhd: set freeleech resolves #4809 2019-03-04 15:40:10 +13:00
Garfield69
a65d855cc4 torrent-turk: fix login form. resolves #4334
switch to new domain .co
also added missing cxategories
fix date processing
add missing volumefactors
2019-03-04 15:34:23 +13:00
Garfield69
2698ac2907 torrentgalaxyorg: new result selectors. resolves #4805 2019-03-04 08:33:41 +13:00
Garfield69
28971c2303 scenerush: add categories. resolves #1775
correct login error meesage detection
upgrade to https
correct date parsing
switch browse post to get
2019-03-04 07:23:30 +13:00
Garfield69
6428a7134b classix: use alternate method of andmatch. for #4788 2019-03-04 06:00:02 +13:00
flightlevel
b33f5764ef Perform Linux build first 2019-03-03 17:42:09 +11:00
flightlevel
ebb855bf45 Release notes for linux 2019-03-03 17:32:47 +11:00
flightlevel
9e90edd397 Linux release notes 2019-03-03 17:22:34 +11:00
flightlevel
ee2743cdc9 Re-enable Windows building 2019-03-03 17:06:14 +11:00
flightlevel
a9731b036c Update file permissions 2019-03-03 16:53:40 +11:00
flightlevel
58ed5421ec Appveyor.yml: Fix casing 2019-03-03 16:35:00 +11:00
flightlevel
dc25480844 Appveyor test casing 2019-03-03 16:31:16 +11:00
flightlevel
789d168648 Build.cake line endings 2019-03-03 16:19:00 +11:00
flightlevel
f6668c9777 Test linux only build 2019-03-03 16:09:55 +11:00
flightlevel
5903e6abdf Enable updater for .NET Core on macOS 2019-03-03 16:09:17 +11:00
flightlevel
0de4c1da43 Push artifacts on Appveyor Linux 2019-03-03 15:51:59 +11:00
flightlevel
53bd7ce0c4 Updater: Add logic for .NET Core 2019-03-03 15:44:18 +11:00
flightlevel
4d4c9fe645 Improve build instructions 2019-03-03 15:32:55 +11:00
flightlevel
caf583a684 Package update 2019-03-03 15:23:33 +11:00
flightlevel
b445072a4d TVStore: Throw exception 2019-03-03 15:09:51 +11:00
flightlevel
82617f961d Force Github update deploy
Trying to avoid downloading artifacts in the second Appveyor job
2019-03-03 15:09:26 +11:00
flightlevel
c28df96332 Build updater for .NET Core macOS 2019-03-03 15:01:07 +11:00
Garfield69
88c6c4af6e classix: add andmatch. resolves #4788 2019-03-02 17:13:22 +13:00
Garfield69
df49bb8578 asiancinema: fix #4798 2019-03-02 13:15:39 +13:00
Garfield69
a968913bc4 add pthome a chinese private tracker. resolves #4795 2019-03-02 09:09:04 +13:00
Jorman
5c9880e410 ilcorsaronero: new domain .live (#4794)
Changed domain
2019-03-01 10:29:48 +13:00
morpheus133
d7af20d4f6 ncore: add offset support (#4792) resolves #4778
* add offset support to ncore indexer
* small correction related to add .hun tag to torrents
* DivideByZeroException  at torrent_per_page
2019-03-01 07:23:00 +13:00
xfouloux
8dc832d64a yggtorrent: tidy up keyword processing (#4791)
trimed stuff on .Keyword in keywordsfilters instead of re_replace in path because it caused having %20%20 in search .Keyword instead of having only one
2019-02-28 22:06:40 +13:00
Garfield69
91b87ee7be 7tor: fix TEST mode for #4784
the getnew search does not appear to be working any longer, so in no keywords are supplied we will use  TEST instead. Not ideal but better than no-results = error.
2019-02-28 13:19:19 +13:00
Garfield69
ee8fc6a78f bigtorrent: fix TEST mode for #1219
and also return a login error message
2019-02-28 10:05:20 +13:00
Garfield69
18f48cb04b icetorrent: attempt to fix for #4783 2019-02-28 09:42:23 +13:00
24 changed files with 516 additions and 126 deletions

View File

@@ -271,6 +271,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* Psytorrents
* PT99
* PTFiles (PTF)
* PThome
* PuntoTorrent
* PWTorrents (PWT)
* Racing4Everyone (R4E)
@@ -292,6 +293,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* Secret Cinema
* Shareisland
* ShareSpaceDB
* Sharingue
* Shazbat
* Shellife (SL)
* SpaceTorrent
@@ -514,6 +516,8 @@ All contributions are welcome just send a pull request.
### Windows
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
* Clone Jackett
* From the `src` directory, run `dotnet restore`
* Open the Jackett solution in Visual Studio 2017 (version 15.9 or above)
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
* Select Jackett.Server as startup project

View File

@@ -1,8 +1,8 @@
version: 0.10.{build}
skip_tags: true
image:
- Visual Studio 2017
image:
- Ubuntu
- Visual Studio 2017
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
configuration: Release
@@ -28,12 +28,13 @@ before_deploy:
- ps: ${env:release_description} = ( Get-Content -LiteralPath BuildOutput/ReleaseNotes.txt -Encoding UTF8 ) -join "`n";
deploy:
- provider: GitHub
tag: v$(appveyor_build_version)
tag: v$(APPVEYOR_BUILD_VERSION)
description: $(release_description)
auth_token:
secure: hOg+16YTIbq4kO9u4D1YVOTbWDqgCX6mAQYMbnmBBSw2CiUsZh7OKbupoUb3FtWa
artifact: /^(?:(?![Ee]xperimental).)*$/
draft: true
force_update: true
on:
branch: master
notifications:

View File

@@ -14,9 +14,11 @@ var configuration = Argument("configuration", "Debug");
// Define directories.
var workingDir = MakeAbsolute(Directory("./"));
var artifactsDirName = "Artifacts";
var testResultsDirName = "TestResults";
var netCoreFramework = "netcoreapp2.2";
string artifactsDirName = "Artifacts";
string testResultsDirName = "TestResults";
string netCoreFramework = "netcoreapp2.2";
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string updaterProjectPath = "./src/Jackett.Updater/Jackett.Updater.csproj";
//////////////////////////////////////////////////////////////////////
// TASKS
@@ -89,7 +91,6 @@ Task("Package-Windows-Full-Framework")
.IsDependentOn("Run-Unit-Tests")
.Does(() =>
{
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string buildOutputPath = "./BuildOutput/net461/win7-x86/Jackett";
DotNetCorePublish(serverProjectPath, "net461", "win7-x86", buildOutputPath);
@@ -119,7 +120,6 @@ Task("Package-Mono-Full-Framework")
.IsDependentOn("Run-Unit-Tests")
.Does(() =>
{
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string buildOutputPath = "./BuildOutput/net461/linux-x64/Jackett";
DotNetCorePublish(serverProjectPath, "net461", "linux-x64", buildOutputPath);
@@ -154,30 +154,38 @@ Task("Package-DotNetCore-macOS")
.Does(() =>
{
string runtimeId = "osx-x64";
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
string updaterOutputPath = buildOutputPath + "/Updater";
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
DeleteDirectory(updaterOutputPath, recursive:true);
CopyFileToDirectory("./install_service_macos", buildOutputPath);
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Experimental.Jackett.Binaries.macOS.tar.gz");
});
Task("Package-DotNetCore-LinuxAMD64")
Task("Package-DotNetCore-LinuxAMDx64")
.IsDependentOn("Clean")
.Does(() =>
{
string runtimeId = "linux-x64";
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
string updaterOutputPath = buildOutputPath + "/Updater";
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
DeleteDirectory(updaterOutputPath, recursive:true);
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
CopyFileToDirectory("./Upstart.config", buildOutputPath);
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Experimental.Jackett.Binaries.LinuxAMD64.tar.gz");
Gzip($"./BuildOutput/{netCoreFramework}/{runtimeId}", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.LinuxAMDx64.tar.gz");
});
Task("Package-DotNetCore-LinuxARM32")
@@ -185,11 +193,15 @@ Task("Package-DotNetCore-LinuxARM32")
.Does(() =>
{
string runtimeId = "linux-arm";
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
string updaterOutputPath = buildOutputPath + "/Updater";
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
DeleteDirectory(updaterOutputPath, recursive:true);
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
CopyFileToDirectory("./Upstart.config", buildOutputPath);
@@ -201,11 +213,15 @@ Task("Package-DotNetCore-LinuxARM64")
.Does(() =>
{
string runtimeId = "linux-arm64";
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
string buildOutputPath = $"./BuildOutput/{netCoreFramework}/{runtimeId}/Jackett";
string updaterOutputPath = buildOutputPath + "/Updater";
DotNetCorePublish(serverProjectPath, netCoreFramework, runtimeId, buildOutputPath);
DotNetCorePublish(updaterProjectPath, netCoreFramework, runtimeId, updaterOutputPath);
CopyFiles(updaterOutputPath + "/JackettUpdater*", buildOutputPath);
DeleteDirectory(updaterOutputPath, recursive:true);
CopyFileToDirectory("./install_service_systemd.sh", buildOutputPath);
CopyFileToDirectory("./Upstart.config", buildOutputPath);
@@ -216,7 +232,7 @@ Task("Appveyor-Push-Artifacts")
.IsDependentOn("Clean")
.Does(() =>
{
if (AppVeyor.IsRunningOnAppVeyor && IsRunningOnWindows())
if (AppVeyor.IsRunningOnAppVeyor)
{
foreach (var file in GetFiles(workingDir + $"/{artifactsDirName}/*"))
{
@@ -280,10 +296,10 @@ Task("Release-Notes")
Task("Windows-Environment")
.IsDependentOn("Package-Windows-Full-Framework")
.IsDependentOn("Package-Mono-Full-Framework")
.IsDependentOn("Package-DotNetCore-macOS")
.IsDependentOn("Package-DotNetCore-LinuxAMD64")
.IsDependentOn("Package-DotNetCore-LinuxARM32")
.IsDependentOn("Package-DotNetCore-LinuxARM64")
//.IsDependentOn("Package-DotNetCore-macOS")
//.IsDependentOn("Package-DotNetCore-LinuxAMDx64")
//.IsDependentOn("Package-DotNetCore-LinuxARM32")
//.IsDependentOn("Package-DotNetCore-LinuxARM64")
.IsDependentOn("Appveyor-Push-Artifacts")
.IsDependentOn("Release-Notes")
.Does(() =>
@@ -293,7 +309,7 @@ Task("Windows-Environment")
Task("Linux-Environment")
.IsDependentOn("Package-DotNetCore-macOS")
.IsDependentOn("Package-DotNetCore-LinuxAMD64")
.IsDependentOn("Package-DotNetCore-LinuxAMDx64")
.IsDependentOn("Package-DotNetCore-LinuxARM32")
.IsDependentOn("Package-DotNetCore-LinuxARM64")
.IsDependentOn("Appveyor-Push-Artifacts")
@@ -380,7 +396,8 @@ private void Gzip(string sourceFolder, string outputDirectory, string tarCdirect
{
RunLinuxCommand("find", MakeAbsolute(Directory(sourceFolder)) + @" -type d -exec chmod 755 {} \;");
RunLinuxCommand("find", MakeAbsolute(Directory(sourceFolder)) + @" -type f -exec chmod 644 {} \;");
//RunLinuxCommand("chmod", $"755 {MakeAbsolute(Directory(sourceFolder))} /Jackett/jackett");
RunLinuxCommand("chmod", $"755 {MakeAbsolute(Directory(sourceFolder))}/Jackett/jackett");
RunLinuxCommand("chmod", $"755 {MakeAbsolute(Directory(sourceFolder))}/Jackett/JackettUpdater");
RunLinuxCommand("tar", $"-C {sourceFolder} -zcvf {outputDirectory}/{tarFileName}.gz {tarCdirectoryOption}");
}
}

View File

@@ -48,11 +48,11 @@
selector: table > tbody > tr
fields:
category:
selector: a[href*="/categories/"]
selector: a[href*="/category/"]
attribute: href
filters:
- name: regexp
args: "/categories/.*?\\.(\\d+)"
args: "/category/.*?\\.(\\d+)"
title:
selector: a.view-torrent
download:

View File

@@ -49,7 +49,7 @@
sent: "yes"
returnto: "/"
error:
- selector: table:contains("Login failed!")
- selector: div.error
test:
path: index.php
@@ -61,7 +61,7 @@
- path: browse.php
inputs:
$raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
search: "{{ .Query.Keywords }}"
search: "{{if .Keywords}}{{ .Keywords }}{{else}} {{end}}"
rows:
selector: table#torrent_table > tbody > tr:has(a[href^="browse.php?cat="])
fields:

View File

@@ -34,7 +34,7 @@
- path: torrents-search.php
inputs:
$raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
search: "{{ .Query.Keywords }}"
search: "{{if .Keywords}}\"{{.Keywords}}\"{{else}}{{end}}"
rows:
selector: table > tbody > tr:has(a[href^="torrents.php?cat="])
fields:

View File

@@ -26,7 +26,7 @@
- {id: 26, cat: PC/Games, desc: "Games/PC"}
- {id: 38, cat: PC/Phone-Other, desc: "Mobile"}
- {id: 59, cat: Movies/3D, desc: "Movies/3D"}
- {id: 92, cat: Movies/HD, desc: "Movies/4K-UHD"}
- {id: 92, cat: Movies/UHD, desc: "Movies/4K-UHD"}
- {id: 32, cat: Movies/BluRay, desc: "Movies/Blu-Ray"}
- {id: 28, cat: Movies/DVD, desc: "Movies/DVD"}
- {id: 42, cat: Movies/HD, desc: "Movies/HD-x264"}
@@ -79,7 +79,7 @@
incldead: 1
search_by: "{{ if .Query.IMDBID }}imdb{{else}}name{{end}}"
rows:
selector: table.torrenttable > tbody > tr:has(a[title][href^="details.php?id="])
selector: table.table-striped > tbody > tr:has(a[title][href^="details.php?id="])
fields:
title:
selector: a[title][href^="details.php?id="]
@@ -93,13 +93,10 @@
filters:
- name: querystring
args: cat
imdb:
selector: a[title="IMDB"]
attribute: href
banner:
attribute: rel
imdb:
selector: a[href^="http://www.imdb.com/title/"]
selector: a[href*="https://www.imdb.com/title/"]
optional: true
attribute: href
download:
@@ -114,13 +111,10 @@
selector: td:has(a[href$="filelist=1#filelist"])
remove: a
date:
selector: td > span:has(i.fa-clock)
remove: b
selector: td > small:has(i.fa-clock)
filters:
- name: replace
args: ["\xA0", " "]
- name: replace
args: ["Added on ", ""]
- name: replace
args: ["st ", " "]
- name: replace
@@ -129,8 +123,8 @@
args: ["rd ", " "]
- name: replace
args: ["th ", " "]
- name: replace
args: [" by", ""]
- name: regexp
args: "(.+?) by"
- name: append
args: " +02:00"
- name: dateparse
@@ -145,6 +139,3 @@
uploadvolumefactor:
case:
"*": "1"
description:
selector: td:has(a[title][href^="details.php?id="])
remove: a[title][href^="details.php?id="], div, font:contains("Added on")

View File

@@ -6,8 +6,9 @@
type: public
encoding: UTF-8
links:
- https://ilcorsaronero.vip/
- https://ilcorsaronero.live/
legacylinks:
- https://ilcorsaronero.vip/
- https://ilcorsaronero.info/
- https://ilcorsaronero.ch/
- https://ilcorsaronero.cc/

View File

@@ -0,0 +1,123 @@
---
site: pthome
name: PThome
description: "PThome is a CHINESE Private Torrent Tracker for 0DAY / GENERAL"
language: zh-CN
type: private
encoding: UTF-8
followredirect: true
links:
- https://www.pthome.net/
caps:
categorymappings:
- {id: 401, cat: Movies, desc: "Movies(电影)"}
- {id: 404, cat: TV/Documentary, desc: "Documentaries(记录片)"}
- {id: 405, cat: TV/Anime, desc: "Animations(动漫)"}
- {id: 402, cat: TV, desc: "TV Series(电视剧)"}
- {id: 403, cat: TV/OTHER, desc: "TV Shows(综艺)"}
- {id: 406, cat: Audio/Video, desc: "Music Videos(MV)"}
- {id: 407, cat: TV/Sport, desc: "Sports(体育)"}
- {id: 408, cat: Audio/Lossless, desc: "HQ Audio(音乐)"}
- {id: 410, cat: Console, desc: "Games(游戏)"}
- {id: 411, cat: PC, desc: "Software(软件)"}
- {id: 412, cat: Books, desc: "Study(学习)"}
- {id: 409, cat: Other, desc: "Misc(其他)"}
modes:
search: [q]
tv-search: [q, season, ep, imdbid]
movie-search: [q, imdbid]
settings:
- name: cookie
type: text
label: Cookie
- name: info
type: info
label: How to get the Cookie
default: "<ol><li>Login to this tracker in your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button<li>Refresh the page by pressing <b>F5</b><li>Select the <b>Headers</b> tab<li>Find 'cookie:' in the <b>Request Headers</b> section<li>Copy & paste the whole cookie string to here</ol>"
login:
method: cookie
inputs:
cookie: "{{ .Config.cookie }}"
test:
path: index.php
ratio:
path: index.php
selector: table tr td.bottom
filters:
- name: replace
args: ["分享率:","Ratio:"] # for simplified chinese language setting
- name: regexp
args: "Ratio:\\s(.*?)\\s\\s"
search:
paths:
- path: torrents.php
inputs:
$raw: "{{range .Categories}}cat{{.}}=1&{{end}}"
incldead: "0"
spstate: "0"
inclbookmarked: "0"
search: "{{if .Query.IMDBID}}{{.Query.IMDBID}}{{else}}{{.Keywords}}{{end}}"
search_area: "{{if .Query.IMDBID}}4{{else}}0{{end}}"
search_mode: "0"
rows:
selector: table.torrents tr:has(a[href^="?cat="])
filters:
- name: andmatch
fields:
title:
selector: td.torrents-box a
attribute: title
category:
selector: a[href^="?cat="]
attribute: href
filters:
- name: querystring
args: cat
details:
selector: a[href^="details.php?id="]
attribute: href
download:
selector: a[href^="details.php?id="]
attribute: href
filters:
- name: replace
args: ["details.php", "download.php"]
imdb:
selector: a[href^="http://www.imdb.com/title/tt"]
attribute: href
size:
selector: td:nth-child(5)
grabs:
selector: td:nth-child(8)
seeders:
selector: td:nth-child(6)
leechers:
selector: td:nth-child(7)
date:
selector: td:nth-child(4) span
attribute: title
filters:
- name: dateparse
args: "2006-01-02 15:04:05"
downloadvolumefactor:
case:
img.pro_free: "0"
img.pro_free2up: "0"
img.pro_50pctdown: "0.5"
img.pro_50pctdown2up: "0.5"
img.pro_30pctdown: "0.3"
"*": "1"
uploadvolumefactor:
case:
img.pro_50pctdown2up: "2"
img.pro_free2up: "2"
img.pro_2up: "2"
"*": "1"

View File

@@ -1,40 +1,54 @@
---
site: scenerush
name: SceneRush
description: "SceneRush is a Portuguese general tracker."
description: "SceneRush is a PORTUGUESE Private Torrent Tracker for 0DAY / GENERAL"
language: pt-PT
type: private
encoding: UTF-8
links:
- https://www.scene-rush.pt/
legacylinks:
- http://www.scene-rush.pt/
caps:
categorymappings:
- {id: 1, cat: PC, desc: "Apps"}
- {id: 2, cat: Movies, desc: "XVID"}
- {id: 3, cat: Movies/DVD, desc: "DVD"}
- {id: 4, cat: TV, desc: "TV XVID"}
- {id: 5, cat: PC/Games, desc: "PC Games"}
- {id: 6, cat: Movies/HD, desc: "HD"}
- {id: 7, cat: XXX, desc: "XXX"}
- {id: 8, cat: TV/Anime, desc: "ANIME"}
- {id: 8, cat: TV/Anime, desc: "Anime"}
- {id: 9, cat: Audio, desc: "Audio"}
- {id: 10, cat: Other, desc: "Other"}
- {id: 11, cat: Console/Xbox 360, desc: "XBOX 360"}
- {id: 12, cat: Console/PSP, desc: "PSP"}
- {id: 13, cat: TV/Documentary, desc: "DOC"}
- {id: 17, cat: TV/HD, desc: "TV-X264"}
- {id: 13, cat: TV/Documentary, desc: "Doc"}
- {id: 14, cat: Movies/DVD, desc: "Movies DVD"}
- {id: 15, cat: Console, desc: "PS2"}
- {id: 16, cat: TV/Sport, desc: "TV WWE"}
- {id: 17, cat: TV/HD, desc: "TV X264"}
- {id: 18, cat: TV, desc: "TV DVD"}
- {id: 19, cat: XXX/DVD, desc: "XXX DVD"}
- {id: 20, cat: Movies/DVD, desc: "A.DVD"}
- {id: 21, cat: PC/Mac, desc: "MAC"}
- {id: 20, cat: TV/Anime, desc: "Anime DVD"}
- {id: 21, cat: PC/Mac, desc: "Mac"}
- {id: 23, cat: Movies, desc: "Boxset"}
- {id: 31, cat: Other, desc: "OFF"}
- {id: 32, cat: Movies/BluRay, desc: "BluRay"}
- {id: 33, cat: Console/Wii, desc: "WII"}
- {id: 34, cat: Console/PS3, desc: "PS3"}
- {id: 35, cat: Movies/HD, desc: "A.HD"}
- {id: 35, cat: TV/Anime, desc: "Anime HD"}
- {id: 36, cat: PC/Phone-Android, desc: "Android"}
- {id: 37, cat: Movies/DVD, desc: "C.DVDR"}
- {id: 37, cat: Movies/DVD, desc: "Custom DVDR"}
- {id: 38, cat: Movies/Other, desc: "CAM TS"}
- {id: 39, cat: Other, desc: "GPS"}
- {id: 40, cat: Console/PS4, desc: "PS4"}
- {id: 41, cat: Movies/SD, desc: "BDRIP"}
- {id: 41, cat: Movies/BluRay, desc: "BDRIP"}
- {id: 42, cat: Movies/WEBDL, desc: "WEB DL"}
- {id: 43, cat: Books, desc: "EBOOK"}
- {id: 44, cat: TV/Sport, desc: "SPORTS"}
- {id: 43, cat: Books, desc: "Ebook"}
- {id: 44, cat: TV/Sport, desc: "Sports"}
- {id: 46, cat: Movies/UHD, desc: "4K"}
modes:
search: [q]
tv-search: [q]
@@ -45,18 +59,23 @@
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
error:
- selector: td.embedded:has(h2:contains("failed")+table)
- selector: h2:contains("Falhou")
message:
selector: table tr td.text
test:
path: browse.php
path: index.php
selector: a[href="logout.php"]
ratio:
path: browse.php
selector: td[width='60'][style=['text-align:center;'] > span > font
selector: td.text:contains("Ratio")
filters:
- name: regexp
args: "Ratio actual (.*?) ]"
search:
paths:
- path: browse.php
method: post
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{ .Query.Keywords }}"
@@ -93,7 +112,7 @@
- name: re_replace
args: ["(\\d{4}-\\d{2}-\\d{2})(\\d{2}:\\d{2}:\\d{2})","$1 $2"]
- name: dateparse
args: "2018-12-30 22:30:31"
args: "2006-01-02 15:04:05"
downloadvolumefactor:
case:
"i.fg-gold": "0"

View File

@@ -0,0 +1,124 @@
---
site: sharingue
name: Sharingue
description: "Sharingue is a BRAZILIAN Private Tracker for TV / MOVIES / ANIME / MUSIC"
language: pt-br
type: private
encoding: UTF-8
links:
- https://www.sharingue.live/
caps:
categorymappings:
- {id: 1, cat: Movies, desc: "Movies (Filmes)"}
- {id: 3, cat: Audio, desc: "Music (Músicas)"}
- {id: 4, cat: TV, desc: "TV (Séries)"}
- {id: 5, cat: TV/Anime, desc: "Anime (Animes)"}
modes:
search: [q]
tv-search: [q, season, ep, imdbid]
movie-search: [q, imdbid]
login:
path: login
method: form
inputs:
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
remember: 1
selectorinputs:
_token:
selector: meta[name="csrf-token"]
attribute: content
error:
- selector: form[action$="/login"] .text-red
test:
path: /
selector: a[href$="/logout"]
ratio:
path: /
selector: span:has(i.fa-sync-alt)
filters:
- name: regexp
args: "Ratio : (\\d+)"
search:
paths:
- path: filterTorrents
inputs:
$raw: "{{range .Categories}}categories[]={{.}}&{{end}}"
search: "{{if .Query.IMDBID}}{{else}}{{ .Keywords }}{{end}}"
uploader: ""
imdb: "{{ .Query.IMDBIDShort }}"
tvdb: ""
tmdb: ""
mal: ""
sort: created_at
direction: desc
qty: 100
rows:
selector: table > tbody > tr
fields:
category:
selector: a[href*="/categories/"]
attribute: href
filters:
- name: regexp
args: "/categories/.*?\\.(\\d+)"
title:
selector: a.view-torrent
download:
selector: a[href*="/download/"]
attribute: href
details:
selector: a.view-torrent
attribute: href
size:
selector: td:nth-child(5)
seeders:
selector: td:nth-child(7)
leechers:
selector: td:nth-child(8)
grabs:
selector: td:nth-child(6)
filters:
- name: regexp
args: ([\d\.]+)
date:
selector: time
filters:
# translations for Turkish|Estonian|Danish|Italian|Polish|Norwegian|Portoguese|Czech|Russian|Romanian|Spanish|French|German|Bulgarian|Dutch
- name: re_replace
args: ["(önce|tagasi|geleden|fa|temu|siden|atrás|nazpět|назад|acum|hace|il y a|vor|преди)", "ago"]
- name: re_replace
args: ["(dakika|minut|minuto|minuta|minutt|минута|Minute|minuut)", "minute"]
- name: re_replace
args: ["(dakika|minutit|minutter|minuti|minuty|minutos|минуты|минут|Minuten|минути|minuten)", "minutes"]
- name: re_replace
args: ["(saat|tund|time|ora|godzina|hora|hodina|час|oră|heure|Stunde|uur)", "hour"]
- name: re_replace
args: ["(saat|tundi|timer|ore|godziny|horas|hodiny|hoden|часа|часов|ore|heures|Stunden)", "hours"]
- name: re_replace
args: ["(gün|päev|dag|giorno|dzień|dia|den|день|zi|día|jour|Tag|ден)", "day"]
- name: re_replace
args: ["(gün|päeva|dage|giorni|dni|dias|dny|дня|дней|zile|días|jours|Tagen|дни|dagen)", "days"]
- name: re_replace
args: ["(hafta|nädal|uge|settimana|tydzień|uke|semana|týden|неделю|săptămână|semaine|Woche|седмица)", "week"]
- name: re_replace
args: ["(hafta|nädalat|uger|settimane|tygodnie|uker|semanas|týdny|недели|недель|săptămâni|semaines|Wochen|седмици|weken)", "weeks"]
- name: re_replace
args: [" (ay|kuu|måned|mese|miesiąc|mês|měsíc|месяц|lună|mes|mois|Monat|месец|maand)", "month"]
- name: re_replace
args: [" (ay|kuud|måneder|mesi|miesiące|meses|měsíce|месяца|месяцев|luni|meses|mois|Monaten|месеца|maanden)", "months"]
downloadvolumefactor:
case:
"i[data-original-title=\"100% Free\"]": "0" # Single Torrent Freeleech
"i[data-original-title=\"Global freeleech\"]": "0" # Global Freeleech
"*": "1"
uploadvolumefactor:
case:
"i[data-original-title=\"Double upload\"]": "2" # Single Torrent Double Upload
"i[data-original-title=\"Double Upload\"]": "2" # Global Double Upload
"*": "1"

View File

@@ -6,6 +6,8 @@
type: private
encoding: UTF-8
links:
- https://torrent-turk.co/
legacylinks:
- https://torrent-turk.org/
caps:
@@ -13,23 +15,43 @@
- {id: 149, cat: Movies, desc: "Movies/Turkish"}
- {id: 151, cat: Movies/HD, desc: "Movies/Turkish/1080p"}
- {id: 152, cat: Movies/HD, desc: "Movies/Turkish/720p"}
- {id: 153, cat: Movies/DVD, desc: "Movies/Turkish/DVD5-DVD9"}
- {id: 154, cat: Movies/WEBDL, desc: "Movies/Turkish/BRRip-HDRip-DVDRip-WebDL"}
- {id: 155, cat: Movies/Other, desc: "Movies/Turkish/Boxset"}
- {id: 156, cat: Movies, desc: "Movies/Foreign"}
- {id: 157, cat: Movies/UHD, desc: "Movies/Foreign/4K"}
- {id: 157, cat: Movies/UHD, desc: "Movies/Foreign/4K / 3D"}
- {id: 159, cat: Movies/HD, desc: "Movies/Foreign/1080p"}
- {id: 160, cat: Movies/HD, desc: "Movies/Foreign/720p"}
- {id: 161, cat: Movies/DVD, desc: "Movies/Foreign/DVD5-DVD9"}
- {id: 162, cat: Movies/WEBDL, desc: "Movies/Foreign/BRRip-HDRip-DVDRip-WebDL"}
- {id: 163, cat: Movies/Other, desc: "Movies/Foreign/Boxset"}
- {id: 164, cat: TV, desc: "TV"}
- {id: 165, cat: TV, desc: "TV/Turkish"}
- {id: 166, cat: TV, desc: "TV/Foreign"}
- {id: 167, cat: TV/Other, desc: "TV Programs"}
- {id: 185, cat: TV/Documentary, desc: "TV/Documentary"}
- {id: 168, cat: TV/Other, desc: "TV/Other"}
- {id: 171, cat: Audio, desc: "Music"}
- {id: 172, cat: Audio, desc: "Music/Turkish"}
- {id: 173, cat: Audio, desc: "Music/Foreign"}
- {id: 184, cat: Audio, desc: "Music/Discography"}
- {id: 174, cat: Audio/Video, desc: "Music/Video"}
- {id: 175, cat: PC, desc: "Apps / Game / Graphics"}
- {id: 176, cat: PC, desc: "Apps"}
- {id: 177, cat: Other, desc: "Pictures"}
- {id: 183, cat: Books/Ebook, desc: "EBook"}
- {id: 178, cat: Books/Technical, desc: "Training Sets"}
- {id: 179, cat: PC, desc: "OS"}
- {id: 180, cat: PC/Games, desc: "PC/Games"}
- {id: 181, cat: Console, desc: "Playstation"}
modes:
search: [q]
tv-search: [q]
tv-search: [q, season, ep]
movie-search: [q]
settings:
@@ -42,18 +64,18 @@
- name: info
type: info
label: Layout
default: Only the classic profile is supported. Make sure to set the "Torrent listesi" option in your profile to "Klasik".
default: "<ol><li>Only the English Classic profile is supported.<li>Make sure to set the <b>Torrent Listing (Listeleme Biçimi)</b> option in your profile to <b>Classic (Klasik)</b><li>And set the <b>Language (Dil)</b> to <b>English</b><li>Using the <i>Modern</i> theme will prevent results, and using <i>Turkish</i> will prevent upload dates.</ol>"
login:
path: ?p=home&pid=1
method: form
form: form#loginbox_form
form: form#sls_form
submitpath: ajax/login.php
inputs:
action: "login"
loginbox_membername: "{{ .Config.username }}"
loginbox_password: "{{ .Config.password }}"
loginbox_remember: "true"
loginbox_remember: 1
selectorinputs:
securitytoken:
selector: "script:contains(\"stKey: \")"
@@ -98,6 +120,26 @@
download:
selector: a[href*="?p=torrents&pid=10&action=download"]
attribute: href
date:
optional: true
# Uploaded 30-01-2019 15:02 by
selector: td.torrent_name:not(:contains(" at "))
filters:
- name: regexp
args: "Uploaded (.+?) by"
- name: dateparse
args: "02-01-2006 15:04"
date:
optional: true
# Uploaded Friday at 05:11 by
# Uploaded Today at 00:48 by
# Uploaded Yesterday at 23:57 by
selector: td.torrent_name:contains(" at ")
filters:
- name: regexp
args: "Uploaded (.+?) by"
- name: replace
args: [" at ", " "]
size:
selector: a[rel="torrent_size"]
seeders:
@@ -113,11 +155,9 @@
downloadvolumefactor:
case:
"img[title=\"FREE!\"]": "0"
"img[title=\"Download Multiplier: 0.5\"]": "0.5"
"*": "1"
uploadvolumefactor:
case:
"img[title=\"Upload Multiplier: 2\"]": "2"
"*": "1"
date:
selector: td.torrent_name > abbr.timeago
optional: true
attribute: data-time

View File

@@ -66,39 +66,39 @@
selector: div[class="tgxtablerow clickable-row click"]
fields:
title:
selector: div.tgxtablecell:nth-child(3) div a
selector: div a[href^="/torrent/"]
attribute: title
category:
selector: div.tgxtablecell a
selector: div a[href^="/torrents.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
details:
selector: div.tgxtablecell:nth-child(3) div a
selector: div a[href^="/torrent/"]
attribute: href
download:
selector: div.tgxtablecell:nth-child(4) a
selector: div a[href*="/get/"]
attribute: href
magnet:
selector: div.tgxtablecell:nth-child(4) a:nth-child(2)
selector: div a[href^="magnet:?"]
attribute: href
size:
selector: div.tgxtablecell:nth-child(7) span
selector: div span[style^="border-radius"]
seeders:
selector: div.tgxtablecell:nth-child(10) span font b
selector: div span[title="Seeders/Leechers"] font b
leechers:
selector: div.tgxtablecell:nth-child(10) span font:nth-child(2) b
selector: div span[title="Seeders/Leechers"] font:nth-child(2) b
date:
# 20Mins ago
optional: true
selector: div.tgxtablecell:nth-child(11) small:contains("ago")
selector: div.tgxtablecell:last-of-type:contains("ago")
filters:
- name: timeago
date:
# 24/12/18 13:55
optional: true
selector: div.tgxtablecell:nth-child(11) small:contains(":")
selector: div.tgxtablecell:last-of-type small:contains(":")
filters:
- name: dateparse
args: "02/01/06 15:04"

View File

@@ -160,9 +160,10 @@
args: ["(.*)[sS](\\d{1,4})$", "$1"]
- name: replace
args: ["\"", ""]
- name: trim
paths:
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ re_replace .Keywords \"\\s\" \"\"\"\" }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date"
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ re_replace .Keywords \"\\s\" \"\"\"\" }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50"
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date"
- path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50"
rows:
selector: "table.table > tbody > tr"
fields:

View File

@@ -1617,23 +1617,22 @@ namespace Jackett.Common.Indexers
queryCollection.Add("t", "0");
queryCollection.Add("submit", "Search");
queryCollection.Add("sr", "topics");
//queryCollection.Add("sr", "posts");
//queryCollection.Add("ch", "99999");
// if the search string is empty use the getnew view
if (string.IsNullOrWhiteSpace(searchString))
{
queryCollection.Add("search_id", "newposts");
//queryCollection.Add("search_id", "newposts");
searchString = "test";
}
else // use the normal search
{
//else // use the normal search
//{
searchString = searchString.Replace("-", " ");
queryCollection.Add("terms", "all");
queryCollection.Add("keywords", searchString);
queryCollection.Add("author", "");
queryCollection.Add("sc", "1");
queryCollection.Add("sf", "titleonly");
}
//}
var searchUrl = SearchUrl + "?" + queryCollection.GetQueryString();
results = await RequestStringWithCookies(searchUrl);

View File

@@ -164,7 +164,7 @@ namespace Jackett.Common.Indexers
var grabs = qRow.Find("td:nth-child(9) > a").Get(0).FirstChild.ToString();
release.Grabs = ParseUtil.CoerceInt(grabs);
release.DownloadVolumeFactor = 1;
release.DownloadVolumeFactor = 0;
release.UploadVolumeFactor = 1;
releases.Add(release);

View File

@@ -117,7 +117,7 @@ namespace Jackett.Common.Indexers
return IndexerConfigurationStatus.RequiresTesting;
}
List<ReleaseInfo> parseTorrents(WebClientStringResult results, String seasonep, TorznabQuery query, int already_founded, int limit)
List<ReleaseInfo> parseTorrents(WebClientStringResult results, String seasonep, TorznabQuery query, int already_founded, int limit, int previously_parsed_on_page)
{
var releases = new List<ReleaseInfo>();
try
@@ -128,7 +128,7 @@ namespace Jackett.Common.Indexers
var rows = dom[".box_torrent_all"].Find(".box_torrent");
// Check torrents only till we reach the query Limit
for(int i=0; (i<rows.Length && ((already_founded + releases.Count) < limit )); i++)
for(int i= previously_parsed_on_page; (i<rows.Length && ((already_founded + releases.Count) < limit )); i++)
{
try
{
@@ -172,7 +172,7 @@ namespace Jackett.Common.Indexers
release.Category = MapTrackerCatToNewznab(cat);
/* if the release name not contains the language we add it because it is know from category */
if (cat.Contains("hun") && !release.Title.Contains("hun"))
if (cat.Contains("hun") && !release.Title.ToLower().Contains("hun"))
release.Title += ".hun";
if (seasonep == null)
@@ -272,6 +272,15 @@ namespace Jackett.Common.Indexers
CQ dom = results.Content;
int numVal = 0;
// find number of torrents / page
int torrent_per_page = dom[".box_torrent_all"].Find(".box_torrent").Length;
if (torrent_per_page==0)
return releases;
int start_page = (query.Offset / torrent_per_page)+1;
int previously_parsed_on_page = query.Offset - (start_page * torrent_per_page) + 1; //+1 because indexing start from 0
if (previously_parsed_on_page < 0)
previously_parsed_on_page = query.Offset;
// find pagelinks in the bottom
var pagelinks = dom["div[id=pager_bottom]"].Find("a");
if (pagelinks.Length > 0)
@@ -293,15 +302,22 @@ namespace Jackett.Common.Indexers
if (limit == 0)
limit = 100;
releases = parseTorrents(results, seasonep, query, releases.Count, limit);
if (start_page == 1)
{
releases = parseTorrents(results, seasonep, query, releases.Count, limit, previously_parsed_on_page);
previously_parsed_on_page = 0;
start_page++;
}
// Check all the pages for the torrents.
// The starting index is 2. (the first one is the original where we parse out the pages.)
for (int i=2; (i<= numVal && releases.Count < limit); i++ )
for (int i= start_page; (i<= numVal && releases.Count < limit); i++ )
{
pairs.Add(new KeyValuePair<string, string>("oldal", i.ToString()));
results = await PostDataWithCookiesAndRetry(SearchUrl, pairs);
releases.AddRange(parseTorrents(results, seasonep, query, releases.Count, limit));
releases.AddRange(parseTorrents(results, seasonep, query, releases.Count, limit, previously_parsed_on_page));
previously_parsed_on_page = 0;
pairs.Remove(new KeyValuePair<string, string>("oldal", i.ToString()));
}

View File

@@ -224,7 +224,9 @@ namespace Jackett.Common.Indexers
series.Add(sd);
}
catch (IndexOutOfRangeException e)
{ }
{
throw (e);
}
}
}
}

View File

@@ -7,10 +7,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.10.1" />
<PackageReference Include="Autofac" Version="4.8.1" />
<PackageReference Include="AngleSharp" Version="0.11.0" />
<PackageReference Include="Autofac" Version="4.9.1" />
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="BencodeNET" Version="2.2.24" />
<PackageReference Include="BencodeNET" Version="2.3.0" />
<PackageReference Include="CloudFlareUtilities" Version="1.2.0" />
<PackageReference Include="CommandLineParser" Version="2.4.3" />
<PackageReference Include="CsQuery.NETStandard" Version="1.3.6.1" />
@@ -18,12 +18,13 @@
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="MimeMapping" Version="1.0.1.12" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="NLog" Version="4.5.11" />
<PackageReference Include="SharpZipLib" Version="1.1.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.5.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
<PackageReference Include="YamlDotNet" Version="5.3.0" />
<PackageReference Include="YamlDotNet" Version="5.4.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -17,6 +17,8 @@ using Jackett.Common.Models.GitHub;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Mono.Posix;
using Mono.Unix;
using Newtonsoft.Json;
using NLog;
@@ -30,16 +32,20 @@ namespace Jackett.Common.Services
IConfigurationService configService;
ManualResetEvent locker = new ManualResetEvent(false);
ITrayLockService lockService;
IProcessService processService;
IServiceConfigService windowsService;
private ServerConfig serverConfig;
bool forceupdatecheck = false;
Variants.JackettVariant variant = Variants.JackettVariant.NotFound;
public UpdateService(Logger l, WebClient c, IConfigurationService cfg, ITrayLockService ls, ServerConfig sc)
public UpdateService(Logger l, WebClient c, IConfigurationService cfg, ITrayLockService ls, IProcessService ps, IServiceConfigService ws, ServerConfig sc)
{
logger = l;
client = c;
configService = cfg;
lockService = ls;
processService = ps;
windowsService = ws;
serverConfig = sc;
}
@@ -94,7 +100,7 @@ namespace Jackett.Common.Services
variant = variants.GetVariant();
logger.Info("Jackett variant: " + variant.ToString());
if (DotNetCoreUtil.IsRunningOnDotNetCore)
if (DotNetCoreUtil.IsRunningOnDotNetCore && variant != Variants.JackettVariant.CoreMacOs)
{
logger.Info($"Skipping update check as running Jackett on .NET Core is still in preview. Updates must be performed manually at this time.");
return;
@@ -117,7 +123,6 @@ namespace Jackett.Common.Services
try
{
var response = await client.GetString(new WebRequest()
{
Url = "https://api.github.com/repos/Jackett/Jackett/releases",
@@ -147,12 +152,14 @@ namespace Jackett.Common.Services
logger.Info($"New release found. Current: {currentVersion} New: {latestRelease.Name}");
try
{
var tempDir = await DownloadRelease(latestRelease.Assets, isWindows, latestRelease.Name);
var tempDir = await DownloadRelease(latestRelease.Assets, isWindows, latestRelease.Name);
// Copy updater
var installDir = Path.GetDirectoryName(ExePath());
var updaterPath = Path.Combine(tempDir, "Jackett", "JackettUpdater.exe");
var updaterPath = GetUpdaterPath(tempDir);
if (updaterPath != null)
{
StartUpdate(updaterPath, installDir, isWindows, serverConfig.RuntimeSettings.NoRestart, trayIsRunning);
}
}
catch (Exception e)
{
@@ -178,6 +185,19 @@ namespace Jackett.Common.Services
}
}
private string GetUpdaterPath(string tempDirectory)
{
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64 ||
variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
{
return Path.Combine(tempDirectory, "Jackett", "JackettUpdater");
}
else
{
return Path.Combine(tempDirectory, "Jackett", "JackettUpdater.exe");
}
}
private string GetCurrentVersion()
{
var assembly = Assembly.GetExecutingAssembly();
@@ -276,6 +296,21 @@ namespace Jackett.Common.Services
tarArchive.Close();
gzipStream.Close();
inStream.Close();
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64 ||
variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
{
// When the files get extracted, the execute permission for jackett and JackettUpdater don't get carried across
UnixFileInfo jackettFI = new UnixFileInfo(Path.Combine(tempDir, "/Jackett/jackett"))
{
FileAccessPermissions = FileAccessPermissions.UserReadWriteExecute | FileAccessPermissions.GroupRead | FileAccessPermissions.OtherRead
};
UnixFileInfo jackettUpdaterFI = new UnixFileInfo(Path.Combine(tempDir + "/Jackett/JackettUpdater"))
{
FileAccessPermissions = FileAccessPermissions.UserReadWriteExecute | FileAccessPermissions.GroupRead | FileAccessPermissions.OtherRead
};
}
}
return tempDir;
@@ -284,9 +319,6 @@ namespace Jackett.Common.Services
private void StartUpdate(string updaterExePath, string installLocation, bool isWindows, bool NoRestart, bool trayIsRunning)
{
string appType = "Console";
//DI once off Owin
IProcessService processService = new ProcessService(logger);
IServiceConfigService windowsService = new WindowsServiceConfigService(processService, logger);
if (isWindows && windowsService.ServiceExists() && windowsService.ServiceRunning())
{
@@ -294,19 +326,14 @@ namespace Jackett.Common.Services
}
var exe = Path.GetFileName(ExePath());
var args = string.Join(" ", Environment.GetCommandLineArgs().Skip(1).Select(a => a.Contains(" ") ? "\"" +a + "\"" : a )).Replace("\"", "\\\"");
var args = string.Join(" ", Environment.GetCommandLineArgs().Skip(1).Select(a => a.Contains(" ") ? "\"" + a + "\"" : a )).Replace("\"", "\\\"");
var startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
// Note: add a leading space to the --Args argument to avoid parsing as arguments
if (isWindows)
{
startInfo.Arguments = $"--Path \"{installLocation}\" --Type \"{appType}\" --Args \" {args}\"";
startInfo.FileName = Path.Combine(updaterExePath);
}
else
if (variant == Variants.JackettVariant.Mono)
{
// Wrap mono
args = exe + " " + args;
@@ -315,6 +342,11 @@ namespace Jackett.Common.Services
startInfo.Arguments = $"{Path.Combine(updaterExePath)} --Path \"{installLocation}\" --Type \"{appType}\" --Args \" {args}\"";
startInfo.FileName = "mono";
}
else
{
startInfo.Arguments = $"--Path \"{installLocation}\" --Type \"{appType}\" --Args \" {args}\"";
startInfo.FileName = Path.Combine(updaterExePath);
}
try
{

View File

@@ -14,7 +14,7 @@ namespace Jackett.Common.Utils
Mono,
CoreWindows,
CoreMacOs,
CoreLinuxAmd64,
CoreLinuxAmdx64,
CoreLinuxArm32,
CoreLinuxArm64
}
@@ -37,7 +37,7 @@ namespace Jackett.Common.Utils
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.ProcessArchitecture == Architecture.X64)
{
return JackettVariant.CoreLinuxAmd64;
return JackettVariant.CoreLinuxAmdx64;
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.ProcessArchitecture == Architecture.Arm)
@@ -88,9 +88,9 @@ namespace Jackett.Common.Utils
{
return "Jackett.Binaries.macOS.tar.gz";
}
case JackettVariant.CoreLinuxAmd64:
case JackettVariant.CoreLinuxAmdx64:
{
return "Jackett.Binaries.LinuxAMD64.tar.gz";
return "Jackett.Binaries.LinuxAMDx64.tar.gz";
}
case JackettVariant.CoreLinuxArm32:
{

View File

@@ -26,8 +26,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.8.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.1" />
<PackageReference Include="Autofac" Version="4.9.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.4.0" />
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="CommandLineParser" Version="2.4.3" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
@@ -39,7 +39,7 @@
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="NLog" Version="4.5.11" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.7.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.8.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
</ItemGroup>

View File

@@ -21,15 +21,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.8.1" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="Autofac" Version="4.9.1" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -19,6 +19,7 @@ namespace Jackett.Updater
private IProcessService processService;
private IServiceConfigService windowsService;
private Logger logger;
Variants.JackettVariant variant = Variants.JackettVariant.NotFound;
public static void Main(string[] args)
{
@@ -38,6 +39,10 @@ namespace Jackett.Updater
logger.Info("Jackett Updater v" + GetCurrentVersion());
logger.Info("Options \"" + string.Join("\" \"", args) + "\"");
Variants variants = new Variants();
variant = variants.GetVariant();
logger.Info("Jackett variant: " + variant.ToString());
bool isWindows = Environment.OSVersion.Platform == PlatformID.Win32NT;
if (isWindows)
{
@@ -351,7 +356,7 @@ namespace Jackett.Updater
var startInfo = new ProcessStartInfo()
{
Arguments = options.Args,
FileName = Path.Combine(options.Path, "JackettConsole.exe"),
FileName = GetJackettConsolePath(options.Path),
UseShellExecute = true
};
@@ -363,7 +368,8 @@ namespace Jackett.Updater
startInfo.CreateNoWindow = false;
startInfo.WindowStyle = ProcessWindowStyle.Normal;
}
else
if (variant == Variants.JackettVariant.Mono)
{
startInfo.Arguments = startInfo.FileName + " " + startInfo.Arguments;
startInfo.FileName = "mono";
@@ -380,5 +386,18 @@ namespace Jackett.Updater
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
return new FileInfo(WebUtility.UrlDecode(location.AbsolutePath)).DirectoryName;
}
private string GetJackettConsolePath(string directoryPath)
{
if (variant == Variants.JackettVariant.CoreMacOs || variant == Variants.JackettVariant.CoreLinuxAmdx64 ||
variant == Variants.JackettVariant.CoreLinuxArm32 || variant == Variants.JackettVariant.CoreLinuxArm64)
{
return Path.Combine(directoryPath, "jackett");
}
else
{
return Path.Combine(directoryPath, "JackettConsole.exe");
}
}
}
}