mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
unify some config params, and move datfile location to app data
This commit is contained in:
@@ -87,7 +87,14 @@ internal static class Config
|
||||
public static string PreferredFontFamily => config.GetValue(nameof(PreferredFontFamily), "");
|
||||
public static string LogPath => config.GetValue(nameof(LogPath), "./logs/"); // paths are relative to the working directory
|
||||
public static string IrdCachePath => config.GetValue(nameof(IrdCachePath), "./ird/");
|
||||
public static string RedumpDatfileCachePath => config.GetValue(nameof(RedumpDatfileCachePath), "./datfile/");
|
||||
public static string BotAppDataFolder => config.GetValue(
|
||||
nameof(BotAppDataFolder),
|
||||
Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"compat-bot"
|
||||
)
|
||||
);
|
||||
public static string RedumpDatfileCachePath => Path.Combine(BotAppDataFolder, "compat-bot", "datfile");
|
||||
public static string RenameNameSuffix => config.GetValue(nameof(RenameNameSuffix), " (Rule 7)");
|
||||
public static string OcrBackend => config.GetValue(nameof(OcrBackend), "auto"); // possible values: auto, tesseract, florence2, azure
|
||||
|
||||
@@ -248,6 +255,7 @@ internal static class Config
|
||||
var fileTarget = new FileTarget("logfile") {
|
||||
FileName = CurrentLogPath,
|
||||
ArchiveEvery = FileArchivePeriod.Day,
|
||||
MaxArchiveDays = 30,
|
||||
//ArchiveSuffixFormat = ".{1:yyyyMMdd}.{0:00}",
|
||||
ArchiveNumbering = ArchiveNumberingMode.DateAndSequence,
|
||||
ConcurrentWrites = false,
|
||||
@@ -334,4 +342,4 @@ internal static class Config
|
||||
var branch = await GitRunner.Exec("rev-parse --abbrev-ref HEAD", cancellationToken);
|
||||
GitRevision = $"{commit} on {branch}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user