feat: migrating user preferences

This commit is contained in:
Chubby Granny Chaser 2025-01-21 03:48:46 +00:00
parent d760d0139d
commit f1e0ba4dd6
No known key found for this signature in database
53 changed files with 737 additions and 790 deletions

View file

@ -1,7 +1,8 @@
import type { LibraryGame } from "@types";
import { registerEvent } from "../register-event";
import { downloadsSublevel, gamesSublevel } from "@main/level";
const getLibrary = async () => {
const getLibrary = async (): Promise<LibraryGame[]> => {
return gamesSublevel
.iterator()
.all()
@ -13,8 +14,9 @@ const getLibrary = async () => {
const download = await downloadsSublevel.get(key);
return {
id: key,
...game,
download,
download: download ?? null,
};
})
);