mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-31 02:17:01 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const { version } = require('../../package.json')
 | |
| 
 | |
| module.exports.notificationData = {
 | |
|   events: [
 | |
|     {
 | |
|       name: 'onPodcastEpisodeDownloaded',
 | |
|       requiresLibrary: true,
 | |
|       libraryMediaType: 'podcast',
 | |
|       description: 'Triggered when a podcast episode is auto-downloaded',
 | |
|       variables: ['libraryItemId', 'libraryId', 'podcastTitle', 'episodeTitle', 'libraryName', 'episodeId'],
 | |
|       defaults: {
 | |
|         title: 'New {{podcastTitle}} Episode!',
 | |
|         body: '{{episodeTitle}} has been added to {{libraryName}} library.'
 | |
|       },
 | |
|       testData: {
 | |
|         libraryItemId: 'li_notification_test',
 | |
|         libraryId: 'lib_test',
 | |
|         libraryName: 'Podcasts',
 | |
|         podcastTitle: 'Abs Test Podcast',
 | |
|         episodeId: 'ep_notification_test',
 | |
|         episodeTitle: 'Successful Test'
 | |
|       }
 | |
|     },
 | |
|     {
 | |
|       name: 'onTest',
 | |
|       requiresLibrary: false,
 | |
|       description: 'Event for testing the notification system',
 | |
|       variables: ['version'],
 | |
|       defaults: {
 | |
|         title: 'Test Notification on Abs {{version}}',
 | |
|         body: 'Test notificataion body for abs {{version}}.'
 | |
|       },
 | |
|       testData: {
 | |
|         version: 'v' + version
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| } |