diff --git a/Build.bat b/Build.bat
new file mode 100644
index 000000000..8ee0b9dc0
--- /dev/null
+++ b/Build.bat
@@ -0,0 +1,15 @@
+
+rmdir /s /q build
+cd src
+Msbuild Jackett.sln /t:Clean,Build /p:Configuration=Release
+cd ..
+
+xcopy src\Jackett.Console\bin\Release Build\ /e /y
+copy /Y src\Jackett.Service\bin\Release\JackettService.exe build\JackettService.exe
+copy /Y src\Jackett.Service\bin\Release\JackettService.exe.config build\JackettService.exe.config
+copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe build\JackettTray.exe
+copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe.config build\JackettTray.exe.config
+cd build
+del *.pdb
+del *.xml
+cd ..
diff --git a/Installer.iss b/Installer.iss
new file mode 100644
index 000000000..9c6361bc4
--- /dev/null
+++ b/Installer.iss
@@ -0,0 +1,58 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#define MyAppName "Jackett"
+#define MyAppVersion "0.5"
+#define MyAppPublisher "Jackett Inc."
+#define MyAppURL "https://github.com/zone117x/Jackett"
+#define MyAppExeName "JackettTray.exe"
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{C2A9FC00-AA48-4F17-9A72-62FBCEE2785B}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+AppUpdatesURL={#MyAppURL}
+DefaultDirName={pf}\{#MyAppName}
+DefaultGroupName={#MyAppName}
+DisableProgramGroupPage=yes
+OutputBaseFilename=setup
+SetupIconFile=O:\Documents\JackettKayo\src\Jackett.Console\jackett.ico
+Compression=lzma
+SolidCompression=yes
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "windowsService"; Description: "Install as a Windows Service"
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+
+[Files]
+Source: "O:\Documents\JackettKayo\Build\JackettTray.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "O:\Documents\JackettKayo\Build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Icons]
+Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
+Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
+Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+
+[Run]
+Filename: "{app}\JackettConsole.exe"; Parameters: "/u"; Flags: waituntilterminated;
+Filename: "{app}\JackettConsole.exe"; Parameters: "/r"; Flags: waituntilterminated;
+Filename: "{app}\JackettConsole.exe"; Parameters: "/i"; Flags: waituntilterminated; Tasks: windowsService
+
+[UninstallRun]
+Filename: "{app}\JackettConsole.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist
+
+
diff --git a/README.md b/README.md
index 0d87fcb34..e3f76e552 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,7 @@ Download in the [Releases page](https://github.com/zone117x/Jackett/releases)
* [BeyondHD](https://beyondhd.me/)
* [T411](http://www.t411.io/)
* [FrenchTorrentDb](http://www.frenchtorrentdb.com/)
+ * [bB](http://reddit.com/r/baconbits)
### Additional Trackers
diff --git a/src/Jackett.Console/App.config b/src/Jackett.Console/App.config
new file mode 100644
index 000000000..da396d090
--- /dev/null
+++ b/src/Jackett.Console/App.config
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Console/Jackett.Console.csproj b/src/Jackett.Console/Jackett.Console.csproj
new file mode 100644
index 000000000..bb4bd0e92
--- /dev/null
+++ b/src/Jackett.Console/Jackett.Console.csproj
@@ -0,0 +1,155 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {4E2A81DA-E235-4A88-AD20-38AABBFBF33C}
+ Exe
+ Properties
+ Jackett.Console
+ JackettConsole
+ v4.5.2
+ 512
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ jackett.ico
+
+
+ JackettConsole.Program
+
+
+
+ False
+ ..\packages\Autofac.3.5.0\lib\net40\Autofac.dll
+
+
+ ..\packages\Autofac.Owin.3.1.0\lib\net45\Autofac.Integration.Owin.dll
+
+
+ False
+ ..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll
+
+
+ ..\packages\Autofac.WebApi2.Owin.3.2.0\lib\net45\Autofac.Integration.WebApi.Owin.dll
+
+
+ ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll
+
+
+ ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll
+ True
+
+
+ ..\packages\Microsoft.Owin.FileSystems.3.0.1\lib\net45\Microsoft.Owin.FileSystems.dll
+ True
+
+
+ ..\packages\Microsoft.Owin.Host.HttpListener.2.0.2\lib\net45\Microsoft.Owin.Host.HttpListener.dll
+ True
+
+
+ ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll
+
+
+ ..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll
+ True
+
+
+ ..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll
+
+
+ ..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll
+
+
+ ..\packages\Microsoft.Owin.StaticFiles.3.0.1\lib\net45\Microsoft.Owin.StaticFiles.dll
+ True
+
+
+ ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
+ True
+
+
+ False
+ ..\packages\NLog.4.0.1\lib\net45\NLog.dll
+
+
+ ..\packages\Owin.1.0\lib\net40\Owin.dll
+ True
+
+
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+
+
+ {74420a79-cc16-442c-8b1e-7c1b913844f0}
+ CurlSharp
+
+
+ {e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}
+ Jackett
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Console/Program.cs b/src/Jackett.Console/Program.cs
new file mode 100644
index 000000000..6f6973c79
--- /dev/null
+++ b/src/Jackett.Console/Program.cs
@@ -0,0 +1,59 @@
+using Jackett;
+using Jackett.Indexers;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace JackettConsole
+{
+ public class Program
+ {
+ static void Main(string[] args)
+ {
+ try
+ {
+ foreach (var arg in args)
+ {
+ switch (arg.ToLowerInvariant())
+ {
+ case "/i": // Install
+ Engine.ServiceConfig.Install();
+ return;
+ case "/r": // Reserve port/url & install
+ Engine.Server.ReserveUrls(doInstall: true);
+ return;
+ case "/c": // Change port
+ Engine.Server.ReserveUrls(doInstall: false);
+ return;
+ case "/u": // Uninstall
+ Engine.Server.ReserveUrls(doInstall: false);
+ Engine.ServiceConfig.Uninstall();
+ return;
+ case "/l": // Logging
+ Engine.LogRequests = true;
+ break;
+ case "/t": // Tracing
+ Engine.TracingEnabled = true;
+ break;
+ }
+ }
+
+ Engine.Server.Start();
+ Engine.Logger.Info("Running in console mode.");
+ Engine.RunTime.Spin();
+ Engine.Logger.Info("Server thread exit");
+ }
+ catch (Exception e)
+ {
+ Engine.Logger.Error(e, "Top level exception");
+ }
+ }
+ }
+}
+
diff --git a/src/Jackett.Console/Properties/AssemblyInfo.cs b/src/Jackett.Console/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..0c11610e1
--- /dev/null
+++ b/src/Jackett.Console/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Jackett.Console")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Jackett.Console")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4e2a81da-e235-4a88-ad20-38aabbfbf33c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Jackett/WebContent/favicon.ico b/src/Jackett.Console/jackett.ico
similarity index 100%
rename from src/Jackett/WebContent/favicon.ico
rename to src/Jackett.Console/jackett.ico
diff --git a/src/Jackett.Console/packages.config b/src/Jackett.Console/packages.config
new file mode 100644
index 000000000..268d933cc
--- /dev/null
+++ b/src/Jackett.Console/packages.config
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Service/App.config b/src/Jackett.Service/App.config
new file mode 100644
index 000000000..e74e545f8
--- /dev/null
+++ b/src/Jackett.Service/App.config
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Service/Jackett.Service.csproj b/src/Jackett.Service/Jackett.Service.csproj
new file mode 100644
index 000000000..a4c6c9940
--- /dev/null
+++ b/src/Jackett.Service/Jackett.Service.csproj
@@ -0,0 +1,144 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}
+ WinExe
+ Properties
+ Jackett.Service
+ JackettService
+ v4.5.2
+ 512
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ jackett.ico
+
+
+
+ False
+ ..\packages\Autofac.3.5.0\lib\net40\Autofac.dll
+
+
+ ..\packages\Autofac.Owin.3.1.0\lib\net45\Autofac.Integration.Owin.dll
+
+
+ False
+ ..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll
+
+
+ ..\packages\Autofac.WebApi2.Owin.3.2.0\lib\net45\Autofac.Integration.WebApi.Owin.dll
+
+
+ False
+ ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll
+
+
+ False
+ ..\packages\Microsoft.Owin.FileSystems.3.0.1\lib\net45\Microsoft.Owin.FileSystems.dll
+
+
+ ..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll
+
+
+ False
+ ..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll
+
+
+ False
+ ..\packages\Microsoft.Owin.StaticFiles.3.0.1\lib\net45\Microsoft.Owin.StaticFiles.dll
+
+
+ False
+ ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
+
+
+ False
+ ..\packages\NLog.4.0.1\lib\net45\NLog.dll
+
+
+ False
+ ..\packages\Owin.1.0\lib\net40\Owin.dll
+
+
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll
+
+
+
+
+
+
+
+
+
+
+
+ Component
+
+
+ Service.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {74420a79-cc16-442c-8b1e-7c1b913844f0}
+ CurlSharp
+
+
+ {e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}
+ Jackett
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Service/Program.cs b/src/Jackett.Service/Program.cs
new file mode 100644
index 000000000..22c25af4b
--- /dev/null
+++ b/src/Jackett.Service/Program.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.ServiceProcess;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Jackett.Service
+{
+ static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ static void Main()
+ {
+ ServiceBase[] ServicesToRun;
+ ServicesToRun = new ServiceBase[]
+ {
+ new Service()
+ };
+ ServiceBase.Run(ServicesToRun);
+ }
+ }
+}
diff --git a/src/Jackett.Service/Properties/AssemblyInfo.cs b/src/Jackett.Service/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..246a632ba
--- /dev/null
+++ b/src/Jackett.Service/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Jackett.Service")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Jackett.Service")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bf611f7b-4658-4cb8-aa9e-0736fadaa3ba")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Jackett.Service/Service.Designer.cs b/src/Jackett.Service/Service.Designer.cs
new file mode 100644
index 000000000..0e2f0f42d
--- /dev/null
+++ b/src/Jackett.Service/Service.Designer.cs
@@ -0,0 +1,37 @@
+namespace Jackett.Service
+{
+ partial class Service
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.ServiceName = "Jackett";
+ }
+
+ #endregion
+ }
+}
diff --git a/src/Jackett.Service/Service.cs b/src/Jackett.Service/Service.cs
new file mode 100644
index 000000000..47690ab21
--- /dev/null
+++ b/src/Jackett.Service/Service.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Diagnostics;
+using System.Linq;
+using System.ServiceProcess;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Jackett.Service
+{
+ public partial class Service : ServiceBase
+ {
+ public Service()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnStart(string[] args)
+ {
+ Engine.Logger.Info("Service starting");
+ Engine.Server.Start();
+ Engine.Logger.Info("Service started");
+ }
+
+ protected override void OnStop()
+ {
+ Engine.Logger.Info("Service stopping");
+ Engine.Server.Stop();
+ }
+ }
+}
diff --git a/src/Jackett/jacket_large.ico b/src/Jackett.Service/jackett.ico
similarity index 100%
rename from src/Jackett/jacket_large.ico
rename to src/Jackett.Service/jackett.ico
diff --git a/src/Jackett.Service/packages.config b/src/Jackett.Service/packages.config
new file mode 100644
index 000000000..cfb04dcec
--- /dev/null
+++ b/src/Jackett.Service/packages.config
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Tray/App.config b/src/Jackett.Tray/App.config
new file mode 100644
index 000000000..88fa4027b
--- /dev/null
+++ b/src/Jackett.Tray/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett.Tray/Jackett.Tray.csproj b/src/Jackett.Tray/Jackett.Tray.csproj
new file mode 100644
index 000000000..0e3f38375
--- /dev/null
+++ b/src/Jackett.Tray/Jackett.Tray.csproj
@@ -0,0 +1,96 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {FF9025B1-EC14-4AA9-8081-9F69C5E35B63}
+ WinExe
+ Properties
+ Jackett.Tray
+ JackettTray
+ v4.5.2
+ 512
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ jackett.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Main.cs
+
+
+
+
+ Main.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Jackett/Windows/Main.Designer.cs b/src/Jackett.Tray/Main.Designer.cs
similarity index 98%
rename from src/Jackett/Windows/Main.Designer.cs
rename to src/Jackett.Tray/Main.Designer.cs
index d881a2821..71457c20d 100644
--- a/src/Jackett/Windows/Main.Designer.cs
+++ b/src/Jackett.Tray/Main.Designer.cs
@@ -1,6 +1,4 @@
-#if !__MonoCS__
-
-namespace Jackett
+namespace JackettTray
{
partial class Main
{
@@ -99,5 +97,4 @@ namespace Jackett
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemShutdown;
}
-}
-#endif
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/Jackett/Windows/Main.cs b/src/Jackett.Tray/Main.cs
similarity index 88%
rename from src/Jackett/Windows/Main.cs
rename to src/Jackett.Tray/Main.cs
index 250aff2ce..991f72f1a 100644
--- a/src/Jackett/Windows/Main.cs
+++ b/src/Jackett.Tray/Main.cs
@@ -1,5 +1,4 @@
-#if !__MonoCS__
-using Microsoft.Win32;
+using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -13,7 +12,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
-namespace Jackett
+namespace JackettTray
{
public partial class Main : Form
{
@@ -28,13 +27,13 @@ namespace Jackett
toolStripMenuItemWebUI.Click += toolStripMenuItemWebUI_Click;
toolStripMenuItemShutdown.Click += toolStripMenuItemShutdown_Click;
- if (Program.IsFirstRun)
- AutoStart = true;
+ //if (Server.IsFirstRun)
+ // AutoStart = true;
}
void toolStripMenuItemWebUI_Click(object sender, EventArgs e)
{
- Process.Start("http://127.0.0.1:" + Server.Port);
+ // Process.Start("http://127.0.0.1:" + Server.Port);
}
void toolStripMenuItemShutdown_Click(object sender, EventArgs e)
@@ -84,13 +83,12 @@ namespace Jackett
private void CreateShortcut()
{
- var appPath = Assembly.GetExecutingAssembly().Location;
+ /* var appPath = Assembly.GetExecutingAssembly().Location;
var shell = new IWshRuntimeLibrary.WshShell();
var shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(ShortcutPath);
shortcut.Description = Assembly.GetExecutingAssembly().GetName().Name;
shortcut.TargetPath = appPath;
- shortcut.Save();
+ shortcut.Save();*/
}
}
-}
-#endif
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/Jackett/Windows/Main.resx b/src/Jackett.Tray/Main.resx
similarity index 100%
rename from src/Jackett/Windows/Main.resx
rename to src/Jackett.Tray/Main.resx
diff --git a/src/Jackett.Tray/Program.cs b/src/Jackett.Tray/Program.cs
new file mode 100644
index 000000000..b902536cd
--- /dev/null
+++ b/src/Jackett.Tray/Program.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace JackettTray
+{
+ static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Main());
+ }
+ }
+}
diff --git a/src/Jackett.Tray/Properties/AssemblyInfo.cs b/src/Jackett.Tray/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..0f6590c99
--- /dev/null
+++ b/src/Jackett.Tray/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Jackett.Tray")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Jackett.Tray")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ff9025b1-ec14-4aa9-8081-9f69c5e35b63")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Jackett.Tray/Properties/Resources.Designer.cs b/src/Jackett.Tray/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..b6ce33f0b
--- /dev/null
+++ b/src/Jackett.Tray/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Jackett.Tray.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Jackett.Tray.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/src/Jackett.Tray/Properties/Resources.resx b/src/Jackett.Tray/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/src/Jackett.Tray/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/src/Jackett.Tray/Properties/Settings.Designer.cs b/src/Jackett.Tray/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..c110e9e5e
--- /dev/null
+++ b/src/Jackett.Tray/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Jackett.Tray.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/src/Jackett.Tray/Properties/Settings.settings b/src/Jackett.Tray/Properties/Settings.settings
new file mode 100644
index 000000000..39645652a
--- /dev/null
+++ b/src/Jackett.Tray/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/src/Jackett.Tray/jackett.ico b/src/Jackett.Tray/jackett.ico
new file mode 100644
index 000000000..6392acc61
Binary files /dev/null and b/src/Jackett.Tray/jackett.ico differ
diff --git a/src/Jackett.sln b/src/Jackett.sln
index a7c6e3384..bd24b6def 100644
--- a/src/Jackett.sln
+++ b/src/Jackett.sln
@@ -9,10 +9,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CurlSharp", "CurlSharp\Curl
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE7B0C8A-6144-47CD-821E-B09BA1B7BADE}"
ProjectSection(SolutionItems) = preProject
+ ..\Build.bat = ..\Build.bat
+ ..\Installer.iss = ..\Installer.iss
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Console", "Jackett.Console\Jackett.Console.csproj", "{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Service", "Jackett.Service\Jackett.Service.csproj", "{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Tray", "Jackett.Tray\Jackett.Tray.csproj", "{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +35,18 @@ Global
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/Jackett/App.config b/src/Jackett/App.config
index 56ebf3f29..547fa70d5 100644
--- a/src/Jackett/App.config
+++ b/src/Jackett/App.config
@@ -9,7 +9,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Jackett/WebContent/animate.css b/src/Jackett/Content/animate.css
similarity index 100%
rename from src/Jackett/WebContent/animate.css
rename to src/Jackett/Content/animate.css
diff --git a/src/Jackett/WebContent/binding_dark.png b/src/Jackett/Content/binding_dark.png
similarity index 100%
rename from src/Jackett/WebContent/binding_dark.png
rename to src/Jackett/Content/binding_dark.png
diff --git a/src/Jackett/WebContent/bootstrap-notify.js b/src/Jackett/Content/bootstrap-notify.js
similarity index 100%
rename from src/Jackett/WebContent/bootstrap-notify.js
rename to src/Jackett/Content/bootstrap-notify.js
diff --git a/src/Jackett/WebContent/bootstrap/bootstrap.min.css b/src/Jackett/Content/bootstrap/bootstrap.min.css
similarity index 100%
rename from src/Jackett/WebContent/bootstrap/bootstrap.min.css
rename to src/Jackett/Content/bootstrap/bootstrap.min.css
diff --git a/src/Jackett/WebContent/bootstrap/bootstrap.min.js b/src/Jackett/Content/bootstrap/bootstrap.min.js
similarity index 100%
rename from src/Jackett/WebContent/bootstrap/bootstrap.min.js
rename to src/Jackett/Content/bootstrap/bootstrap.min.js
diff --git a/src/Jackett/WebContent/common.js b/src/Jackett/Content/common.js
similarity index 100%
rename from src/Jackett/WebContent/common.js
rename to src/Jackett/Content/common.js
diff --git a/src/Jackett/WebContent/congruent_outline.png b/src/Jackett/Content/congruent_outline.png
similarity index 100%
rename from src/Jackett/WebContent/congruent_outline.png
rename to src/Jackett/Content/congruent_outline.png
diff --git a/src/Jackett/WebContent/crissXcross.png b/src/Jackett/Content/crissXcross.png
similarity index 100%
rename from src/Jackett/WebContent/crissXcross.png
rename to src/Jackett/Content/crissXcross.png
diff --git a/src/Jackett/WebContent/custom.css b/src/Jackett/Content/custom.css
similarity index 100%
rename from src/Jackett/WebContent/custom.css
rename to src/Jackett/Content/custom.css
diff --git a/src/Jackett/WebContent/custom.js b/src/Jackett/Content/custom.js
similarity index 81%
rename from src/Jackett/WebContent/custom.js
rename to src/Jackett/Content/custom.js
index c79c6fa97..940018b69 100644
--- a/src/Jackett/WebContent/custom.js
+++ b/src/Jackett/Content/custom.js
@@ -5,22 +5,29 @@ loadJackettSettings();
function loadJackettSettings() {
getJackettConfig(function (data) {
+
+ $("#api-key-input").val(data.config.api_key);
+ $("#app-version").html(data.app_version);
$("#jackett-port").val(data.config.port);
+ var password = data.config.password;
+ $("#jackett-adminpwd").val(password);
+ if (password != null && password != '') {
+ $("#logoutBtn").show();
+ }
});
}
$("#change-jackett-port").click(function () {
var jackett_port = $("#jackett-port").val();
- var jsonObject = JSON.parse('{"port":"' + jackett_port + '"}');
-
- var jqxhr = $.post("apply_jackett_config", JSON.stringify(jsonObject), function (data) {
+ var jsonObject = { port: jackett_port};
+ var jqxhr = $.post("/admin/apply_jackett_config", JSON.stringify(jsonObject), function (data) {
if (data.result == "error") {
doNotify("Error: " + data.error, "danger", "glyphicon glyphicon-alert");
return;
} else {
doNotify("The port has been changed. Jackett will now restart...", "success", "glyphicon glyphicon-ok");
- var jqxhr0 = $.post("jackett_restart", null, function (data_restart) { });
+ var jqxhr0 = $.post("admin/jackett_restart", null, function (data_restart) { });
window.setTimeout(function () {
url = window.location.href;
@@ -34,8 +41,30 @@ $("#change-jackett-port").click(function () {
});
});
+$("#change-jackett-password").click(function () {
+ var password = $("#jackett-adminpwd").val();
+ var jsonObject = { password: password };
+
+ var jqxhr = $.post("/admin/set_admin_password", JSON.stringify(jsonObject), function (data) {
+
+ if (data.result == "error") {
+ doNotify("Error: " + data.error, "danger", "glyphicon glyphicon-alert");
+ return;
+ } else {
+ doNotify("Admin password has been set.", "success", "glyphicon glyphicon-ok");
+
+ window.setTimeout(function () {
+ window.location = window.location.pathname;
+ }, 1000);
+
+ }
+ }).fail(function () {
+ doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
+ });
+});
+
function getJackettConfig(callback) {
- var jqxhr = $.get("get_jackett_config", function (data) {
+ var jqxhr = $.get("/admin/get_jackett_config", function (data) {
callback(data);
}).fail(function () {
@@ -47,9 +76,7 @@ function reloadIndexers() {
$('#indexers').hide();
$('#indexers > .indexer').remove();
$('#unconfigured-indexers').empty();
- var jqxhr = $.get("get_indexers", function (data) {
- $("#api-key-input").val(data.api_key);
- $("#app-version").html(data.app_version);
+ var jqxhr = $.get("/admin/get_indexers", function (data) {
displayIndexers(data.items);
}).fail(function () {
doNotify("Error loading indexers, request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
@@ -82,7 +109,7 @@ function prepareDeleteButtons() {
var $btn = $(btn);
var id = $btn.data("id");
$btn.click(function () {
- var jqxhr = $.post("delete_indexer", JSON.stringify({ indexer: id }), function (data) {
+ var jqxhr = $.post("/admin/delete_indexer", JSON.stringify({ indexer: id }), function (data) {
if (data.result == "error") {
doNotify("Delete error for " + id + "\n" + data.error, "danger", "glyphicon glyphicon-alert");
}
@@ -114,7 +141,7 @@ function prepareTestButtons() {
var id = $btn.data("id");
$btn.click(function () {
doNotify("Test started for " + id, "info", "glyphicon glyphicon-transfer");
- var jqxhr = $.post("test_indexer", JSON.stringify({ indexer: id }), function (data) {
+ var jqxhr = $.post("/admin/test_indexer", JSON.stringify({ indexer: id }), function (data) {
if (data.result == "error") {
doNotify("Test failed for " + data.name + "\n" + data.error, "danger", "glyphicon glyphicon-alert");
}
@@ -130,7 +157,7 @@ function prepareTestButtons() {
function displayIndexerSetup(id) {
- var jqxhr = $.post("get_config_form", JSON.stringify({ indexer: id }), function (data) {
+ var jqxhr = $.post("/admin/get_config_form", JSON.stringify({ indexer: id }), function (data) {
if (data.result == "error") {
doNotify("Error: " + data.error, "danger", "glyphicon glyphicon-alert");
return;
@@ -200,7 +227,7 @@ function populateSetupForm(indexerId, name, config) {
$goButton.prop('disabled', true);
$goButton.html($('#templates > .spinner')[0].outerHTML);
- var jqxhr = $.post("configure_indexer", JSON.stringify(data), function (data) {
+ var jqxhr = $.post("/admin/configure_indexer", JSON.stringify(data), function (data) {
if (data.result == "error") {
if (data.config) {
populateConfigItems(configForm, data.config);
diff --git a/src/Jackett/Content/favicon.ico b/src/Jackett/Content/favicon.ico
new file mode 100644
index 000000000..6392acc61
Binary files /dev/null and b/src/Jackett/Content/favicon.ico differ
diff --git a/src/Jackett/Content/fonts/glyphicons-halflings-regular.eot b/src/Jackett/Content/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 000000000..b93a4953f
Binary files /dev/null and b/src/Jackett/Content/fonts/glyphicons-halflings-regular.eot differ
diff --git a/src/Jackett/Content/fonts/glyphicons-halflings-regular.svg b/src/Jackett/Content/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 000000000..94fb5490a
--- /dev/null
+++ b/src/Jackett/Content/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+
+
+
\ No newline at end of file
diff --git a/src/Jackett/Content/fonts/glyphicons-halflings-regular.ttf b/src/Jackett/Content/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 000000000..1413fc609
Binary files /dev/null and b/src/Jackett/Content/fonts/glyphicons-halflings-regular.ttf differ
diff --git a/src/Jackett/WebContent/fonts/glyphicons-halflings-regular.woff b/src/Jackett/Content/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from src/Jackett/WebContent/fonts/glyphicons-halflings-regular.woff
rename to src/Jackett/Content/fonts/glyphicons-halflings-regular.woff
diff --git a/src/Jackett/Content/fonts/glyphicons-halflings-regular.woff2 b/src/Jackett/Content/fonts/glyphicons-halflings-regular.woff2
new file mode 100644
index 000000000..64539b54c
Binary files /dev/null and b/src/Jackett/Content/fonts/glyphicons-halflings-regular.woff2 differ
diff --git a/src/Jackett/WebContent/handlebars-v3.0.1.js b/src/Jackett/Content/handlebars-v3.0.1.js
similarity index 100%
rename from src/Jackett/WebContent/handlebars-v3.0.1.js
rename to src/Jackett/Content/handlebars-v3.0.1.js
diff --git a/src/Jackett/WebContent/index.html b/src/Jackett/Content/index.html
similarity index 82%
rename from src/Jackett/WebContent/index.html
rename to src/Jackett/Content/index.html
index e63a95ac6..d3b31d560 100644
--- a/src/Jackett/WebContent/index.html
+++ b/src/Jackett/Content/index.html
@@ -6,21 +6,21 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
Jackett
-

+
@@ -35,6 +35,16 @@
+