Game specialisation & delta versions (#323)

* feat: game specialisation, auto-guess extensions

* fix: enforce specialisation specific schema at API level

* fix: lint

* feat: partial work on depot endpoints

* feat: bump torrential

* feat: dummy version creation for depot uploads

* fix: lint

* fix: types

* fix: lint

* feat: depot version import

* fix: lint

* fix: remove any type

* fix: lint

* fix: push update interval

* fix: cpu usage calculation

* feat: delta version support

* feat: style tweaks for selectlaunch.vue

* fix: lint
This commit is contained in:
DecDuck
2026-01-23 05:04:38 +00:00
committed by GitHub
parent 88d14f2d35
commit 6b8d150770
46 changed files with 1164 additions and 347 deletions
+33 -12
View File
@@ -8,6 +8,12 @@ enum MetadataSource {
OpenCritic
}
enum GameType {
Game
Executor
Redist
}
model Game {
id String @id @default(uuid())
@@ -15,6 +21,8 @@ model Game {
metadataId String
created DateTime @default(now())
type GameType @default(Game)
// Any field prefixed with m is filled in from metadata
// Acts as a cache so we can search and filter it
mName String // Name of game
@@ -47,8 +55,9 @@ model Game {
tags GameTag[]
playtime Playtime[]
developers Company[] @relation(name: "developers")
publishers Company[] @relation(name: "publishers")
developers Company[] @relation(name: "developers")
publishers Company[] @relation(name: "publishers")
unimportedGameVersions UnimportedGameVersion[]
@@unique([metadataSource, metadataId], name: "metadataKey")
@@unique([libraryId, libraryPath], name: "libraryKey")
@@ -82,14 +91,24 @@ model GameRating {
@@unique([metadataSource, metadataId], name: "metadataKey")
}
model UnimportedGameVersion {
id String @id @default(uuid())
gameId String
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
versionName String
manifest Json
fileList String[]
}
// A particular set of files that relate to the version
model GameVersion {
gameId String
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
versionId String @default(uuid())
versionId String @id @default(uuid())
displayName String?
versionPath String
versionPath String?
created DateTime @default(now())
@@ -98,12 +117,15 @@ model GameVersion {
onlySetup Boolean @default(false)
dropletManifest Json // Results from droplet
dropletManifest Json // Results from droplet
fileList String[] // List of all files, for delta updates
negativeFileList String[] // List of files to remove, for delta updates
versionIndex Int
delta Boolean @default(false)
@@id([gameId, versionId])
requiredContent GameVersion[] @relation(name: "requiredContent")
requiringContent GameVersion[] @relation(name: "requiredContent")
}
model SetupConfiguration {
@@ -113,9 +135,8 @@ model SetupConfiguration {
platform Platform
gameId String
versionId String
gameVersion GameVersion @relation(fields: [gameId, versionId], references: [gameId, versionId], onDelete: Cascade, onUpdate: Cascade)
gameVersion GameVersion @relation(fields: [versionId], references: [versionId], onDelete: Cascade, onUpdate: Cascade)
}
model LaunchConfiguration {
@@ -128,14 +149,14 @@ model LaunchConfiguration {
platform Platform
// For emulation targets
executorId String?
executor LaunchConfiguration? @relation(fields: [executorId], references: [launchId], name: "executor", onDelete: Cascade, onUpdate: Cascade)
executorId String?
executor LaunchConfiguration? @relation(fields: [executorId], references: [launchId], name: "executor")
executorSuggestions String[]
umuIdOverride String?
gameId String
versionId String
gameVersion GameVersion @relation(fields: [gameId, versionId], references: [gameId, versionId], onDelete: Cascade, onUpdate: Cascade)
gameVersion GameVersion @relation(fields: [versionId], references: [versionId], onDelete: Cascade, onUpdate: Cascade)
executions LaunchConfiguration[] @relation("executor")
}