mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Make export file separator ('-' by default) customizable in config
This commit is contained in:
@@ -165,6 +165,8 @@ namespace Flowframes.IO
|
||||
if (key == "modelsBaseUrl") return WriteDefault(key, "https://raw.githubusercontent.com/n00mkrad/flowframes/main/Models/");
|
||||
if (key == "ffEncPreset") return WriteDefault(key, "medium");
|
||||
if (key == "ffEncArgs") return WriteDefault(key, "");
|
||||
// Misc, not exposed in UI
|
||||
if (key == "exportFilenameSeparator") return WriteDefault(key, "-");
|
||||
|
||||
if (type == Type.Int || type == Type.Float) return WriteDefault(key, "0"); // Write default int/float (0)
|
||||
if (type == Type.Bool) return WriteDefault(key, "False"); // Write default bool (False)
|
||||
|
||||
@@ -413,9 +413,10 @@ namespace Flowframes.IO
|
||||
|
||||
public static string GetExportSuffix(float factor, AI ai, string mdl)
|
||||
{
|
||||
string suffix = $"-{factor.ToStringDot()}x-{ai.aiNameShort.ToUpper()}";
|
||||
string sep = Config.Get("exportFilenameSeparator");
|
||||
string suffix = $"{sep}{factor.ToStringDot()}x{sep}{ai.aiNameShort.ToUpper()}";
|
||||
if (Config.GetBool("modelSuffix"))
|
||||
suffix += $"-{mdl}";
|
||||
suffix += $"{sep}{mdl}";
|
||||
return suffix;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Flowframes.Main
|
||||
await Encode(mode, path, outPath, I.current.outFps);
|
||||
|
||||
if (fpsLimit)
|
||||
await Encode(mode, path, outPath.FilenameSuffix($"-{maxFps.ToStringDot("0.00")}fps"), I.current.outFps, maxFps);
|
||||
await Encode(mode, path, outPath.FilenameSuffix($"{Config.Get("exportFilenameSeparator")}{maxFps.ToStringDot("0.00")}fps"), I.current.outFps, maxFps);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user