mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 20:31:36 +00:00
Add: backup completion notification
This commit is contained in:
parent
2aabca906e
commit
b1adafedd2
4 changed files with 40 additions and 3 deletions
|
|
@ -36,6 +36,20 @@ class NotificationManager {
|
|||
this.triggerNotification('onPodcastEpisodeDownloaded', eventData)
|
||||
}
|
||||
|
||||
async onBackupCompleted(backup, totalBackupCount, removedOldest) {
|
||||
if (!Database.notificationSettings.isUseable) return
|
||||
|
||||
Logger.debug(`[NotificationManager] onBackupCompleted: Backup completed`)
|
||||
const eventData = {
|
||||
completionTime: backup.createdAt,
|
||||
backupPath: backup.fullPath,
|
||||
backupSize: backup.fileSize,
|
||||
backupCount: totalBackupCount || 'Invalid',
|
||||
removedOldest: removedOldest || 'false'
|
||||
}
|
||||
this.triggerNotification('onBackupCompleted', eventData)
|
||||
}
|
||||
|
||||
onTest() {
|
||||
this.triggerNotification('onTest')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue