thrownewCorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://github.com/Sonarr/Sonarr/wiki/FAQ#i-use-sonarr-on-a-mac-and-it-suddenly-stopped-working-what-happened",e,fileName);
thrownewCorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://wiki.servarr.com/Readarr_FAQ#I_use_Readarr_on_a_Mac_and_it_suddenly_stopped_working_What_happened",e,fileName);
}
}
thrownewCorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://github.com/Readarr/Readarr/wiki/FAQ#i-am-getting-an-error-database-disk-image-is-malformed",e,fileName);
thrownewCorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://wiki.servarr.com/Readarr_FAQ#I_am_getting_an_error_Database_disk_image_is_malformed",e,fileName);
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote calibre for root folder {folder.Name} reports files in {libraryFolder} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and root folder settings.","#bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote calibre for root folder {folder.Name} reports files in {libraryFolder} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and root folder settings.","#bad_remote_path_mapping");
}
}
elseif(_osInfo.IsDocker)
elseif(_osInfo.IsDocker)
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; calibre for root folder {folder.Name} reports files in {libraryFolder} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.","#docker-bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; calibre for root folder {folder.Name} reports files in {libraryFolder} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.","#docker_bad_remote_path_mapping");
}
}
else
else
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Local calibre server for root folder {folder.Name} reports files in {libraryFolder} but this is not a valid {_osInfo.Name} path. Review your download client settings.","#bad-download-client-settings");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Local calibre server for root folder {folder.Name} reports files in {libraryFolder} but this is not a valid {_osInfo.Name} path. Review your download client settings.","#bad_download_client_settings");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; calibre server for root folder {folder.Name} places downloads in {libraryFolder} 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");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; calibre server for root folder {folder.Name} places downloads in {libraryFolder} 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");
}
}
elseif(!calibreIsLocal)
elseif(!calibreIsLocal)
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote calibre server for root folder {folder.Name} places downloads in {libraryFolder} but this directory does not appear to exist. Likely missing or incorrect remote path mapping.","#bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote calibre server for root folder {folder.Name} places downloads in {libraryFolder} but this directory does not appear to exist. Likely missing or incorrect remote path mapping.","#bad_remote_path_mapping");
}
}
else
else
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Calibre server for root folder {folder.Name} places downloads in {libraryFolder} but Readarr cannot see this directory. You may need to adjust the folder's permissions or add a remote path mapping if calibre is running in docker","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Calibre server for root folder {folder.Name} places downloads in {libraryFolder} but Readarr cannot see this directory. You may need to adjust the folder's permissions or add a remote path mapping if calibre is running in docker","#permissions_error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; calibre server for root folder {folder.Name} listed file {file} but this file does not appear to exist inside the container. Review permissions for {libraryFolder} and PUID/PGID container settings","#docker-bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; calibre server for root folder {folder.Name} listed file {file} but this file does not appear to exist inside the container. Review permissions for {libraryFolder} and PUID/PGID container settings","#docker_bad_remote_path_mapping");
}
}
elseif(!calibreIsLocal)
elseif(!calibreIsLocal)
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote calibre server for root folder {folder.Name} listed file {file} but this file does not appear to exist. Review permissions for {libraryFolder}","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote calibre server for root folder {folder.Name} listed file {file} but this file does not appear to exist. Review permissions for {libraryFolder}","#permissions_error");
}
}
else
else
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Calibre server for root folder {folder.Name} listed file {file} but Readarr cannot see this file. Review permissions for {libraryFolder}","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Calibre server for root folder {folder.Name} listed file {file} but Readarr cannot see this file. Review permissions for {libraryFolder}","#permissions_error");
}
}
}
}
if(!libraryFolder.PathEquals(folder.Path))
if(!libraryFolder.PathEquals(folder.Path))
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Calibre for root folder {folder.Name} reports files in {libraryFolder} but this is not the same as the root folder path {folder.Path} you chose. You may need to edit any remote path mapping or delete the root folder and re-create with the correct path","#calibre-root-does-not-match");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Calibre for root folder {folder.Name} reports files in {libraryFolder} but this is not the same as the root folder path {folder.Path} you chose. You may need to edit any remote path mapping or delete the root folder and re_create with the correct path","#calibre_root_does_not_match");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All download clients are unavailable due to failures","#download-clients-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All download clients are unavailable due to failures","#download_clients_are_unavailable_due_to_failures");
}
}
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Download clients unavailable due to failures: {0}",string.Join(", ",backOffProviders.Select(v=>v.Provider.Definition.Name))),"#download-clients-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Download clients unavailable due to failures: {0}",string.Join(", ",backOffProviders.Select(v=>v.Provider.Definition.Name))),"#download_clients_are_unavailable_due_to_failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All import lists are unavailable due to failures","#import-lists-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All import lists are unavailable due to failures","#import_lists_are_unavailable_due_to_failures");
}
}
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Import lists unavailable due to failures: {0}",string.Join(", ",backOffProviders.Select(v=>v.ImportList.Definition.Name))),"#import-lsits-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Import lists unavailable due to failures: {0}",string.Join(", ",backOffProviders.Select(v=>v.ImportList.Definition.Name))),"#import_lsits_are_unavailable_due_to_failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All indexers are unavailable due to failures","#indexers-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All indexers are unavailable due to failures","#indexers_are_unavailable_due_to_failures");
}
}
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Indexers unavailable due to failures: {0}",string.Join(", ",backOffProviders.Select(v=>v.Provider.Definition.Name))),"#indexers-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Indexers unavailable due to failures: {0}",string.Join(", ",backOffProviders.Select(v=>v.Provider.Definition.Name))),"#indexers_are_unavailable_due_to_failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"Mount containing a author path is mounted read-only: "+string.Join(",",mounts.Select(m=>m.Name)),"#author-mount-ro");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,"Mount containing a author path is mounted read-only: "+string.Join(",",mounts.Select(m=>m.Name)),"#author_mount_ro");
returnnewHealthCheck(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");
returnnewHealthCheck(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");
}
}
elseif(_osInfo.IsDocker)
elseif(_osInfo.IsDocker)
{
{
returnnewHealthCheck(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");
returnnewHealthCheck(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
else
{
{
returnnewHealthCheck(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");
returnnewHealthCheck(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");
returnnewHealthCheck(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");
returnnewHealthCheck(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");
}
}
elseif(!status.IsLocalhost)
elseif(!status.IsLocalhost)
{
{
returnnewHealthCheck(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");
returnnewHealthCheck(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
else
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Download client {client.Definition.Name} places downloads in {folder.FullPath} but Readarr cannot see this directory. You may need to adjust the folder's permissions.","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Download client {client.Definition.Name} places downloads in {folder.FullPath} but Readarr cannot see this directory. You may need to adjust the folder's permissions.","#permissions_error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Readarr can see but not access downloaded track {trackPath}. Likely permissions error.","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Readarr can see but not access downloaded track {trackPath}. Likely permissions error.","#permissions_error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote download client {client.Definition.Name} reported files in {dlpath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.","#bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote download client {client.Definition.Name} reported files in {dlpath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.","#bad_remote_path_mapping");
}
}
elseif(_osInfo.IsDocker)
elseif(_osInfo.IsDocker)
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; download client {client.Definition.Name} reported files in {dlpath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.","#docker-bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; download client {client.Definition.Name} reported files in {dlpath} but this is not a valid {_osInfo.Name} path. Review your remote path mappings and download client settings.","#docker_bad_remote_path_mapping");
}
}
else
else
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Local download client {client.Definition.Name} reported files in {dlpath} but this is not a valid {_osInfo.Name} path. Review your download client settings.","#bad-download-client-settings");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Local download client {client.Definition.Name} reported files in {dlpath} but this is not a valid {_osInfo.Name} path. Review your download client settings.","#bad_download_client_settings");
}
}
}
}
if(_diskProvider.FolderExists(dlpath))
if(_diskProvider.FolderExists(dlpath))
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Readarr can see but not access download directory {dlpath}. Likely permissions error.","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Readarr can see but not access download directory {dlpath}. Likely permissions error.","#permissions_error");
}
}
// if it's a remote client/docker, likely missing path mappings
// if it's a remote client/docker, likely missing path mappings
if(_osInfo.IsDocker)
if(_osInfo.IsDocker)
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; download client {client.Definition.Name} reported files in {dlpath} 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");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"You are using docker; download client {client.Definition.Name} reported files in {dlpath} 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");
}
}
elseif(!status.IsLocalhost)
elseif(!status.IsLocalhost)
{
{
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote download client {client.Definition.Name} reported files in {dlpath} but this directory does not appear to exist. Likely missing remote path mapping.","#bad-remote-path-mapping");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Remote download client {client.Definition.Name} reported files in {dlpath} but this directory does not appear to exist. Likely missing remote path mapping.","#bad_remote_path_mapping");
}
}
else
else
{
{
// path mappings shouldn't be needed locally so probably a permissions issue
// path mappings shouldn't be needed locally so probably a permissions issue
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Download client {client.Definition.Name} reported files in {dlpath} but Readarr cannot see this directory. You may need to adjust the folder's permissions.","#permissions-error");
returnnewHealthCheck(GetType(),HealthCheckResult.Error,$"Download client {client.Definition.Name} reported files in {dlpath} but Readarr cannot see this directory. You may need to adjust the folder's permissions.","#permissions_error");
publicoverrideProviderMessageMessage=>newProviderMessage("Testing will execute the script with the EventType set to Test, ensure your script handles this correctly",ProviderMessageType.Warning);
publicoverrideProviderMessageMessage=>newProviderMessage("Testing will execute the script with the EventType set to Test, ensure your script handles this correctly",ProviderMessageType.Warning);