This commit is contained in:
Jose Conde
2025-09-29 16:02:00 +02:00
parent dc57da8136
commit 5e16f781b4
74 changed files with 1621 additions and 1856 deletions

View File

@@ -1,4 +1,4 @@
using ModVersionChecker.data.model;
using ModVersionChecker.model;
using System.Text.Json;
using System.Text.RegularExpressions;
@@ -6,14 +6,14 @@ namespace ModVersionChecker.utils
{
public static class VersionUtils
{
public static string GetCurrentVersion(AppConfig app, FsModPathConfig config)
public static string GetCurrentVersion(App app, TypeConfig typeConfig)
{
var versionConfig = app.FsFields;
var packageName = versionConfig["msfs2024"]["package"];
var fsPath = config.Path;
var fsFile = config.File;
var fsFileType = config.FileType;
var fsKey = config.Key;
var versionConfig = app.Fields;
var packageName = versionConfig["package"];
var fsPath = typeConfig.ConfigValues.GetValueOrDefault("path", "");
var fsFile = typeConfig.ConfigValues.GetValueOrDefault("filename");
var fsFileType = typeConfig.ConfigValues.GetValueOrDefault("filetype", "");
var fsKey = typeConfig.ConfigValues.GetValueOrDefault("jsonkey", "");
var filePath = Path.GetFullPath(Path.Combine(fsPath, packageName, fsFile));