diff --git a/README.md b/README.md index e8c7393..8b5d9ac 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ ![./current-preview.PNG](./current-preview.PNG) +# v 1.4.0 Alpha + +Preview [Video](https://cl.thee.moe/index.php/s/T8FEaFFxyhlxIj6) # Download 1.3.0 diff --git a/package.json b/package.json index cd7209a..7e95600 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,12 @@ "dependencies": { "electron": "^1.6.11", "electron-compile": "^6.4.1", + "fs": "0.0.1-security", "mkdirp": "^0.5.1", + "path": "^0.12.7", "request": "^2.81.0", - "unzip": "^0.1.11" + "unzip": "^0.1.11", + "watchr": "^3.0.1" }, "devDependencies": { "babel-plugin-transform-async-to-generator": "^6.24.1", diff --git a/src/app/js/app.js b/src/app/js/app.js index 686f356..0558759 100644 --- a/src/app/js/app.js +++ b/src/app/js/app.js @@ -1,68 +1,130 @@ -$(function(){ +$(function() { var download_progress = $('#download-progress'); + var format = null; var out = $('#output'); + var video = document.getElementById('video'); const ipcRenderer = require('electron').ipcRenderer; const request = require('request'); - const {dialog} = require('electron').remote; + const helper = require('./../../helper/string'); + + const { + dialog + } = require('electron').remote; var cache = {}; var path = ""; + + var pot = false; + + ipcRenderer.send('watchr_event', {}); + ipcRenderer.on('play-in-Window',function(event,arg){ + pot = arg.do; + }) + ipcRenderer.on('watchr_file', function(event, arg) { + arg.file = encodeURI(arg.file) + if (arg.type === "add") { + $('#watchr_files').append('
' + arg.file + '
') + } else if (arg.type === "remove") { + $('.file[data-file="' + arg.file + '"]').remove(); + } + $('#download-progress-' + arg.id).html(arg.percent); + }) ipcRenderer.on('download-progress', function(event, arg) { - console.log(arg); // prints "pong" - $('#download-progress-'+arg.id).css("width",arg.percent); - $('#download-progress-'+arg.id).html(arg.percent); + console.log(arg); // prints "pong" + $('#download-progress-' + arg.id).css("width", arg.percent); + $('#download-progress-' + arg.id).html(arg.percent); }); ipcRenderer.on('process-fin', function(event, arg) { - console.log(arg); // prints "pong" - $('#download-progress-'+arg.id).css("width",arg.percent); - $('#download-progress-'+arg.id).html("CONVERTED"); + console.log(arg); // prints "pong" + $('#download-progress-' + arg.id).css("width", arg.percent); + $('#download-progress-' + arg.id).html("CONVERTED"); }); ipcRenderer.on('file', function(event, arg) { - console.log(arg); // prints "pong" - $('#body-'+arg.id).append('