mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-15 18:38:56 +01:00
Podcast episode download notification adding variables for mediaTags, podcastAuthor, podcastDescription, podcastGenres, episodeTitle, episodeSubtitle, episodeDescription
This commit is contained in:
parent
e345c4cc9e
commit
4039dc7968
@ -24,10 +24,15 @@ class NotificationManager {
|
||||
libraryItemId: libraryItem.id,
|
||||
libraryId: libraryItem.libraryId,
|
||||
libraryName: library ? library.name : 'Unknown',
|
||||
libraryTags: libraryItem.media.tags,
|
||||
mediaTags: (libraryItem.media.tags || []).join(', '),
|
||||
podcastTitle: libraryItem.media.metadata.title,
|
||||
podcastAuthor: libraryItem.media.metadata.author || '',
|
||||
podcastDescription: libraryItem.media.metadata.description || '',
|
||||
podcastGenres: (libraryItem.media.metadata.genres || []).join(', '),
|
||||
episodeId: episode.id,
|
||||
episodeTitle: episode.title
|
||||
episodeTitle: episode.title,
|
||||
episodeSubtitle: episode.subtitle || '',
|
||||
episodeDescription: episode.description || ''
|
||||
}
|
||||
this.triggerNotification('onPodcastEpisodeDownloaded', eventData)
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ module.exports.notificationData = {
|
||||
requiresLibrary: true,
|
||||
libraryMediaType: 'podcast',
|
||||
description: 'Triggered when a podcast episode is auto-downloaded',
|
||||
variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'episodeTitle', 'libraryName', 'episodeId', 'libraryTags'],
|
||||
variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'podcastAuthor', 'podcastDescription', 'podcastGenres', 'episodeTitle', 'episodeSubtitle', 'episodeDescription', 'libraryName', 'episodeId', 'mediaTags'],
|
||||
defaults: {
|
||||
title: 'New {{podcastTitle}} Episode!',
|
||||
body: '{{episodeTitle}} has been added to {{libraryName}} library.'
|
||||
@ -16,10 +16,15 @@ module.exports.notificationData = {
|
||||
libraryItemId: 'li_notification_test',
|
||||
libraryId: 'lib_test',
|
||||
libraryName: 'Podcasts',
|
||||
libraryTags: ['TestTag1', 'TestTag2'],
|
||||
mediaTags: 'TestTag1, TestTag2',
|
||||
podcastTitle: 'Abs Test Podcast',
|
||||
podcastAuthor: 'Audiobookshelf',
|
||||
podcastDescription: 'Description of the Abs Test Podcast belongs here.',
|
||||
podcastGenres: 'TestGenre1, TestGenre2',
|
||||
episodeId: 'ep_notification_test',
|
||||
episodeTitle: 'Successful Test'
|
||||
episodeTitle: 'Successful Test Episode',
|
||||
episodeSubtitle: 'Episode Subtitle',
|
||||
episodeDescription: 'Some description of the podcast episode.'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user