From b8a9b97ab3faa35731db63afb26f0972e12c182c Mon Sep 17 00:00:00 2001 From: Theenoro Date: Sun, 6 Aug 2017 21:46:10 +0200 Subject: [PATCH] 1.0.0 --- .gitignore | 64 + README.md | 9 +- app/js/app.js | 46 + app/libs/bootstrap/css/bootstrap-theme.css | 587 ++ .../bootstrap/css/bootstrap-theme.css.map | 1 + .../bootstrap/css/bootstrap-theme.min.css | 6 + .../bootstrap/css/bootstrap-theme.min.css.map | 1 + app/libs/bootstrap/css/bootstrap.css | 6757 ++++++++++++++++ app/libs/bootstrap/css/bootstrap.css.map | 1 + app/libs/bootstrap/css/bootstrap.min.css | 6 + app/libs/bootstrap/css/bootstrap.min.css.map | 1 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../fonts/glyphicons-halflings-regular.svg | 288 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes app/libs/bootstrap/js/bootstrap.js | 2377 ++++++ app/libs/bootstrap/js/bootstrap.min.js | 7 + app/libs/bootstrap/js/npm.js | 13 + app/libs/jquery/jquery-3.2.1.min.js | 4 + app/style/progress.css | 6861 +++++++++++++++++ app/view/layout.html | 44 + current-preview.PNG | Bin 0 -> 89482 bytes index.js | 35 + lib/dummy | 0 package.json | 22 + 26 files changed, 17129 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 app/js/app.js create mode 100644 app/libs/bootstrap/css/bootstrap-theme.css create mode 100644 app/libs/bootstrap/css/bootstrap-theme.css.map create mode 100644 app/libs/bootstrap/css/bootstrap-theme.min.css create mode 100644 app/libs/bootstrap/css/bootstrap-theme.min.css.map create mode 100644 app/libs/bootstrap/css/bootstrap.css create mode 100644 app/libs/bootstrap/css/bootstrap.css.map create mode 100644 app/libs/bootstrap/css/bootstrap.min.css create mode 100644 app/libs/bootstrap/css/bootstrap.min.css.map create mode 100644 app/libs/bootstrap/fonts/glyphicons-halflings-regular.eot create mode 100644 app/libs/bootstrap/fonts/glyphicons-halflings-regular.svg create mode 100644 app/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf create mode 100644 app/libs/bootstrap/fonts/glyphicons-halflings-regular.woff create mode 100644 app/libs/bootstrap/fonts/glyphicons-halflings-regular.woff2 create mode 100644 app/libs/bootstrap/js/bootstrap.js create mode 100644 app/libs/bootstrap/js/bootstrap.min.js create mode 100644 app/libs/bootstrap/js/npm.js create mode 100644 app/libs/jquery/jquery-3.2.1.min.js create mode 100644 app/style/progress.css create mode 100644 app/view/layout.html create mode 100644 current-preview.PNG create mode 100644 index.js create mode 100644 lib/dummy create mode 100644 package.json 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('