Skip to content

Commit

Permalink
Merge pull request #7 from WiiLink24/fix/switch-3ds
Browse files Browse the repository at this point in the history
fix: Remove Switch and 3DS games from playlog during render
  • Loading branch information
matthe815 authored Aug 3, 2024
2 parents c19ea7a + fd1d382 commit e5b9ce8
Showing 1 changed file with 25 additions and 0 deletions.
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

0 comments on commit e5b9ce8

Please sign in to comment.