Merge branch 'main' into feature/custom-themes

This commit is contained in:
Zamitto
2025-02-15 23:22:58 -03:00
18 changed files with 108 additions and 70 deletions

View File

@@ -49,23 +49,21 @@ export const loadState = async () => {
.values()
.all()
.then((games) => {
return sortBy(
games.filter((game) => game.queued),
"timestamp",
"DESC"
);
return sortBy(games, "timestamp", "DESC");
});
const [nextItemOnQueue] = downloads;
const [nextItemOnQueue] = downloads.filter((game) => game.queued);
const downloadsToSeed = downloads.filter(
(download) =>
download.shouldSeed &&
download.downloader === Downloader.Torrent &&
download.progress === 1 &&
download.uri !== null
(game) =>
game.shouldSeed &&
game.downloader === Downloader.Torrent &&
game.progress === 1 &&
game.uri !== null
);
console.log("downloadsToSeed", downloadsToSeed);
await DownloadManager.startRPC(nextItemOnQueue, downloadsToSeed);
startMainLoop();