mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-16 23:14:11 +02:00
Added an On Library Item notifcation event
This commit is contained in:
@@ -60,6 +60,22 @@ module.exports.notificationData = {
|
||||
errorMsg: 'Example error message'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'onLibraryItemAdded',
|
||||
requiresLibrary: true,
|
||||
description: 'Triggered when a new item is added to a library',
|
||||
descriptionKey: 'NotificationOnLibraryItemAddedDescription',
|
||||
variables: ['itemTitle', 'itemAuthor', 'mediaType'],
|
||||
defaults: {
|
||||
title: 'New {{mediaType}} Added!',
|
||||
body: '{{itemTitle}} by {{itemAuthor}} has been added to one of your libraries.'
|
||||
},
|
||||
testData: {
|
||||
itemTitle: 'Test Item',
|
||||
itemAuthor: 'Test Author',
|
||||
mediaType: 'Book'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'onTest',
|
||||
requiresLibrary: false,
|
||||
@@ -67,11 +83,19 @@ module.exports.notificationData = {
|
||||
descriptionKey: 'NotificationOnTestDescription',
|
||||
variables: ['version'],
|
||||
defaults: {
|
||||
title: 'Test Notification on Abs {{version}}',
|
||||
body: 'Test notificataion body for abs {{version}}.'
|
||||
title: 'New Book Added!',
|
||||
body: '{{bookTitle}} by {{bookAuthor}} has been added to {{libraryName}} library.'
|
||||
},
|
||||
testData: {
|
||||
version: 'v' + version
|
||||
libraryItemId: 'li_notification_test',
|
||||
libraryId: 'lib_test',
|
||||
libraryName: 'Audiobooks',
|
||||
mediaTags: 'TestTag1, TestTag2',
|
||||
bookTitle: 'Test Book',
|
||||
bookAuthor: 'Test Author',
|
||||
bookDescription: 'Description of the test book.',
|
||||
bookGenres: 'TestGenre1, TestGenre2',
|
||||
bookNarrator: 'Test Narrator'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user