summaryrefslogtreecommitdiff
path: root/Services/ConfigService.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-03-25 01:57:19 +1100
committerJake Mannens <jake@asger.xyz>2026-03-25 01:57:46 +1100
commit6c06dfc4f83f30292e65c08a3cb0c48401d4bfa7 (patch)
tree511f88873fa6173637115a38c31ec5f8018e108e /Services/ConfigService.cs
parentc751709b1b4fe6f16fd84647e8e071455e7b78d6 (diff)
v0.2av0.2a
Diffstat (limited to 'Services/ConfigService.cs')
-rw-r--r--Services/ConfigService.cs4
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();