Skip to content

Commit

Permalink
v1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
heliomarpm committed Mar 28, 2023
1 parent f593284 commit e0b7ca4
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 67 deletions.
17 changes: 11 additions & 6 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Change Log

----
## Version [1.12.0](https://github.com/heliomarpm/udemy-downloader-gui/compare/v1.11.10...v1.12.0)
## Version [1.12.1](https://github.com/heliomarpm/udemy-downloader-gui/compare/v1.11.10...v1.12.1)
##### Mar, 26 2023
![](https://img.shields.io/github/downloads/heliomarpm/udemy-downloader-gui/v1.12.0/total)
![](https://img.shields.io/github/downloads/heliomarpm/udemy-downloader-gui/v1.12.1/total)

### Change
* Added support for Subscriber Account _[#100](https://github.com/heliomarpm/udemy-downloader-gui/issues/100) | [#105](https://github.com/heliomarpm/udemy-downloader-gui/issues/105)_
* Messaging enhancement
### Added
* Support for Subscriber Account _[#100](https://github.com/heliomarpm/udemy-downloader-gui/issues/100) | [#105](https://github.com/heliomarpm/udemy-downloader-gui/issues/105)_
* Global Error Handling

### Fixed
* Failed to load preload.js file, impacting error monitoring
* Failed to load environment variables file, impacting error monitoring

### Other Changes
* Messaging improvement
* Code Cleanup


----
## Version [1.11.10](https://github.com/heliomarpm/udemy-downloader-gui/compare/v1.11.6...v1.11.10)
Expand Down
71 changes: 14 additions & 57 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ const Downloader = require("mt-files-downloader");
const https = require("https");
const cookie = require("cookie");

// var awaitingLogin = false;
// const server = require("http").createServer();
// const socketIO = require("socket.io")(server);
// const $loginAuthenticator = $(".ui.login.authenticator");

const pageSize = 25;
const msgDRMProtected = translate("Contains DRM protection and cannot be downloaded");
const ajaxTimeout = 60000; // 60 segundos
Expand All @@ -29,34 +24,7 @@ var $subDomain = $(".ui.login #subdomain");
var subDomain = settings.get("subdomain") || "www";
var settingsCached = settings.getAll();


// server.listen(50490);
// socketIO.on("connect", function (socket) {
// console.log('io.onConnect');
// $loginAuthenticator.removeClass("disabled");

// socket.on("disconnect", function () {
// console.log('socket.onDisconnect');
// $loginAuthenticator.addClass("disabled");
// $(".ui.authenticator.dimmer").removeClass("active");
// awaitingLogin = false;
// });

// $loginAuthenticator.click(function () {
// $(".ui.authenticator.dimmer").addClass("active");
// awaitingLogin = true;
// socket.emit("awaitingLogin");
// });

// socket.on("newLogin", function (data) {
// console.log('socket.onNewLogin');
// if (awaitingLogin) {
// settings.set("access_token", data.access_token);
// settings.set("subdomain", data.subdomain);
// checkLogin();
// }
// });
// });
// require('auto_authenticator.js');

const downloadFiles = {
LecturesAndAttachments: 0,
Expand Down Expand Up @@ -288,7 +256,7 @@ $(".ui.dashboard .content").on("click", ".open-in-browser", function () {

$(".ui.dashboard .content").on("click", ".open-dir", function () {
const pathDownloaded = $(this).parents(".course.item").find('input[name="path-downloaded"]').val();
shell.openItem(pathDownloaded);
shell.openPath(pathDownloaded);
});

$(".ui.dashboard .content").on("click", ".dismiss-download", function () {
Expand Down Expand Up @@ -2016,27 +1984,6 @@ function checkLogin() {
}
}

function loginWithPassword() {
if ($(".ui.login .form").find('input[name="business"]').is(":checked")) {
if (!$subDomain.val()) {
prompt.alert("Type Business Name");
return;
}
} else {
$subDomain.val("www");
}


// prompt.prompt("Access Token", function (access_token) {
// if (access_token) {
// const submain = $subDomain.val();
// settings.set("access_token", access_token);
// settings.set("subdomain", submain.length == 0 ? "www" : submain);
// checkLogin();
// }
// });
}

function loginWithAccessToken() {
const $formLogin = $(".ui.login .form");

Expand Down Expand Up @@ -2082,7 +2029,7 @@ function sendNotification(pathCourse, course_name, urlImage = null) {
});

notification.onclick = function () {
shell.openItem(pathCourse);
shell.openPath(pathCourse);
}
}

Expand Down Expand Up @@ -2194,4 +2141,14 @@ function saveLogFile() {

}

console.table(getAllDownloadsHistory());
process.on('uncaughtException', (error) => {
appendLog("uncaughtException", error.stack);
Sentry.captureException(error);
})

process.on('unhandledRejection', (error) => {
appendLog("unhandledRejection", error.stack);
Sentry.captureException(error);
})

console.table(getAllDownloadsHistory());
34 changes: 34 additions & 0 deletions assets/js/auto_authenticator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

// var awaitingLogin = false;
// const server = require("http").createServer();
// const socketIO = require("socket.io")(server);

// const $loginAuthenticator = $(".ui.login.authenticator");

// server.listen(50490);
// socketIO.on("connect", function (socket) {
// console.log('io.onConnect');
// $loginAuthenticator.removeClass("disabled");

// socket.on("disconnect", function () {
// console.log('socket.onDisconnect');
// $loginAuthenticator.addClass("disabled");
// $(".ui.authenticator.dimmer").removeClass("active");
// awaitingLogin = false;
// });

// $loginAuthenticator.click(function () {
// $(".ui.authenticator.dimmer").addClass("active");
// awaitingLogin = true;
// socket.emit("awaitingLogin");
// });

// socket.on("newLogin", function (data) {
// console.log('socket.onNewLogin');
// if (awaitingLogin) {
// settings.set("access_token", data.access_token);
// settings.set("subdomain", data.subdomain);
// checkLogin();
// }
// });
// });
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ function createWindow() {
const size = screen.getPrimaryDisplay().workAreaSize
// Create the browser window.
let win = new BrowserWindow({
title: `Udeler | Udemy Course Downloader - v${appVersion} ${process.env.SENTRY_DSN==undefined ? "": " 🚴‍♂️"}`,
title: `Udeler | Udemy Course Downloader - v${appVersion} ${process.env.SENTRY_DSN == undefined ? "" : " 🕘"}`,
minWidth: 650,
minHeight: 550,
width: 650,
height: size.height - 150,
icon: __dirname + "/assets/images/build/icon.png",
icon: path.join(__dirname, "/assets/images/build/icon.png"),
resizable: true,
maximizable: true,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
// contextIsolation: true,
contextIsolation: false,
preload: path.join(__dirname, "/preload.js")
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "udeler",
"productName": "Udeler",
"version": "1.12.0",
"version": "1.12.1",
"main": "index.js",
"urlHelp": "https://heliomarpm.notion.site/heliomarpm/How-to-get-an-Access-Token-b0ce5f89073c4965b47721197dcb2497",
"repository": {
Expand Down

0 comments on commit e0b7ca4

Please sign in to comment.