Always use Invariant shortcuts for ToLower/ToUpper

This commit is contained in:
N00MKRAD
2024-09-03 22:08:38 +02:00
parent c31c76f423
commit 9672c31fba
48 changed files with 139 additions and 235 deletions

View File

@@ -18,7 +18,7 @@ namespace Flowframes.Data
public string NameLong { get; set; } = "";
public string FriendlyName { get { return $"{NameShort} ({GetFrameworkString(Backend)})"; } }
public string Description { get { return $"{GetImplemString(Backend)} of {NameShort}{(Backend == AiBackend.Pytorch ? " (Nvidia Only!)" : "")}"; } }
public string PkgDir { get { return NameInternal.Replace("_", "-").ToLowerInvariant(); } }
public string PkgDir { get { return NameInternal.Replace("_", "-").Lower(); } }
public enum InterpFactorSupport { Fixed, AnyPowerOfTwo, AnyInteger, AnyFloat }
public InterpFactorSupport FactorSupport { get; set; } = InterpFactorSupport.Fixed;
public int[] SupportedFactors { get; set; } = new int[0];

View File

@@ -184,7 +184,7 @@ namespace Flowframes
bool gifOutput = outSettings.Encoder == Enums.Encoding.Encoder.Gif;
bool proResAlpha = outSettings.Encoder == Enums.Encoding.Encoder.ProResKs && OutputUtils.AlphaFormats.Contains(outSettings.PixelFormat);
bool outputSupportsAlpha = pngOutput || gifOutput || proResAlpha;
string ext = inputIsFrames ? Path.GetExtension(IoUtils.GetFilesSorted(inPath).First()).ToLowerInvariant() : Path.GetExtension(inPath).ToLowerInvariant();
string ext = inputIsFrames ? Path.GetExtension(IoUtils.GetFilesSorted(inPath).First()).Lower() : Path.GetExtension(inPath).Lower();
alpha = (alphaModel && outputSupportsAlpha && (ext == ".gif" || ext == ".png" || ext == ".apng" || ext == ".mov"));
Logger.Log($"RefreshAlpha: model.supportsAlpha = {alphaModel} - outputSupportsAlpha = {outputSupportsAlpha} - input ext: {ext} => alpha = {alpha}", true);
}

View File

@@ -66,7 +66,7 @@ namespace Flowframes.Data
Name = FileInfo.Name;
SourcePath = FileInfo.FullName;
ImportPath = FileInfo.FullName;
Format = FileInfo.Extension.Remove(".").ToUpper();
Format = FileInfo.Extension.Remove(".").Upper();
InputRate = new Fraction(-1, 1);
}

View File

@@ -13,7 +13,7 @@ namespace Flowframes.Data
{
streamIndex = streamNum;
lang = metaStr.Trim().Replace("_", ".").Replace(" ", ".");
//langFriendly = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(metaStr.ToLowerInvariant().Trim().Replace("_", ".").Replace(" ", "."));
//langFriendly = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(metaStr.Lower().Trim().Replace("_", ".").Replace(" ", "."));
encoding = encodingStr.Trim();
}
}