Permalink
Browse files

Fixed unpacking course issues

  • Loading branch information...
RedDuckss committed Nov 2, 2017
1 parent 00fa1ad commit 1032606686edeed3d5925aa3bc86ce6a5559ab78
Showing with 470 additions and 1,817 deletions.
  1. +15 −4 app.js
  2. +7 −3 app/Flux/js/main.js
  3. +3 −1 app/wrapper/js/main.js
  4. +443 −1,808 package-lock.json
  5. +2 −1 package.json
View
19 app.js
@@ -2,17 +2,17 @@ const APP_VERSION = '2.1.1';
let electron = require('electron'),
updater = require("electron-updater").autoUpdater,
electron_reload = require('electron-reload')(__dirname, {
/*electron_reload = require('electron-reload')(__dirname, {
ignored: /node_modules|[\/\\]\.|cemui.log|cemui.error.log|cemui.info.log/
}),
}),*/
NodeNUSRipper = require('./NodeNUSRipper.js'),
NUSRipper = new NodeNUSRipper(),
exec = require('child_process').exec,
smm = require('smm-api'),
smm_editor = require('cemu-smm'),
fusejs = require('fuse.js'),
unzip = require('unzip'),
zipFolder = require('zip-folder'),
_7zip = require("7zip-standalone"),
archiver = require('archiver'),
bl = require('bl'),
ssl = require('ssl-root-cas').inject(),
@@ -688,6 +688,7 @@ ipcMain.on('smm_dl_level', function(event, data) {
return;
}
SMMLevelFolder = SMMLevelFolder[0];
event.sender.send("smm_show_loader");
console.log({
level: 'info',
@@ -754,7 +755,15 @@ ipcMain.on('smm_dl_level', function(event, data) {
level: 'info',
message: 'unpacking SMMDB course: ' + data
});
_7zip.extract(path.join(SMMLevelFolder, 'new_level.zip'), SMMLevelFolder).then(function() {
fs.createReadStream(path.join(SMMLevelFolder, 'new_level.zip'))
.pipe(unzip.Extract({ path: SMMLevelFolder }))
.on('entry', (entry) => {
console.log({
level: 'info',
message: 'Found zip file ' + entry.path
})
})
.on('close', () => {
console.log({
level: 'info',
message: 'unpacked SMMDB course: ' + data
@@ -795,6 +804,7 @@ ipcMain.on('smm_dl_level', function(event, data) {
});
}
], function() {
event.sender.send("smm_hide_loader");
event.sender.send("smm_level_dl_end");
});
});
@@ -1796,6 +1806,7 @@ async function sendSMMCourses() {
}
}
ApplicationWindow.webContents.send('smm_hide_loader');
ApplicationWindow.webContents.send('smm_player_courses', smm_courses);
}
View
@@ -1,5 +1,5 @@
ipcRenderer = window.ipcRenderer; // Gets ipcRenderer
var games_lib = document.getElementById('games'),
var games_lib = document.getElementById('library'),
modal_list = document.getElementById('modal-content-list'),
modal_open = false,
clicks = 0,
@@ -173,7 +173,7 @@ ipcRenderer.on('init_complete', function(event, data) {
},0);
});
ipcRenderer.send('init');
ipcRenderer.send('init');
/*
function addToGrid(arr,id) {
@@ -739,4 +739,8 @@ function clock() {
}
clock();
setInterval(clock, 1000);
setInterval(clock, 1000);
addEvent(games_lib, 'scroll', (event) => {
console.log(event);
});
View
@@ -772,9 +772,11 @@ function setIPCevents() {
ipcRenderer.on('smm_show_loader', () => {
document.querySelector('#situp-loading-overlay').classList.remove('hidden');
});
ipcRenderer.on('smm_hide_loader', () => {
document.querySelector('#situp-loading-overlay').classList.add('hidden');
});
ipcRenderer.on('smm_player_courses', (event, data) => {
document.querySelector('#situp-loading-overlay').classList.add('hidden');
let i = 0,
course_cols = document.querySelectorAll('.colm');
Oops, something went wrong.

0 comments on commit 1032606

Please sign in to comment.