Browse Source

fix startup bug (#426)

pull/429/head
Jason Dove 5 years ago committed by GitHub
parent
commit
7ed4b8ae3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 8
      ErsatzTV/Services/RunOnce/PlatformSettingsService.cs

2
CHANGELOG.md

@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Fixed
- Fix startup bug for linux/docker installations without a `/dev/dri` folder
## [0.1.2-alpha] - 2021-10-12
### Added

8
ErsatzTV/Services/RunOnce/PlatformSettingsService.cs

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@ -40,8 +39,9 @@ namespace ErsatzTV.Services.RunOnce @@ -40,8 +39,9 @@ namespace ErsatzTV.Services.RunOnce
IConfigElementRepository repo = scope.ServiceProvider.GetRequiredService<IConfigElementRepository>();
await repo.Upsert(ConfigElementKey.FFmpegSaveReports, false);
}
if (runtimeInfo != null && runtimeInfo.IsOSPlatform(OSPlatform.Linux))
if (runtimeInfo != null && runtimeInfo.IsOSPlatform(OSPlatform.Linux) &&
System.IO.Directory.Exists("/dev/dri"))
{
ILocalFileSystem localFileSystem = scope.ServiceProvider.GetRequiredService<ILocalFileSystem>();
IMemoryCache memoryCache = scope.ServiceProvider.GetRequiredService<IMemoryCache>();

Loading…
Cancel
Save