diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2648389 --- /dev/null +++ b/.gitignore @@ -0,0 +1,64 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + + +ffmpeg* +ffplay* +ffprobe* +youtube-dl* diff --git a/README.md b/README.md index 1771dbd..8f86cef 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -electron-simple-youtube-downloader +# electron-simple-youtube-downloader + +![./current-preview.PNG](./current-preview.PNG) + + +Place ffmpeg, ffplay, ffprobe and youtube-dl in the lib folder. + +Currently in start dev but pushing in master. diff --git a/app/js/app.js b/app/js/app.js new file mode 100644 index 0000000..4988959 --- /dev/null +++ b/app/js/app.js @@ -0,0 +1,46 @@ +$(function(){ + var download_progress = $('#download-progress'); + var out = $('#output'); + const ipcRenderer = require('electron').ipcRenderer; + const request = require('request'); + const {dialog} = require('electron').remote; + + var cache = {}; + var path = ""; + 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); + }); + 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"); + }); + ipcRenderer.on('file', function(event, arg) { + console.log(arg); // prints "pong" + $('#body-'+arg.id).append('