Added notification support for new items being added to a library. Supports the client upload method (one or more items), or folder changes.

This commit is contained in:
matt 2024-09-27 10:54:41 -05:00
parent 567a9a4e58
commit aad2d9a017
5 changed files with 56 additions and 3 deletions

View file

@ -2,6 +2,28 @@ const { version } = require('../../package.json')
module.exports.notificationData = {
events: [
{
name: 'onItemsAdded',
requiresLibrary: true,
libraryMediaType: 'item',
description: 'Triggered when an item is added to the library',
variables: ['libraryItemId', 'libraryId', 'libraryName', 'tags', 'title', 'authors', 'description', 'genres', 'publishedYear'],
defaults: {
title: 'New Book!',
body: '{{title}} has been added to {{libraryName}} library.'
},
testData: {
libraryItemId: 'li_notification_test',
libraryId: 'lib_test',
libraryName: 'My Library',
tags: 'TestTag1, TestTag2',
title: 'ABS Test Book',
authors: 'Author1, Author2',
description: 'Description of the Abs Test Book belongs here.',
genres: 'TestGenre1, TestGenre2',
publishedYear: '2020'
}
},
{
name: 'onPodcastEpisodeDownloaded',
requiresLibrary: true,