Stream custom live channels using your own media
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
1.0 KiB

using System.Runtime.InteropServices;
using ErsatzTV.Core;
using ErsatzTV.Core.Health;
using ErsatzTV.Core.Health.Checks;
namespace ErsatzTV.Infrastructure.Health.Checks;
public class MacOsConfigFolderHealthCheck : BaseHealthCheck, IMacOsConfigFolderHealthCheck
{
public override string Title => "MacOS Config Folder";
public Task<HealthCheckResult> Check(CancellationToken cancellationToken)
{
// only applies to macos
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return NotApplicableResult().AsTask();
}
if (Directory.Exists(FileSystemLayout.MacOsOldAppDataFolder))
{
var message =
$"Old config data exists; to migrate: exit ETV, backup the folder {FileSystemLayout.AppDataFolder} to another location, and restart ETV. Otherwise, move the old folder {FileSystemLayout.MacOsOldAppDataFolder} to another location to remove this message";
return FailResult(message).AsTask();
}
return NotApplicableResult().AsTask();
}
}