Skip to content

Commit

Permalink
Added notification on complete
Browse files Browse the repository at this point in the history
  • Loading branch information
padvincenzo authored Jan 18, 2022
1 parent 28fd15c commit b8dd545
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/classes/speedup.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ module.exports = class SpeedUp {
Shell.log("All done.");
FFmpeg.update(null);

Interface.setProgressBar(1);
ipcRenderer.send("progressUpdate", "name", "");

Interface.viewStart();
Expand Down
7 changes: 6 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const {BrowserWindow, Menu, app, shell, dialog, ipcMain, nativeTheme} = require("electron");
const {BrowserWindow, Menu, app, shell, dialog, ipcMain, nativeTheme, Notification} = require("electron");
const path = require("path");
const fs = require("fs");
const os = require("os");
Expand Down Expand Up @@ -467,6 +467,11 @@ ipcMain.on("menuEnabler", (event, change) => {
ipcMain.on("setProgressBar", (event, value) => {
win.setProgressBar(value);
progress.setProgressBar(value);

// Send notification on complete
if(value == 1) {
new Notification({ title: "Silence SpeedUp", body: "All videos have been speeded up"}).show();
}
});


Expand Down

0 comments on commit b8dd545

Please sign in to comment.