Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Multiple small bug fixes, fixed updates being added to the installed …
Browse files Browse the repository at this point in the history
…games list
  • Loading branch information
SushyDev committed Dec 16, 2020
1 parent 510a53c commit 34b9a60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions app/js/components/downloader/download-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ function startDownload(url, dir, gameTitle) {
};

//Remove starting snackbar
console.log(gameTitle)
if(!gameTitle.includes('vapor-store-update')) closeSnackbar(`${gameTitle}-download-starting`, false);
console.log(gameTitle);
if (!gameTitle.includes('vapor-store-update')) closeSnackbar(`${gameTitle}-download-starting`, false);

//Create snackbar
createSnack(snackbarData);

Expand Down Expand Up @@ -102,15 +102,18 @@ function startDownload(url, dir, gameTitle) {
item.once('done', (event, state) => {
//On download complete
if (state === 'completed') {

//Remove downloaded game from array
downloading.shift();

//Remove download snackbar
closeSnackbar(`${name}-download`, false);

//Add downloaded game to library
addGameToLibrary(fullPath, localStorage.getItem('downloadDir'), fileName, gameTitle);
//Add downloaded game to library or install update
if (gameTitle == 'vapor-store-update') {
installUpdate(fileName);
} else {
addGameToLibrary(fullPath, localStorage.getItem('downloadDir'), fileName, gameTitle);
}

var snackbarData = {
['main']: [
Expand Down Expand Up @@ -156,7 +159,6 @@ function startDownload(url, dir, gameTitle) {

//Extract downloaded zip file
if (fileType == 'zip') createSnack(snackbarData);
if (gameTitle == 'vapor-store-update') installUpdate(fileName)
} else {
//Download didnt complete
console.log(`Download failed: ${state}`);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vapor-store",
"version": "2.0.0-beta-19",
"version": "2.0.0-beta-20",
"description": "Vapor Store",
"author": "SushyDev",
"main": "app.js",
Expand Down Expand Up @@ -72,5 +72,5 @@
"electron": "^7.2.4",
"electron-builder": "^22.9.1",
"electron-reload": "^1.5.0"
}
}
}

0 comments on commit 34b9a60

Please sign in to comment.