mirror of https://github.com/Jackett/Jackett
parent
ac07cc34cd
commit
0fc3d224ab
|
@ -60,6 +60,9 @@ namespace Jackett.Console
|
||||||
[Option('n', "IgnoreSslErrors", HelpText = "[true/false] Linux Libcurl - Ignores invalid SSL certificates")]
|
[Option('n', "IgnoreSslErrors", HelpText = "[true/false] Linux Libcurl - Ignores invalid SSL certificates")]
|
||||||
public bool? IgnoreSslErrors { get; set; }
|
public bool? IgnoreSslErrors { get; set; }
|
||||||
|
|
||||||
|
[Option('d', "DataFolder", HelpText = "Specify the location of the data folder (Must be admin on Windows) eg. --DataFolder=\"D:\\Your Data\\Jackett\\\"")]
|
||||||
|
public string DataFolder { get; set; }
|
||||||
|
|
||||||
[ParserState]
|
[ParserState]
|
||||||
public IParserState LastParserState { get; set; }
|
public IParserState LastParserState { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,13 @@ namespace JackettConsole
|
||||||
Engine.Logger.Info("Curl will ignore SSL certificate errors.");
|
Engine.Logger.Info("Curl will ignore SSL certificate errors.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Choose Data Folder
|
||||||
|
if (!string.IsNullOrWhiteSpace(options.DataFolder))
|
||||||
|
{
|
||||||
|
Startup.CustomDataFolder = options.DataFolder.Replace("\"", string.Empty).Replace("'", string.Empty).Replace(@"\\", @"\");
|
||||||
|
Engine.Logger.Info("Jackett Data will be stored in: " + Startup.CustomDataFolder);
|
||||||
|
}
|
||||||
|
|
||||||
/* ====== Actions ===== */
|
/* ====== Actions ===== */
|
||||||
|
|
||||||
// Install service
|
// Install service
|
||||||
|
|
|
@ -213,6 +213,11 @@ namespace Jackett.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetAppDataFolderStatic()
|
public static string GetAppDataFolderStatic()
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(Startup.CustomDataFolder))
|
||||||
|
{
|
||||||
|
return Startup.CustomDataFolder;
|
||||||
|
}
|
||||||
|
|
||||||
if (System.Environment.OSVersion.Platform == PlatformID.Unix)
|
if (System.Environment.OSVersion.Platform == PlatformID.Unix)
|
||||||
{
|
{
|
||||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Jackett");
|
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Jackett");
|
||||||
|
|
|
@ -58,6 +58,12 @@ namespace Jackett
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string CustomDataFolder
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
public static string BasePath
|
public static string BasePath
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
Loading…
Reference in New Issue