Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove Switch and 3DS games from playlog during render #7

Merged
merged 3 commits into from
Aug 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/lib/riitag/neo/std/Covers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export default class Covers extends ModuleBase {
}
},
select: {
playlog_id: true,
game: {
select: {
game_id: true,
Expand All @@ -218,6 +219,30 @@ export default class Covers extends ModuleBase {
return []
}

await prisma.playlog.deleteMany({
where: {
game: {
console: CONSOLE.THREEDS
}
}
})

await prisma.playlog.deleteMany({
where: {
game: null
}
})

for (const entry of playlog) {
if (!entry.game || entry.game.console === CONSOLE.THREEDS || entry.game.console === CONSOLE.SWITCH) {
await prisma.playlog.delete({
where: {
playlog_id: entry.playlog_id
}
})
}
}

const coverPaths = []

for (const logEntry of playlog) {
Expand Down
Loading