mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Fixed: Root Folder Downloads check giving errors when RuTorrent is used (#2266)
* Fixed: Root Folder Downloads check giving errors when RuTorrent is used * removed uneccesary if statement in RemotePathMappingCheck
This commit is contained in:
parent
bc6261efb8
commit
2573e96d7a
2 changed files with 31 additions and 29 deletions
|
@ -5,6 +5,11 @@ namespace NzbDrone.Core.Download
|
||||||
{
|
{
|
||||||
public class DownloadClientInfo
|
public class DownloadClientInfo
|
||||||
{
|
{
|
||||||
|
public DownloadClientInfo()
|
||||||
|
{
|
||||||
|
OutputRootFolders = new List<OsPath>();
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsLocalhost { get; set; }
|
public bool IsLocalhost { get; set; }
|
||||||
public List<OsPath> OutputRootFolders { get; set; }
|
public List<OsPath> OutputRootFolders { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,40 +58,37 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
||||||
{
|
{
|
||||||
var status = client.GetStatus();
|
var status = client.GetStatus();
|
||||||
var folders = status.OutputRootFolders;
|
var folders = status.OutputRootFolders;
|
||||||
if (folders != null)
|
foreach (var folder in folders)
|
||||||
{
|
{
|
||||||
foreach (var folder in folders)
|
if (!folder.IsValid)
|
||||||
{
|
{
|
||||||
if (!folder.IsValid)
|
if (!status.IsLocalhost)
|
||||||
{
|
{
|
||||||
if (!status.IsLocalhost)
|
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Remote download client {client.Definition.Name} places downloads in {folder.FullPath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.", "#bad_remote_path_mapping");
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Remote download client {client.Definition.Name} places downloads in {folder.FullPath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.", "#bad_remote_path_mapping");
|
|
||||||
}
|
|
||||||
else if (_osInfo.IsDocker)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, $"You are using docker; download client {client.Definition.Name} places downloads in {folder.FullPath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.", "#docker_bad_remote_path_mapping");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Local download client {client.Definition.Name} places downloads in {folder.FullPath} but this is not a valid {_osInfo.Name} path. Review your download client settings.", "#bad_download_client_settings");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if (_osInfo.IsDocker)
|
||||||
if (!_diskProvider.FolderExists(folder.FullPath))
|
|
||||||
{
|
{
|
||||||
if (_osInfo.IsDocker)
|
return new HealthCheck(GetType(), HealthCheckResult.Error, $"You are using docker; download client {client.Definition.Name} places downloads in {folder.FullPath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.", "#docker_bad_remote_path_mapping");
|
||||||
{
|
}
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, $"You are using docker; download client {client.Definition.Name} places downloads in {folder.FullPath} but this directory does not appear to exist inside the container. Review your remote path mappings and container volume settings.", "#docker_bad_remote_path_mapping");
|
else
|
||||||
}
|
{
|
||||||
else if (!status.IsLocalhost)
|
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Local download client {client.Definition.Name} places downloads in {folder.FullPath} but this is not a valid {_osInfo.Name} path. Review your download client settings.", "#bad_download_client_settings");
|
||||||
{
|
}
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Remote download client {client.Definition.Name} places downloads in {folder.FullPath} but this directory does not appear to exist. Likely missing or incorrect remote path mapping.", "#bad_remote_path_mapping");
|
}
|
||||||
}
|
|
||||||
else
|
if (!_diskProvider.FolderExists(folder.FullPath))
|
||||||
{
|
{
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Download client {client.Definition.Name} places downloads in {folder.FullPath} but Lidarr cannot see this directory. You may need to adjust the folder's permissions.", "#permissions_error");
|
if (_osInfo.IsDocker)
|
||||||
}
|
{
|
||||||
|
return new HealthCheck(GetType(), HealthCheckResult.Error, $"You are using docker; download client {client.Definition.Name} places downloads in {folder.FullPath} but this directory does not appear to exist inside the container. Review your remote path mappings and container volume settings.", "#docker_bad_remote_path_mapping");
|
||||||
|
}
|
||||||
|
else if (!status.IsLocalhost)
|
||||||
|
{
|
||||||
|
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Remote download client {client.Definition.Name} places downloads in {folder.FullPath} but this directory does not appear to exist. Likely missing or incorrect remote path mapping.", "#bad_remote_path_mapping");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new HealthCheck(GetType(), HealthCheckResult.Error, $"Download client {client.Definition.Name} places downloads in {folder.FullPath} but Lidarr cannot see this directory. You may need to adjust the folder's permissions.", "#permissions_error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue