feat: Initial commit

This commit is contained in:
2026-06-27 23:25:12 +07:00
commit c8317eb02a
189 changed files with 20068 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import { homedir } from "node:os";
import { join } from "node:path";
import { existsSync, lstatSync, realpathSync } from "node:fs";
import { detectProtonScreenshots } from "../enhancements/screenshotSymlink";
function picturesVRChat(): string {
return join(homedir(), "Pictures", "VRChat");
}
function isRealDir(path: string): boolean {
try {
return lstatSync(path).isDirectory();
} catch {
return false;
}
}
export function galleryRoots(): string[] {
const candidates = [picturesVRChat()];
const proton = detectProtonScreenshots();
if (proton) candidates.push(proton);
const seen = new Set<string>();
const roots: string[] = [];
for (const path of candidates) {
if (!existsSync(path) || !isRealDir(path)) continue;
let real = path;
try {
real = realpathSync(path);
} catch {}
if (seen.has(real)) continue;
seen.add(real);
roots.push(path);
}
return roots;
}