Skip to content

Commit

Permalink
fix: Importing keeps app path and lc
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Oct 27, 2023
1 parent 283ec6e commit 9c5325a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 9 additions & 4 deletions lang/et-EE.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
},
"about": {
"aboutHeader": "Meist",
"flashpoint": "BlueMaxima Flashpoint",
"flashpointDesc": "See säilitusprojekt on ehitatud olema arhiiv, muuseum ja mängimisvõimalik kollektsioon veebipõhistest internetimängudest.",
"flashpoint": "Flashpoint Archive",
"flashpointDesc": "The preservation project this launcher was built for, a non-profit with the goal of furthering archival and accessibility efforts of games, animations and other digital interactive experiences on the web.",
"website": "Veebileht",
"flashpointLauncher": "Flashpoint'i Rakendus",
"flashpointLauncherDesc": "Avatud koodiga arvutirakendus loodud, et sirvida, hallata ja mängida mänge Flashpoint'i projektist.",
"flashpointLauncherDesc": "An open-source desktop application used to browse, manage and play games from the Flashpoint Archive.",
"version": "Versioon",
"license": "Litsents",
"licenseInfo": "MIT (Rohkema info jaoks loe faili pealkirjaga LICENSE)",
Expand Down Expand Up @@ -301,6 +301,7 @@
"noVersion": "Pole Versiooni",
"releaseDate": "Avalduskuupäev",
"noReleaseDate": "Pole Avalduskuupäeva",
"noneFound": "None Found",
"language": "Keel",
"noLanguage": "Pole Keelt",
"dateAdded": "Kuupäev Lisatud",
Expand Down Expand Up @@ -342,6 +343,7 @@
"saveChanges": "Salvesta Muudatused",
"discardChanges": "Kustuta Muudatused",
"editFpfssGame": "Edit Game (FPFSS)",
"showOnFpfss": "Show Game on FPFSS",
"editGame": "Muuda Mängu Metat",
"allGames": "Kõiki Mänge",
"newPlaylist": "Uus Esitlusloend",
Expand All @@ -362,7 +364,10 @@
"noMountParameters": "Pole Rakendusparameetreid",
"showExtremeScreenshot": "Näita Ekstreemset Ekraanipilti",
"busy": "Palun Oota...",
"openGameDataBrowser": "Open Game Data Browser"
"openGameDataBrowser": "Open Game Data Browser",
"notArchived": "Not Archived",
"archived": "Archived",
"playOnline": "Play Online"
},
"tags": {
"name": "Nimi",
Expand Down
4 changes: 3 additions & 1 deletion src/back/game/GameDataManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function importGameDataSkipHash(gameId: string, filePath: string, d
throw 'Something went wrong importing (skipped hash)';
}

export function importGameData(gameId: string, filePath: string, dataPacksFolderPath: string, mountParameters?: string): Promise<GameData> {
export function importGameData(gameId: string, filePath: string, dataPacksFolderPath: string, applicationPath?: string, launchCommand?: string, mountParameters?: string): Promise<GameData> {
return new Promise<GameData>((resolve, reject) => {
fs.promises.access(filePath, fs.constants.F_OK)
.then(async () => {
Expand Down Expand Up @@ -171,6 +171,8 @@ export function importGameData(gameId: string, filePath: string, dataPacksFolder
newGameData.presentOnDisk = true;
newGameData.path = newFilename;
newGameData.sha256 = sha256;
newGameData.applicationPath = applicationPath || '';
newGameData.launchCommand = launchCommand || '';
newGameData.parameters = mountParameters;
newGameData.crc32 = 0; // TODO: Find decent lib for CRC32
save(newGameData)
Expand Down
2 changes: 1 addition & 1 deletion src/back/importGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export async function importCuration(opts: ImportCurationOpts): Promise<void> {
// Import bluezip
const filePath = path.join(curationPath, `${curation.folder}.zip`);
taskProgress.setStageProgress(0.9, 'Importing Zipped File...');
await GameDataManager.importGameData(game.id, filePath, dataPacksFolderPath, curation.game.mountParameters);
await GameDataManager.importGameData(game.id, filePath, dataPacksFolderPath, curation.game.applicationPath, curation.game.launchCommand, curation.game.mountParameters);
await fs.promises.unlink(filePath);
})
.catch((error) => {
Expand Down

0 comments on commit 9c5325a

Please sign in to comment.