mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-28 05:54:50 +02:00
Update:Notifications onTest for testing and parse title/body template #996
This commit is contained in:
parent
8e8046541e
commit
0ef2a2e4b6
9 changed files with 202 additions and 139 deletions
|
@ -1,12 +1,37 @@
|
|||
const { version } = require('../../package.json')
|
||||
|
||||
module.exports.notificationData = {
|
||||
events: [
|
||||
{
|
||||
name: 'onPodcastEpisodeDownloaded',
|
||||
requiresLibrary: true,
|
||||
libraryMediaType: 'podcast',
|
||||
description: 'Triggered when a podcast episode is auto-downloaded',
|
||||
variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'episodeTitle', 'libraryName', 'episodeId'],
|
||||
defaults: {
|
||||
title: 'New {{podcastTitle}} Episode!',
|
||||
body: '{{episodeTitle}} has been added to {{libraryName}} library.'
|
||||
},
|
||||
testData: {
|
||||
libraryItemId: 'li_notification_test',
|
||||
libraryId: 'lib_test',
|
||||
libraryName: 'Podcasts',
|
||||
podcastTitle: 'Abs Test Podcast',
|
||||
episodeId: 'ep_notification_test',
|
||||
episodeTitle: 'Successful Test'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'onTest',
|
||||
requiresLibrary: false,
|
||||
description: 'Notification for testing',
|
||||
variables: ['version'],
|
||||
defaults: {
|
||||
title: 'Test Title',
|
||||
body: 'Test Body'
|
||||
title: 'Test Notification on Abs {{version}}',
|
||||
body: 'Test notificataion body for abs {{version}}.'
|
||||
},
|
||||
testData: {
|
||||
version: 'v' + version
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue