fix: patch version override logic incorrect

This commit is contained in:
Zack Spear
2025-03-27 14:37:49 -07:00
parent 0e7c4ee3ba
commit 14e0fed12a
2 changed files with 14 additions and 4 deletions

View File

@@ -119,7 +119,10 @@ class UnraidOsCheck
$patcherVersion = null;
if (file_exists('/tmp/Patcher/patches.json')) {
$patcherData = @json_decode(file_get_contents('/tmp/Patcher/patches.json'), true);
$patcherVersion = $patcherData['combinedVersion'] ?? null;
$unraidVersionInfo = parse_ini_file('/etc/unraid-version');
if ($patcherData['unraidVersion'] === $unraidVersionInfo['version']) {
$patcherVersion = $patcherData['combinedVersion'] ?? null;
}
}
$params['current_version'] = $patcherVersion ?: plugin('version', self::PLG_PATH) ?: _var($var, 'version');