Add library tags variable to podcast notifications

This commit is contained in:
Philipp Rintz 2023-02-14 16:41:58 +01:00 committed by GitHub
parent 481611ff33
commit 7207efb4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ class NotificationManager {
libraryItemId: libraryItem.id, libraryItemId: libraryItem.id,
libraryId: libraryItem.libraryId, libraryId: libraryItem.libraryId,
libraryName: library ? library.name : 'Unknown', libraryName: library ? library.name : 'Unknown',
libraryTags: libraryItem.tags,
podcastTitle: libraryItem.media.metadata.title, podcastTitle: libraryItem.media.metadata.title,
episodeId: episode.id, episodeId: episode.id,
episodeTitle: episode.title episodeTitle: episode.title

View File

@ -7,8 +7,7 @@ module.exports.notificationData = {
requiresLibrary: true, requiresLibrary: true,
libraryMediaType: 'podcast', libraryMediaType: 'podcast',
description: 'Triggered when a podcast episode is auto-downloaded', description: 'Triggered when a podcast episode is auto-downloaded',
variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'episodeTitle', 'libraryName', 'episodeId'], variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'episodeTitle', 'libraryName', 'episodeId', 'libraryTags'], defaults: {
defaults: {
title: 'New {{podcastTitle}} Episode!', title: 'New {{podcastTitle}} Episode!',
body: '{{episodeTitle}} has been added to {{libraryName}} library.' body: '{{episodeTitle}} has been added to {{libraryName}} library.'
}, },
@ -16,6 +15,7 @@ module.exports.notificationData = {
libraryItemId: 'li_notification_test', libraryItemId: 'li_notification_test',
libraryId: 'lib_test', libraryId: 'lib_test',
libraryName: 'Podcasts', libraryName: 'Podcasts',
libraryTags: ['TestTag1', 'TestTag2'],
podcastTitle: 'Abs Test Podcast', podcastTitle: 'Abs Test Podcast',
episodeId: 'ep_notification_test', episodeId: 'ep_notification_test',
episodeTitle: 'Successful Test' episodeTitle: 'Successful Test'