fix: ignore imported versions

This commit is contained in:
DecDuck
2025-11-20 11:25:14 +11:00
parent beb824c8d9
commit d71bf7cb1a
4 changed files with 7 additions and 3 deletions

View File

@ -54,11 +54,12 @@ export class FilesystemProvider
return folderDirs;
}
async listVersions(game: string): Promise<string[]> {
async listVersions(game: string, ignoredVersions?: string[]): Promise<string[]> {
const gameDir = path.join(this.config.baseDir, game);
if (!fs.existsSync(gameDir)) throw new GameNotFoundError();
const versionDirs = fs.readdirSync(gameDir);
const validVersionDirs = versionDirs.filter((e) => {
if(ignoredVersions && ignoredVersions.includes(e)) return false
const fullDir = path.join(this.config.baseDir, game, e);
return DROPLET_HANDLER.hasBackendForPath(fullDir);
});