-
diff --git a/src/app/view/pot.html b/src/app/view/pot.html
new file mode 100644
index 0000000..a60124c
--- /dev/null
+++ b/src/app/view/pot.html
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
Cyb3r Downloader - Player on Top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/controller/crunchyroll.js b/src/controller/crunchyroll.js
index c8e071d..a47296e 100644
--- a/src/controller/crunchyroll.js
+++ b/src/controller/crunchyroll.js
@@ -22,13 +22,13 @@ crunch.session_save = (session)=>{
}
net += session[i].domain+' '+session[i].httpOnly.toString().toUpperCase()+' '+session[i].path+' '+session[i].secure.toString().toUpperCase()+' '+Math.ceil(session[i].expirationDate)+' '+session[i].name+' '+session[i].value+'\n';
}
- console.log(net);
- fs.writeFile(global.dir+"/tmp/c", net, function(err) {
+ //console.log(net);
+ /*fs.writeFile(global.dir+"/tmp/c", net, function(err) {
if(err) {
return console.log(err);
}
- console.log("T!");
- });
+ //console.log("T!");
+ });*/
}
module.exports = crunch;
diff --git a/src/controller/player_onTop.js b/src/controller/player_onTop.js
new file mode 100644
index 0000000..ba45e28
--- /dev/null
+++ b/src/controller/player_onTop.js
@@ -0,0 +1,73 @@
+const {
+ app,
+ BrowserWindow,
+ Menu,
+ dialog,
+ ipcMain
+} = require('electron');
+
+//alwaysOnTop
+
+var win = null;
+
+var pot = {};
+var s = null;
+
+ipcMain
+.on('close_pot',(event,arg)=>{
+ console.log('CLOSE')
+ pot.close(event);
+})
+
+pot.isOpen = false;
+
+pot.open = (e) => {
+ s = e;
+ if (win !== null) {
+ e.sender.send('play-in-Window',{do :false});
+ win.close();
+ }
+ var x = new playerOnTop(e);
+ console.log('XX');
+}
+pot.close = ()=>{
+ console.log('CLOSE')
+ s.sender.send('play-in-Window',{do :false});
+ win.close();
+}
+
+
+class playerOnTop {
+ constructor(e) {
+ pot.isOpen = true;
+ this.win = new BrowserWindow({
+ width: 320,
+ height: 500,
+ show: false,
+ frame: false,
+ alwaysOnTop: true,
+ icon: global.dir + '/app.ico'
+ })
+ e.sender.send('play-in-Window',{do :true});
+ win = this.win;
+ win.loadURL(`file://${global.dir}/app/view/pot.html`)
+ win.once('ready-to-show', () => {
+ win.show();
+ console.log('XX');
+ })
+ win.on('resize', function () {
+ setTimeout(function () {
+ var size = win.getSize();
+ win.setSize(size[0], parseInt(size[0] * 9 / 16));
+ }, 0);
+ });
+ win.on('closed', () => {
+ pot.isOpen = false;
+ e.sender.send('play-in-Window',{do :false});
+ win = null;
+ console.log('XX');
+ });
+ }
+}
+
+module.exports = pot;
diff --git a/src/controller/watchr.js b/src/controller/watchr.js
new file mode 100644
index 0000000..4c08ca5
--- /dev/null
+++ b/src/controller/watchr.js
@@ -0,0 +1,61 @@
+const watchr = require('watchr');
+const fs = require('fs')
+const path = require('path')
+const ipcMain = require('electron').ipcMain;
+
+var watch_event = null;
+
+ipcMain
+.on('watchr_event', (event, arg)=>{
+ watch_event = event
+})
+
+class folderWatchr {
+ constructor(folder) {
+ this.folder = folder;
+ this.files = [];
+ var files = this.files;
+
+ fs.readdirSync(this.folder).forEach(file => {
+ files.push(folder + '/' + file);
+
+ });
+ for(var i = 0;i
{
+ pot_open_ev.sender.send('pot_play',arg);
+})
+
+.on('pot_real_open',(event,arg)=>{
+ console.log('POT EVENT SET')
+ pot_open_ev = event;
+})
+ipcMain
+.on('open-pot',(event,arg)=>{
+
+ pot.open(event);
+})
.on('start-download', (event, arg)=>{
path = orig_path
var download = new yt_dl(arg.url,arg.id);
@@ -35,6 +53,10 @@ ipcMain
ipcMain.on('setPath', function(event, arg) {
path = arg.path;
orig_path = arg.path;
+ if(fol !== null){
+ fol.destroy()
+ }
+ fol = new folderWatchr(path);
console.log('SET Path: '+path)
});
@@ -79,7 +101,23 @@ var yt_dl = class{
me.lwrite.sender.send('download-progress',{percent :me.percent,id:me.id});
break;
default:
-
+ }
+ var m = z.length;
+ for(var i = 0;i{
param = ['-x','--audio-format','mp3','-i',url,'-o',path+'/%(title)s.%(ext)s'];
break;
case "mp4":
- param = ['-f','bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4',url,'-o',path+'/%(title)s.%(ext)s'];
+ param = ['-w','-f','bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4',url,'-o',path+'/%(title)s.%(ext)s'];
break;
default:
diff --git a/src/helper/string.js b/src/helper/string.js
new file mode 100644
index 0000000..82d7625
--- /dev/null
+++ b/src/helper/string.js
@@ -0,0 +1,15 @@
+
+
+
+
+var st = {};
+
+
+st.replace = (str)=>{
+ return sub
+ .replace(/\|/g, "_");
+}
+
+
+
+module.exports = st;
diff --git a/src/index.js b/src/index.js
index 1361122..809ce9e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -78,7 +78,7 @@ if (!fs.existsSync(global.dir+'/tmp/inst')) {
icon: __dirname + '/app.ico'
})
win.close();
- var z = new browser('http://www.crunchyroll.com/');
+ //var z = new browser('http://www.crunchyroll.com/');
win2.loadURL(`file://${__dirname}/app/view/layout.html`)
win = win2;
});
diff --git a/src/themes/standard/style.less b/src/themes/standard/style.less
new file mode 100644
index 0000000..02ad122
--- /dev/null
+++ b/src/themes/standard/style.less
@@ -0,0 +1,76 @@
+/*
+
+
+
+
+*/
+
+@main-front-color: #E01931;
+@background-color: #1D2247;
+
+body {
+ margin: 0;
+ margin-top: 50px;
+ background: @background-color;
+ color:@main-front-color;
+}
+.btn-success {
+ color: @main-front-color;
+ background-color: @background-color;
+ border-color: @main-front-color;
+ transition: all .3s;
+}
+.btn-success:hover ,.btn-success:active,.btn-success:focus,.dropdown-toggle:focus,.dropdown-toggle:active,.btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success {
+ color: @background-color !important;
+ background-color: @main-front-color !important;
+ border-color: @main-front-color !important;
+ transition: all .3s;
+}
+.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
+ text-decoration: none;
+ color: @main-front-color;
+ background-color: @background-color;
+}
+.dropdown-menu{
+ background-color: @background-color;
+}
+span.input-group-btn.open > ul > li> a{
+ background-image:none;
+}
+.progress{
+ background-image:none;
+ background-color: @background-color;
+ box-shadow: inset 0px 0px 3px 0px @main-front-color;
+}
+.progress-bar{
+ background-image:none;
+ background-color: @background-color;
+ box-shadow: inset 0px 0px 12px 0px @main-front-color;
+ transition: .3s all;
+}
+.media:first-child {
+ margin-top: 15px;
+}
+.media {
+ box-shadow: 0px 0px 6px 1px @main-front-color;
+}
+.sidebar-nav {
+ padding: 10px;
+}
+.nav.nav-list a {
+ padding: 5px 10px;
+}
+
+.nav-header {
+
+ font-weight: bold;
+}
+.scroll{
+ overflow-y: scroll;
+ height: ~"calc( 100vh - 96px)";
+}
+
+.left-playlist{
+ box-shadow: 0px 0px 6px 1px @main-front-color;
+ height: ~"calc(100vh - 20vw - 30px )";
+}
diff --git a/src/tmp/c b/src/tmp/c
new file mode 100644
index 0000000..27a4802
--- /dev/null
+++ b/src/tmp/c
@@ -0,0 +1,15 @@
+# Netscape HTTP Cookie File
+# http://curl.haxx.se/rfc/cookie_spec.html
+# This is a generated file! Do not edit.
+
+.crunchyroll.com TRUE / FALSE 1534887951 __cfduid db1426254a0b86e7ca8b70551a18644361503351951
+.crunchyroll.com TRUE / FALSE 1537220753 __qca P0-1835482882-1503351953593
+.crunchyroll.com TRUE / FALSE 1566942248 _ga GA1.2.1843711990.1503351953
+.crunchyroll.com TRUE / FALSE 1503956648 _gid GA1.2.1726060626.1503868189
+.crunchyroll.com TRUE / FALSE 1504561873 c_d p%3D1
+.crunchyroll.com TRUE / FALSE 1504561873 c_userid 64927993
+.crunchyroll.com TRUE / FALSE 1504561873 c_userkey 2%3AZxOX%2BsILKGFm2Nmfc6%2FX12lxWjo%3D
+.crunchyroll.com TRUE / FALSE 1518903952 c_visitor 95852853-d74d-4e9c-b5ad-182b74e6f44f
+.crunchyroll.com TRUE / FALSE 1503960371 cf_clearance fb4b8c534496cdfec5683c51ec28dc2e4c70e5ce-1503351970-604800
+.crunchyroll.com TRUE / FALSE 1537220753 sess_id jjdcwcg0amrsbt44eviz34disrmrqd2m
+.crunchyroll.com TRUE / FALSE 1537220753 session_id 2074779edf6db7782876092c0d2f03db