mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Mono 5.8 is the minimum supported runtime
#3181 fix. Can get away without using RuntimeInformation and didn't consider public trackers without a password
This commit is contained in:
@@ -17,7 +17,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
|||||||
|
|
||||||
#### Supported Systems
|
#### Supported Systems
|
||||||
* Windows using .NET 4.6.1 or above [Download here](https://www.microsoft.com/net/framework/versions/net461).
|
* Windows using .NET 4.6.1 or above [Download here](https://www.microsoft.com/net/framework/versions/net461).
|
||||||
* Linux and macOS using Mono 5.4.0 and above. [Download here](http://www.mono-project.com/download/). Earlier versions of mono may work, but some trackers may fail to negotiate SSL correctly, and others may cause Jackett to crash when used.
|
* Linux and macOS using Mono 5.8 or above. [Download here](http://www.mono-project.com/download/). Earlier versions of mono may work, but some trackers may fail to negotiate SSL correctly, and others may cause Jackett to crash when used.
|
||||||
|
|
||||||
### Supported Public Trackers
|
### Supported Public Trackers
|
||||||
* 1337x
|
* 1337x
|
||||||
|
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
@@ -190,15 +189,7 @@ namespace Jackett.Common.Indexers
|
|||||||
}
|
}
|
||||||
|
|
||||||
Version dotNetVersion = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.RuntimeFramework.Version;
|
Version dotNetVersion = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.RuntimeFramework.Version;
|
||||||
bool isWindows = false;
|
bool isWindows = Environment.OSVersion.Platform == PlatformID.Win32NT;
|
||||||
try {
|
|
||||||
// RuntimeInformation not available on older mono versions?
|
|
||||||
isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
logger.Error(e, "IsOSPlatform check failed, assuming no windows system");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isWindows && dotNetVersion.Major < 4)
|
if (!isWindows && dotNetVersion.Major < 4)
|
||||||
{
|
{
|
||||||
@@ -216,9 +207,9 @@ namespace Jackett.Common.Indexers
|
|||||||
passwordPropertyValue = configData.GetType().GetProperty("Password").GetValue(configData, null);
|
passwordPropertyValue = configData.GetType().GetProperty("Password").GetValue(configData, null);
|
||||||
passwordValue = passwordPropertyValue.GetType().GetProperty("Value").GetValue(passwordPropertyValue, null).ToString();
|
passwordValue = passwordPropertyValue.GetType().GetProperty("Value").GetValue(passwordPropertyValue, null).ToString();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
logger.Info("Attempt to source password from json failed: " + ex.ToString());
|
logger.Debug($"Unable to source password for [{ID}] while attempting migration, likely a public tracker");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -153,9 +153,9 @@ namespace Jackett.Services
|
|||||||
logger.Error(notice);
|
logger.Error(notice);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (monoVersionO.Major < 5 || (monoVersionO.Major == 5 && monoVersionO.Minor < 4))
|
if (monoVersionO.Major < 5 || (monoVersionO.Major == 5 && monoVersionO.Minor < 8))
|
||||||
{
|
{
|
||||||
string notice = "Mono version 5.4 is the minimum required. Please update to the latest version from http://www.mono-project.com/download/";
|
string notice = "A minimum Mono version of 5.8 is required. Please update to the latest version from http://www.mono-project.com/download/";
|
||||||
_notices.Add(notice);
|
_notices.Add(notice);
|
||||||
logger.Error(notice);
|
logger.Error(notice);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user