returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Download client {0} places downloads in the root folder {1}. You should not download to a root folder.",client.Definition.Name,folder.FullPath),"#downloads-in-root-folder");
}
}
}
catch(DownloadClientExceptionex)
{
_logger.Debug(ex,"Unable to communicate with {0}",client.Definition.Name);
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Failed to resolve the IP Address for the Configured Proxy Host {0}",_configService.ProxyHostname),"#proxy-failed-resolve-ip");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Remote download client {0} places downloads in {1} but this is not a valid {2} path. Review your remote path mappings and download client settings.",client.Definition.Name,folder.FullPath,_osInfo.Name),"#bad-remote-path-mapping");
}
elseif(_osInfo.IsDocker)
if(_osInfo.IsDocker)
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("You are using docker; download client {0} reported files in {1} but this is not a valid {2} path. Review your remote path mappings and download client settings.",client.Definition.Name,folder.FullPath,_osInfo.Name),"#docker-bad-remote-path-mapping");
}
else
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Local download client {0} places downloads in {1} but this is not a valid {2} path. Review your download client settings.",client.Definition.Name,folder.FullPath,_osInfo.Name),"#bad-download-client-settings");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("You are using docker; download client {0} places downloads in {1} but this directory does not appear to exist inside the container. Review your remote path mappings and container volume settings.",client.Definition.Name,folder.FullPath),"#docker-bad-remote-path-mapping");
}
elseif(!status.IsLocalhost)
if(!status.IsLocalhost)
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Remote download client {0} places downloads in {1} but this directory does not appear to exist. Likely missing or incorrect remote path mapping.",client.Definition.Name,folder.FullPath),"#bad-remote-path-mapping");
}
else
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Download client {0} places downloads in {1} but Sonarr cannot see this directory. You may need to adjust the folder's permissions.",client.Definition.Name,folder.FullPath),"#permissions-error");
}
}
}
}
catch(DownloadClientExceptionex)
{
_logger.Debug(ex,"Unable to communicate with {0}",client.Definition.Name);
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Sonarr can see but not access downloaded episode {0}. Likely permissions error.",episodePath),"#permissions-error");
}
else
{
// If the file doesn't exist but EpisodeInfo is not null then the message is coming from
// ImportApprovedEpisodes and the file must have been removed part way through processing
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("File {0} was removed part way through processing.",episodePath),"#remote-path-file-removed");
}
}
// If the previous case did not match then the failure occured in DownloadedEpisodeImportService,
// while trying to locate the files reported by the download client
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Remote download client {0} reported files in {1} but this is not a valid {2} path. Review your remote path mappings and download client settings.",client.Definition.Name,dlpath,_osInfo.Name),"#bad-remote-path-mapping");
}
elseif(_osInfo.IsDocker)
if(_osInfo.IsDocker)
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("You are using docker; download client {0} reported files in {1} but this is not a valid {2} path. Review your remote path mappings and download client settings.",client.Definition.Name,dlpath,_osInfo.Name),"#docker-bad-remote-path-mapping");
}
else
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Local download client {0} reported files in {1} but this is not a valid {2} path. Review your download client settings.",client.Definition.Name,dlpath,_osInfo.Name),"#bad-download-client-settings");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Sonarr can see but not access download directory {0}. Likely permissions error.",client.Definition.Name,dlpath),"#docker-bad-remote-path-mapping");
}
elseif(!status.IsLocalhost)
if(!status.IsLocalhost)
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Remote download client {0} reported files in {1} but this directory does not appear to exist. Likely missing remote path mapping.",client.Definition.Name,dlpath),"#bad-remote-path-mapping");
}
else
{
// path mappings shouldn't be needed locally so probably a permissions issue
returnnewHealthCheck(GetType(),HealthCheckResult.Error,string.Format("Download client {0} reported files in {1} but Sonarr cannot see this directory. You may need to adjust the folder's permissions.",client.Definition.Name,dlpath),"#permissions-error");
}
}
catch(DownloadClientExceptionex)
{
_logger.Debug(ex,"Unable to communicate with {0}",client.Definition.Name);