diff --git a/README.md b/README.md index e8c7393..04519b1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,17 @@ -# electron-simple-youtube-downloader +# Cyb3r Downloader ![./current-preview.PNG](./current-preview.PNG) +# Download 1.5 +At the moment it have a few bugs. If you find some talk to me and I will list them here and fix it as soon as possible +or if you have an git account just add them in the issues tab. [Issues](https://git.tooru.thee.moe/theenoro/electron-simple-youtube-downloader/issues) + +[Download](https://cl.thee.moe/index.php/s/hd9ILsF2etPoa6r) + +# v 1.4.0 Alpha + +Preview [Video](https://cl.thee.moe/index.php/s/T8FEaFFxyhlxIj6) # Download 1.3.0 diff --git a/browser_out/tampermonkey_plugin.js b/browser_out/tampermonkey_plugin.js new file mode 100644 index 0000000..26b7883 --- /dev/null +++ b/browser_out/tampermonkey_plugin.js @@ -0,0 +1,25 @@ +// ==UserScript== +// @name Tampermonkey Plugin for Cyb3r Downloader +// @version 1.0 +// @description Tampermonkey Plugin for Cyb3r Downloader +// @author Theenoro +// @require http://code.jquery.com/jquery-latest.js +// @match https://www.youtube.com/watch?v=* +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + var s = jQuery.noConflict(); + console.log('loaded'); + setTimeout(function(){ + s('#end').prepend(''); + },1000); + // Your code here... + s('body').delegate('#cb3_send','click',function(){ + var sy = window.location; + s.post( "http://127.0.0.1:54167/download?url="+encodeURI(sy),function() { + + }); + }); +})(); diff --git a/current-preview.PNG b/current-preview.PNG index 86a4fbd..4802191 100644 Binary files a/current-preview.PNG and b/current-preview.PNG differ diff --git a/package.json b/package.json index cd7209a..ffc50b0 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "cyb3r-youtube-downloader", - "productName": "cyb3r-youtube-downloader", - "version": "1.0.0", - "description": "My Electron application description", + "name": "cyb3r-downloader", + "productName": "cyb3r-downloader", + "version": "1.5.0", + "description": "Cyb3r_Downloader", "main": "src/main.js", "scripts": { "start": "electron-forge start", @@ -28,10 +28,19 @@ ] }, "electronPackagerConfig": { - "packageManager": "npm" + "packageManager": "npm", + "win32metadata": { + "ProductName": "Cyb3r_Downloader", + "CompanyName": "Thee.moe" + }, + "version-string": { + "ProductName": "Cyb3r_Downloader", + "CompanyName": "Thee.moe" + } }, "electronWinstallerConfig": { - "name": "cyb3r_youtube_downloader", + "name": "Cyb3r_Downloader", + "packageName": "Cyb3r_Downloader", "icon": "app.ico" }, "electronInstallerDebian": {}, @@ -41,22 +50,31 @@ "name": "https://git.tooru.thee.moe/theenoro/electron-simple-youtube-downloader" }, "windowsStoreConfig": { - "packageName": "", - "name": "cyb3ryoutubedownloader" + "packageName": "Cyb3r_Downloader", + "name": "Cyb3r_Downloader" } } }, "dependencies": { - "electron": "^1.6.11", + "body-parser": "^1.17.2", + "cors": "^2.8.4", + "electron": "^1.7.6", "electron-compile": "^6.4.1", + "electron-config": "^1.0.0", + "express": "^4.15.4", + "fs": "0.0.1-security", "mkdirp": "^0.5.1", + "node-id3": "0.0.10", + "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", "babel-preset-env": "^1.6.0", "babel-preset-react": "^6.24.1", + "electron-forge": "^4.0.2", "electron-prebuilt-compile": "1.6.11", "eslint": "^3.19.0", "eslint-config-airbnb": "^15.1.0", diff --git a/app.ico b/src/app.ico similarity index 100% rename from app.ico rename to src/app.ico diff --git a/src/app/js/app.js b/src/app/js/app.js index b17f313..1f3a2a8 100644 --- a/src/app/js/app.js +++ b/src/app/js/app.js @@ -1,65 +1,205 @@ -$(function(){ +$(function() { + const Config = require('electron-config'); + const config = new Config(); + var download_progress = $('#download-progress'); + var format = "mp3"; + if(typeof config.get('format') !== 'undefined'){ + format = config.get('format'); + } + var path = ""; + if(typeof config.get('path') !== 'undefined'){ + path = config.get('path'); + } 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 helperx = require('./../../controller/webLoader/router'); + + var shell = require('electron').shell; + //open links externally by default + $(document).on('click', 'a[href^="http"]', function(event) { + event.preventDefault(); + shell.openExternal(this.href); + }); + + 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('
' + decodeURI(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('