mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-23 12:25:04 +02:00
Add: Backup notification (#3225)
* Formatting updates * Add: backup completion notification * Fix: comment for backup * Add: backup size units to notification * Add: failed backup notification * Add: calls to failed backup notification * Update: notification OpenAPI spec * Update notifications to first check if any are active for an event, update JS docs --------- Co-authored-by: advplyr <advplyr@protonmail.com>
This commit is contained in:
parent
5308fd8b46
commit
27b3a44147
7 changed files with 144 additions and 25 deletions
|
@ -27,6 +27,36 @@ module.exports.notificationData = {
|
|||
episodeDescription: 'Some description of the podcast episode.'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'onBackupCompleted',
|
||||
requiresLibrary: false,
|
||||
description: 'Triggered when a backup is completed',
|
||||
variables: ['completionTime', 'backupPath', 'backupSize', 'backupCount', 'removedOldest'],
|
||||
defaults: {
|
||||
title: 'Backup Completed',
|
||||
body: 'Backup has been completed successfully.\n\nPath: {{backupPath}}\nSize: {{backupSize}} bytes\nCount: {{backupCount}}\nRemoved Oldest: {{removedOldest}}'
|
||||
},
|
||||
testData: {
|
||||
completionTime: '12:00 AM',
|
||||
backupPath: 'path/to/backup',
|
||||
backupSize: '1.23 MB',
|
||||
backupCount: '1',
|
||||
removedOldest: 'false'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'onBackupFailed',
|
||||
requiresLibrary: false,
|
||||
description: 'Triggered when a backup fails',
|
||||
variables: ['errorMsg'],
|
||||
defaults: {
|
||||
title: 'Backup Failed',
|
||||
body: 'Backup failed, check ABS logs for more information.\nError message: {{errorMsg}}'
|
||||
},
|
||||
testData: {
|
||||
errorMsg: 'Example error message'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'onTest',
|
||||
requiresLibrary: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue