Skip to content

Commit

Permalink
Merge pull request #15 from jely2002/1.8.0
Browse files Browse the repository at this point in the history
1.8.0 Merge additional fixes in 1.8.0
  • Loading branch information
jely2002 authored Sep 28, 2020
2 parents e24013b + 2313af3 commit 4b3d278
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { app, BrowserWindow, ipcMain, nativeImage, dialog, Menu, globalShortcut} = require('electron')
const { app, BrowserWindow, ipcMain, nativeImage, dialog, Menu, globalShortcut, shell} = require('electron')
const { autoUpdater } = require("electron-updater")
const fs = require('fs')
const mkdirp = require('mkdirp')
Expand Down Expand Up @@ -223,6 +223,10 @@ ipcMain.handle('titlebarClick', (event, arg) => {
}
})

ipcMain.handle('showItemInFolder', (event, arg) => {
shell.showItemInFolder(arg)
})

//Check if user has enabled auto-updating the app
function isUpdateEnabled() {
let settingsPath
Expand Down
9 changes: 5 additions & 4 deletions modules/UI.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ function openDownloadedFile() {
} else {
if(mediaMode === "audio") {
if(process.platform === "darwin" || process.platform === "linux") {
shell.showItemInFolder(downloadPath + '/' + audioOutputName.replace(/[//?%*:|"<>]/g, '_'))
ipcRenderer.invoke('showItemInFolder', + '/' + audioOutputName.replace(/[//?%*:|"<>]/g, '_'))
} else {
shell.showItemInFolder(downloadPath + '\\' + audioOutputName.replace(/[/\\?%*:|"<>]/g, '_'))
ipcRenderer.invoke('showItemInFolder', + '\\' + audioOutputName.replace(/[/\\?%*:|"<>]/g, '_'))
}
} else {
if(process.platform === "darwin" || process.platform === "linux") {
shell.showItemInFolder(downloadPath + '/' + videoOutputName.replace(/[//?%*:|"<>]/g, '_'))
ipcRenderer.invoke('showItemInFolder', downloadPath + '/' + videoOutputName.replace(/[//?%*:|"<>]/g, '_'))
} else {
shell.showItemInFolder(downloadPath + '\\' + videoOutputName.replace(/[/\\?%*:|"<>]/g, '_'))
ipcRenderer.invoke('showItemInFolder', downloadPath + '\\' + videoOutputName.replace(/[/\\?%*:|"<>]/g, '_'))
}
}
}
Expand All @@ -237,6 +237,7 @@ function openDownloadedFile() {
//Stop/hide the progress bar for single videos
function stopSingleVideoStatus() {
$('.completion.download').html("Video downloaded")
$('.progress-bar.download').css("width", "100%").attr("aria-valuenow", "100")
}

//Start the progress bar for single videos
Expand Down

0 comments on commit 4b3d278

Please sign in to comment.