fix: display settings fix for languages on less than 7.2-beta.2.3 (#1696)

…less
This commit is contained in:
Eli Bosley
2025-09-12 13:32:26 -04:00
committed by GitHub
parent 0990b898bd
commit 03dae7ce66

View File

@@ -1,6 +1,9 @@
import { readFile } from 'node:fs/promises';
import { FileModification } from '@app/unraid-api/unraid-file-modifier/file-modification.js';
import {
FileModification,
ShouldApplyWithReason,
} from '@app/unraid-api/unraid-file-modifier/file-modification.js';
export default class DisplaySettingsModification extends FileModification {
id: string = 'display-settings';
@@ -34,4 +37,15 @@ export default class DisplaySettingsModification extends FileModification {
return this.createPatchWithDiff(overridePath ?? this.filePath, fileContent, newContent);
}
async shouldApply(): Promise<ShouldApplyWithReason> {
const superShouldApply = await super.shouldApply();
if (!superShouldApply.shouldApply) {
return superShouldApply;
}
return {
shouldApply: true,
reason: 'Display settings modification needed for Unraid version <= 7.2.0-beta.2.3',
};
}
}