diff options
Diffstat (limited to 'Services/ConfigService.cs')
| -rw-r--r-- | Services/ConfigService.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Services/ConfigService.cs b/Services/ConfigService.cs index b42b80c..8460fd0 100644 --- a/Services/ConfigService.cs +++ b/Services/ConfigService.cs @@ -5,6 +5,7 @@ public interface IConfigService { public string DbConnectionString { get; } public string MediaBasePath { get; } public string ThumbnailBasePath { get; } + public bool EnableOcr { get; } } public class ConfigService : IConfigService { @@ -46,6 +47,9 @@ public class ConfigService : IConfigService { public string ThumbnailBasePath => Path.Join(DataPath, "thumb"); + public bool EnableOcr => + bool.TryParse(config["DisableOcr"], out bool x) ? !x : true; + public ConfigService(IConfiguration config) { this.config = config; InitDirectoryStructure(); |
