mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
@@ -220,7 +220,7 @@ hr {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jackett-allowext, #jackett-allowupdate {
|
#jackett-allowext, #jackett-allowupdate, #jackett-logging {
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@ function loadJackettSettings() {
|
|||||||
$("#jackett-savedir").val(data.config.blackholedir);
|
$("#jackett-savedir").val(data.config.blackholedir);
|
||||||
$("#jackett-allowext").attr('checked', data.config.external);
|
$("#jackett-allowext").attr('checked', data.config.external);
|
||||||
$("#jackett-allowupdate").attr('checked', data.config.updatedisabled);
|
$("#jackett-allowupdate").attr('checked', data.config.updatedisabled);
|
||||||
|
$("#jackett-logging").attr('checked', data.config.logging);
|
||||||
var password = data.config.password;
|
var password = data.config.password;
|
||||||
$("#jackett-adminpwd").val(password);
|
$("#jackett-adminpwd").val(password);
|
||||||
if (password != null && password != '') {
|
if (password != null && password != '') {
|
||||||
@@ -546,11 +547,13 @@ function bindUIButtons() {
|
|||||||
var jackett_port = $("#jackett-port").val();
|
var jackett_port = $("#jackett-port").val();
|
||||||
var jackett_external = $("#jackett-allowext").is(':checked');
|
var jackett_external = $("#jackett-allowext").is(':checked');
|
||||||
var jackett_update = $("#jackett-allowupdate").is(':checked');
|
var jackett_update = $("#jackett-allowupdate").is(':checked');
|
||||||
|
var jackett_logging = $("#jackett-logging").is(':checked');
|
||||||
var jsonObject = {
|
var jsonObject = {
|
||||||
port: jackett_port,
|
port: jackett_port,
|
||||||
external: jackett_external,
|
external: jackett_external,
|
||||||
updatedisabled: jackett_update,
|
updatedisabled: jackett_update,
|
||||||
blackholedir: $("#jackett-savedir").val()
|
blackholedir: $("#jackett-savedir").val(),
|
||||||
|
logging: jackett_logging
|
||||||
};
|
};
|
||||||
var jqxhr = $.post("/admin/set_config", JSON.stringify(jsonObject), function (data) {
|
var jqxhr = $.post("/admin/set_config", JSON.stringify(jsonObject), function (data) {
|
||||||
if (data.result == "error") {
|
if (data.result == "error") {
|
||||||
|
@@ -60,6 +60,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<h3>Jackett Configuration</h3>
|
<h3>Jackett Configuration</h3>
|
||||||
|
<div class="text-center">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button id="change-jackett-port" class="btn btn-primary btn-sm">
|
||||||
|
<i class="fa fa-wrench"></i> Apply server settings <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
|
<button id="view-jackett-logs" class="btn btn-danger btn-sm">
|
||||||
|
<i class="fa fa-rss"></i> View logs <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
|
<button id="trigger-updater" class="btn btn-warning btn-sm">
|
||||||
|
<i class="fa fa-wrench"></i> Check for updates <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
<span class="input-header">Admin password: </span>
|
<span class="input-header">Admin password: </span>
|
||||||
<input id="jackett-adminpwd" class="form-control input-right" type="password" value="" placeholder="Blank to disable" />
|
<input id="jackett-adminpwd" class="form-control input-right" type="password" value="" placeholder="Blank to disable" />
|
||||||
@@ -73,12 +87,7 @@
|
|||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
<span class="input-header">Server port: </span>
|
<span class="input-header">Server port: </span>
|
||||||
<input id="jackett-port" class="form-control input-right" type="text" value="" placeholder="9117">
|
<input id="jackett-port" class="form-control input-right" type="text" value="" placeholder="9117">
|
||||||
<button id="change-jackett-port" class="btn btn-primary btn-sm">
|
|
||||||
<i class="fa fa-wrench"></i> Apply server settings <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
|
||||||
</button>
|
|
||||||
<button id="view-jackett-logs" class="btn btn-danger btn-sm">
|
|
||||||
<i class="fa fa-rss"></i> View logs <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
<span class="input-header">Manual download blackhole directory: </span>
|
<span class="input-header">Manual download blackhole directory: </span>
|
||||||
@@ -91,9 +100,11 @@
|
|||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
<span class="input-header">Disable auto update: </span>
|
<span class="input-header">Disable auto update: </span>
|
||||||
<input id="jackett-allowupdate" class="form-control input-right" type="checkbox" />
|
<input id="jackett-allowupdate" class="form-control input-right" type="checkbox" />
|
||||||
<button id="trigger-updater" class="btn btn-warning btn-sm">
|
|
||||||
<i class="fa fa-wrench"></i> Check for updates <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
</div>
|
||||||
</button>
|
<div class="input-area">
|
||||||
|
<span class="input-header">Enhanced logging: </span>
|
||||||
|
<input id="jackett-logging" class="form-control input-right" type="checkbox" />
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
|
@@ -316,6 +316,8 @@ namespace Jackett.Controllers
|
|||||||
cfg["blackholedir"] = serverService.Config.BlackholeDir;
|
cfg["blackholedir"] = serverService.Config.BlackholeDir;
|
||||||
cfg["updatedisabled"] = serverService.Config.UpdateDisabled;
|
cfg["updatedisabled"] = serverService.Config.UpdateDisabled;
|
||||||
cfg["password"] = string.IsNullOrEmpty(serverService.Config.AdminPassword) ? string.Empty : serverService.Config.AdminPassword.Substring(0, 10);
|
cfg["password"] = string.IsNullOrEmpty(serverService.Config.AdminPassword) ? string.Empty : serverService.Config.AdminPassword.Substring(0, 10);
|
||||||
|
cfg["logging"] = Startup.TracingEnabled;
|
||||||
|
|
||||||
|
|
||||||
jsonReply["config"] = cfg;
|
jsonReply["config"] = cfg;
|
||||||
jsonReply["app_version"] = config.GetVersion();
|
jsonReply["app_version"] = config.GetVersion();
|
||||||
@@ -344,9 +346,18 @@ namespace Jackett.Controllers
|
|||||||
bool external = (bool)postData["external"];
|
bool external = (bool)postData["external"];
|
||||||
string saveDir = (string)postData["blackholedir"];
|
string saveDir = (string)postData["blackholedir"];
|
||||||
bool updateDisabled = (bool)postData["updatedisabled"];
|
bool updateDisabled = (bool)postData["updatedisabled"];
|
||||||
|
bool logging = (bool)postData["logging"];
|
||||||
|
|
||||||
if (port != Engine.Server.Config.Port || external != Engine.Server.Config.AllowExternal || Engine.Server.Config.UpdateDisabled != updateDisabled)
|
|
||||||
|
Engine.Server.Config.UpdateDisabled = updateDisabled;
|
||||||
|
Engine.Server.SaveConfig();
|
||||||
|
|
||||||
|
Engine.SetLogLevel(logging ? LogLevel.Debug : LogLevel.Info);
|
||||||
|
Startup.TracingEnabled = logging;
|
||||||
|
|
||||||
|
if (port != Engine.Server.Config.Port || external != Engine.Server.Config.AllowExternal)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (ServerUtil.RestrictedPorts.Contains(port))
|
if (ServerUtil.RestrictedPorts.Contains(port))
|
||||||
{
|
{
|
||||||
jsonReply["result"] = "error";
|
jsonReply["result"] = "error";
|
||||||
@@ -357,7 +368,6 @@ namespace Jackett.Controllers
|
|||||||
// Save port to the config so it can be picked up by the if needed when running as admin below.
|
// Save port to the config so it can be picked up by the if needed when running as admin below.
|
||||||
Engine.Server.Config.AllowExternal = external;
|
Engine.Server.Config.AllowExternal = external;
|
||||||
Engine.Server.Config.Port = port;
|
Engine.Server.Config.Port = port;
|
||||||
Engine.Server.Config.UpdateDisabled = updateDisabled;
|
|
||||||
Engine.Server.SaveConfig();
|
Engine.Server.SaveConfig();
|
||||||
|
|
||||||
// On Windows change the url reservations
|
// On Windows change the url reservations
|
||||||
@@ -385,17 +395,16 @@ namespace Jackett.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(new Thread(() =>
|
(new Thread(() =>
|
||||||
{
|
{
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
serverService.Stop();
|
serverService.Stop();
|
||||||
Engine.BuildContainer();
|
Engine.BuildContainer();
|
||||||
Engine.Server.Initalize();
|
Engine.Server.Initalize();
|
||||||
Engine.Server.Start();
|
Engine.Server.Start();
|
||||||
})).Start();
|
})).Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (saveDir != Engine.Server.Config.BlackholeDir)
|
if (saveDir != Engine.Server.Config.BlackholeDir)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(saveDir))
|
if (!string.IsNullOrEmpty(saveDir))
|
||||||
|
@@ -20,7 +20,7 @@ namespace Jackett
|
|||||||
static Engine()
|
static Engine()
|
||||||
{
|
{
|
||||||
BuildContainer();
|
BuildContainer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void BuildContainer()
|
public static void BuildContainer()
|
||||||
@@ -136,21 +136,35 @@ namespace Jackett
|
|||||||
|
|
||||||
var logConsole = new ColoredConsoleTarget();
|
var logConsole = new ColoredConsoleTarget();
|
||||||
logConfig.AddTarget("console", logConsole);
|
logConfig.AddTarget("console", logConsole);
|
||||||
|
|
||||||
logConsole.Layout = "${simpledatetime} ${level} ${message} ${exception:format=ToString}";
|
logConsole.Layout = "${simpledatetime} ${level} ${message} ${exception:format=ToString}";
|
||||||
var logConsoleRule = new LoggingRule("*", logLevel, logConsole);
|
var logConsoleRule = new LoggingRule("*", logLevel, logConsole);
|
||||||
logConfig.LoggingRules.Add(logConsoleRule);
|
logConfig.LoggingRules.Add(logConsoleRule);
|
||||||
|
|
||||||
var logService = new LogCacheService();
|
var logService = new LogCacheService();
|
||||||
logConfig.AddTarget("service", logService);
|
logConfig.AddTarget("service", logService);
|
||||||
var serviceRule = new LoggingRule("*", logLevel,logService);
|
var serviceRule = new LoggingRule("*", logLevel, logService);
|
||||||
logConfig.LoggingRules.Add(serviceRule);
|
logConfig.LoggingRules.Add(serviceRule);
|
||||||
|
|
||||||
LogManager.Configuration = logConfig;
|
LogManager.Configuration = logConfig;
|
||||||
builder.RegisterInstance<Logger>(LogManager.GetCurrentClassLogger()).SingleInstance();
|
builder.RegisterInstance<Logger>(LogManager.GetCurrentClassLogger()).SingleInstance();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetLogLevel(LogLevel level)
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach (var rule in LogManager.Configuration.LoggingRules)
|
||||||
|
{
|
||||||
|
rule.EnableLoggingForLevel(level);
|
||||||
|
}
|
||||||
|
|
||||||
|
LogManager.ReconfigExistingLoggers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[LayoutRenderer("simpledatetime")]
|
[LayoutRenderer("simpledatetime")]
|
||||||
public class SimpleDateTimeRenderer : LayoutRenderer
|
public class SimpleDateTimeRenderer : LayoutRenderer
|
||||||
{
|
{
|
||||||
|
@@ -19,7 +19,7 @@ namespace Jackett.Indexers
|
|||||||
class SceneAccess : BaseIndexer, IIndexer
|
class SceneAccess : BaseIndexer, IIndexer
|
||||||
{
|
{
|
||||||
private string LoginUrl { get { return SiteLink + "login"; } }
|
private string LoginUrl { get { return SiteLink + "login"; } }
|
||||||
private string SearchUrl { get { return SiteLink + "browse?search={0}&method=2&c27=27&c17=17&c11=11"; } }
|
private string SearchUrl { get { return SiteLink + "all?search={0}&method=2"; } }
|
||||||
|
|
||||||
new ConfigurationDataBasicLogin configData
|
new ConfigurationDataBasicLogin configData
|
||||||
{
|
{
|
||||||
@@ -38,6 +38,53 @@ namespace Jackett.Indexers
|
|||||||
p: ps,
|
p: ps,
|
||||||
configData: new ConfigurationDataBasicLogin())
|
configData: new ConfigurationDataBasicLogin())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
AddCategoryMapping(8, TorznabCatType.MoviesSD);
|
||||||
|
AddCategoryMapping(22, TorznabCatType.MoviesHD);
|
||||||
|
AddCategoryMapping(7, TorznabCatType.MoviesSD);
|
||||||
|
AddCategoryMapping(4, TorznabCatType.Movies);
|
||||||
|
|
||||||
|
AddCategoryMapping(27, TorznabCatType.TVHD);
|
||||||
|
AddCategoryMapping(17, TorznabCatType.TVSD);
|
||||||
|
AddCategoryMapping(11, TorznabCatType.MoviesSD);
|
||||||
|
AddCategoryMapping(26, TorznabCatType.TV);
|
||||||
|
|
||||||
|
AddCategoryMapping(3, TorznabCatType.PCGames);
|
||||||
|
AddCategoryMapping(5, TorznabCatType.ConsolePS3);
|
||||||
|
AddCategoryMapping(20, TorznabCatType.ConsolePSP);
|
||||||
|
AddCategoryMapping(28, TorznabCatType.TV);
|
||||||
|
AddCategoryMapping(23, TorznabCatType.Console);
|
||||||
|
AddCategoryMapping(29, TorznabCatType.Console);
|
||||||
|
|
||||||
|
AddCategoryMapping(40, TorznabCatType.AudioLossless);
|
||||||
|
AddCategoryMapping(13, TorznabCatType.AudioMP3);
|
||||||
|
AddCategoryMapping(15, TorznabCatType.AudioVideo);
|
||||||
|
|
||||||
|
AddCategoryMapping(1, TorznabCatType.PCISO);
|
||||||
|
AddCategoryMapping(2, TorznabCatType.PCISO);
|
||||||
|
AddCategoryMapping(14, TorznabCatType.PCISO);
|
||||||
|
AddCategoryMapping(21, TorznabCatType.Other);
|
||||||
|
|
||||||
|
AddCategoryMapping(41, TorznabCatType.MoviesHD);
|
||||||
|
AddCategoryMapping(42, TorznabCatType.MoviesSD);
|
||||||
|
AddCategoryMapping(43, TorznabCatType.MoviesSD);
|
||||||
|
AddCategoryMapping(44, TorznabCatType.TVHD);
|
||||||
|
AddCategoryMapping(45, TorznabCatType.TVSD);
|
||||||
|
|
||||||
|
AddCategoryMapping(12, TorznabCatType.XXXXviD);
|
||||||
|
AddCategoryMapping(35, TorznabCatType.XXXx264);
|
||||||
|
AddCategoryMapping(36, TorznabCatType.XXX);
|
||||||
|
|
||||||
|
AddCategoryMapping(30, TorznabCatType.MoviesForeign);
|
||||||
|
AddCategoryMapping(31, TorznabCatType.MoviesForeign);
|
||||||
|
AddCategoryMapping(32, TorznabCatType.MoviesForeign);
|
||||||
|
AddCategoryMapping(33, TorznabCatType.TVFOREIGN);
|
||||||
|
AddCategoryMapping(34, TorznabCatType.TVFOREIGN);
|
||||||
|
|
||||||
|
AddCategoryMapping(4, TorznabCatType.Movies);
|
||||||
|
AddCategoryMapping(37, TorznabCatType.XXX);
|
||||||
|
AddCategoryMapping(38, TorznabCatType.Audio);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
public async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||||
@@ -82,9 +129,9 @@ namespace Jackett.Indexers
|
|||||||
release.MinimumSeedTime = 129600;
|
release.MinimumSeedTime = 129600;
|
||||||
release.Title = qRow.Find(".ttr_name > a").Text();
|
release.Title = qRow.Find(".ttr_name > a").Text();
|
||||||
release.Description = release.Title;
|
release.Description = release.Title;
|
||||||
release.Guid = new Uri(SiteLink + "/" + qRow.Find(".ttr_name > a").Attr("href"));
|
release.Guid = new Uri(SiteLink + qRow.Find(".ttr_name > a").Attr("href"));
|
||||||
release.Comments = release.Guid;
|
release.Comments = release.Guid;
|
||||||
release.Link = new Uri(SiteLink + "/" + qRow.Find(".td_dl > a").Attr("href"));
|
release.Link = new Uri(SiteLink + qRow.Find(".td_dl > a").Attr("href"));
|
||||||
|
|
||||||
var sizeStr = qRow.Find(".ttr_size").Contents()[0].NodeValue;
|
var sizeStr = qRow.Find(".ttr_size").Contents()[0].NodeValue;
|
||||||
release.Size = ReleaseInfo.GetBytes(sizeStr);
|
release.Size = ReleaseInfo.GetBytes(sizeStr);
|
||||||
@@ -99,16 +146,9 @@ namespace Jackett.Indexers
|
|||||||
release.Seeders = ParseUtil.CoerceInt(qRow.Find(".ttr_seeders").Text());
|
release.Seeders = ParseUtil.CoerceInt(qRow.Find(".ttr_seeders").Text());
|
||||||
release.Peers = ParseUtil.CoerceInt(qRow.Find(".ttr_leechers").Text()) + release.Seeders;
|
release.Peers = ParseUtil.CoerceInt(qRow.Find(".ttr_leechers").Text()) + release.Seeders;
|
||||||
|
|
||||||
var cat = qRow.Find(".ttr_type a").Attr("href");
|
var cat = qRow.Find(".ttr_type a").Attr("href").Replace("?cat=",string.Empty);
|
||||||
|
|
||||||
if (cat == "?cat=27")
|
release.Category = MapTrackerCatToNewznab(cat);
|
||||||
{
|
|
||||||
release.Category = TorznabCatType.TVHD.ID;
|
|
||||||
}
|
|
||||||
else if (cat == "?cat=17")
|
|
||||||
{
|
|
||||||
release.Category = TorznabCatType.TVSD.ID;
|
|
||||||
}
|
|
||||||
|
|
||||||
releases.Add(release);
|
releases.Add(release);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user