Working version
This commit is contained in:
+29
-2
@@ -5,7 +5,34 @@ public sealed record AppSettings(
|
||||
string EndCardPath,
|
||||
string FfmpegPath,
|
||||
string FfprobePath,
|
||||
string Theme)
|
||||
string Theme,
|
||||
string Encoder,
|
||||
string TrimStart,
|
||||
string FadeSeconds,
|
||||
string EndCardHoldSeconds,
|
||||
string ThumbnailInterval)
|
||||
{
|
||||
public static AppSettings Default(string outputFolder) => new(outputFolder, "", "", "", "Dark");
|
||||
public static AppSettings Default(string outputFolder) => new(
|
||||
outputFolder,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Dark",
|
||||
"Auto",
|
||||
"4.414",
|
||||
"3",
|
||||
"4",
|
||||
"10");
|
||||
|
||||
public AppSettings Normalize(string fallbackOutputFolder) => new(
|
||||
string.IsNullOrWhiteSpace(OutputFolder) ? fallbackOutputFolder : OutputFolder,
|
||||
EndCardPath ?? "",
|
||||
FfmpegPath ?? "",
|
||||
FfprobePath ?? "",
|
||||
string.IsNullOrWhiteSpace(Theme) ? "Dark" : Theme,
|
||||
string.IsNullOrWhiteSpace(Encoder) ? "Auto" : Encoder,
|
||||
string.IsNullOrWhiteSpace(TrimStart) ? "4.414" : TrimStart,
|
||||
string.IsNullOrWhiteSpace(FadeSeconds) ? "3" : FadeSeconds,
|
||||
string.IsNullOrWhiteSpace(EndCardHoldSeconds) ? "4" : EndCardHoldSeconds,
|
||||
string.IsNullOrWhiteSpace(ThumbnailInterval) ? "10" : ThumbnailInterval);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user