Skip to content

Commit

Permalink
fix: Holy fuck this is bad
Browse files Browse the repository at this point in the history
  • Loading branch information
bendevnull committed Aug 3, 2024
1 parent 09533fb commit bd32553
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 bd32553

Please sign in to comment.