mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
Fix: Root Folder Downloads check giving errors when RuTorrent is used
This commit is contained in:
parent
95c7b96dff
commit
627a39b8fc
@ -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; }
|
||||||
}
|
}
|
||||||
|
@ -61,40 +61,37 @@ public override HealthCheck Check()
|
|||||||
{
|
{
|
||||||
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, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckWrongOSPath"), client.Definition.Name, folder.FullPath, _osInfo.Name), "#bad_remote_path_mapping");
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckWrongOSPath"), client.Definition.Name, folder.FullPath, _osInfo.Name), "#bad_remote_path_mapping");
|
|
||||||
}
|
|
||||||
else if (_osInfo.IsDocker)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckBadDockerPath"), client.Definition.Name, folder.FullPath, _osInfo.Name), "#docker_bad_remote_path_mapping");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckLocalWrongOSPath"), client.Definition.Name, folder.FullPath, _osInfo.Name), "#bad_download_client_settings");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if (_osInfo.IsDocker)
|
||||||
if (!_diskProvider.FolderExists(folder.FullPath))
|
|
||||||
{
|
{
|
||||||
if (_osInfo.IsDocker)
|
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckBadDockerPath"), client.Definition.Name, folder.FullPath, _osInfo.Name), "#docker_bad_remote_path_mapping");
|
||||||
{
|
}
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckDockerFolderMissing"), client.Definition.Name, folder.FullPath), "#docker_bad_remote_path_mapping");
|
else
|
||||||
}
|
{
|
||||||
else if (!status.IsLocalhost)
|
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckLocalWrongOSPath"), client.Definition.Name, folder.FullPath, _osInfo.Name), "#bad_download_client_settings");
|
||||||
{
|
}
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckLocalFolderMissing"), client.Definition.Name, folder.FullPath), "#bad_remote_path_mapping");
|
}
|
||||||
}
|
|
||||||
else
|
if (!_diskProvider.FolderExists(folder.FullPath))
|
||||||
{
|
{
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckGenericPermissions"), client.Definition.Name, folder.FullPath), "#permissions_error");
|
if (_osInfo.IsDocker)
|
||||||
}
|
{
|
||||||
|
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckDockerFolderMissing"), client.Definition.Name, folder.FullPath), "#docker_bad_remote_path_mapping");
|
||||||
|
}
|
||||||
|
else if (!status.IsLocalhost)
|
||||||
|
{
|
||||||
|
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckLocalFolderMissing"), client.Definition.Name, folder.FullPath), "#bad_remote_path_mapping");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckGenericPermissions"), client.Definition.Name, folder.FullPath), "#permissions_error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user