[READ-ONLY] Mirror of https://github.com/probablykasper/yt-email-notifier. macOS menubar app for YouTube upload notification emails
email menubar notifications tray youtube
0

Configure Feed

Select the types of activity you want to include in your feed.

Errors cause desktop notifications

Kasper (Aug 30, 2020, 2:48 AM +0200) 143578fa ff244adb

+6 -3
+6 -1
src/logger.js
··· 1 1 const log4js = require('log4js') 2 2 const EventEmitter = require('events') 3 + const displayNotification = require('display-notification') 3 4 const paths = require('./paths.js') 4 5 5 6 const kb = 1024 ··· 40 41 module.exports.eventEmitter = new EventEmitter() 41 42 42 43 module.exports.error = (...args) => { 44 + logger.error(...args) 43 45 module.exports.eventEmitter.emit('new-error') 44 - logger.error(...args) 46 + displayNotification({ 47 + title: 'YT Email Notifier Error', 48 + text: args.join(' '), 49 + }) 45 50 } 46 51 module.exports.info = (...args) => { 47 52 logger.info(...args)
-2
src/server.js
··· 65 65 } 66 66 } 67 67 68 - setTimeout(() => { logger.warn('test warning') }, 8000) 69 - 70 68 async function fetchYT(options) { 71 69 let url = options.url 72 70 if (!options.query) options.query = {}