Added an On Library Item notifcation event

This commit is contained in:
zipben
2025-06-04 11:20:18 +00:00
parent c377b57601
commit bfbe5aa91e
10 changed files with 3530 additions and 3804 deletions

View File

@@ -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'
}
}
]