Fix compilation under mono #117. Allow explicit web client selection. Init curl at application start.

This commit is contained in:
KZ
2015-07-30 18:50:46 +01:00
parent c76137a70c
commit 922583ea5d
21 changed files with 139 additions and 59 deletions

View File

@@ -9,6 +9,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
@@ -34,11 +35,14 @@ namespace JackettConsole
}
else
{
/* ====== Options ===== */
// Use curl
if (options.UseCurlExec)
Startup.CurlSafe = true;
if (options.Client!=null)
Startup.ClientOverride = options.Client.ToLowerInvariant();
// Logging
if (options.Logging)
@@ -50,9 +54,6 @@ namespace JackettConsole
// Log after the fact as using the logger will cause the options above to be used
if (options.UseCurlExec)
Engine.Logger.Info("Safe curl enabled.");
if (options.Logging)
Engine.Logger.Info("Logging enabled.");