mirror of
https://github.com/jellyfin/jellyfin-plugin-webhook.git
synced 2024-11-27 00:00:28 +00:00
Add Telegram & Ntfy templates with special instructions
This commit is contained in:
parent
571d1a89ab
commit
d6decbcc19
47
Jellyfin.Plugin.Webhook/Templates/Ntfy.handlebars
Normal file
47
Jellyfin.Plugin.Webhook/Templates/Ntfy.handlebars
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"topic": "jellyfin",
|
||||
"tags": ["octopus"],
|
||||
{{#if_equals NotificationType 'PlaybackStart'}}
|
||||
"title": "{{{NotificationUsername}}} Playback Started",
|
||||
"priority": 3,
|
||||
"attach": "{{{ServerUrl}}}/Items/{{{ItemId}}}/Images/Primary",
|
||||
{{#if_equals ItemType 'Episode'}}
|
||||
"message": "{{{NotificationUsername}}} stopped playing:\n\n{{{SeriesName}}} ({{Year}})\nS{{SeasonNumber00}}E{{EpisodeNumber00}} - {{{Name}}}\n{{Overview}}\n\non {{{ServerName}}}",
|
||||
{{else}}
|
||||
"message": "{{{NotificationUsername}}} stopped playing:\n\n{{{Name}}} ({{Year}})\n{{Overview}}\n\non {{{ServerName}}}",
|
||||
{{/if_equals}}
|
||||
{{/if_equals}}
|
||||
|
||||
{{#if_equals NotificationType 'PlaybackStop'}}
|
||||
"title": "{{{NotificationUsername}}} Playback Stopped",
|
||||
"priority": 3,
|
||||
"attach": "{{{ServerUrl}}}/Items/{{{ItemId}}}/Images/Primary",
|
||||
{{#if_equals ItemType 'Episode'}}
|
||||
"message": "{{{NotificationUsername}}} stopped playing:\n\n{{{SeriesName}}} ({{Year}})\nS{{SeasonNumber00}}E{{EpisodeNumber00}} - {{{Name}}}\n{{Overview}}\n\non {{{ServerName}}}",
|
||||
{{else}}
|
||||
"message": "{{{NotificationUsername}}} stopped playing:\n\n{{{Name}}} ({{Year}})\n{{Overview}}\n\non {{{ServerName}}}",
|
||||
{{/if_equals}}
|
||||
{{/if_equals}}
|
||||
|
||||
{{#if_equals NotificationType 'ItemAdded'}}
|
||||
"priority": 3,
|
||||
"attach": "{{{ServerUrl}}}/Items/{{{ItemId}}}/Images/Primary",
|
||||
{{#if_equals ItemType 'Movie'}}
|
||||
"title": "Movie Added",
|
||||
"message": "{{ItemType}} Now Available\n\n{{{Name}}} ({{Year}})\n{{Overview}}\n\nRuntime\n{{RunTime}}\n\nStatus\nAvailable"
|
||||
{{/if_equals}}
|
||||
{{#if_equals ItemType 'Season'}}
|
||||
"title": "Season Added",
|
||||
"message": "{{ItemType}} Now Available\n\n{{{SeriesName}}} ({{Year}})\n{{{Name}}}\n{{Overview}}\n\nRuntime\n{{RunTime}}\n\nStatus\nAvailable"
|
||||
{{else}}
|
||||
"title": "Episode Added",
|
||||
"message": "Episode Now Available\n\n{{{SeriesName}}} ({{Year}})\nS{{SeasonNumber00}}E{{EpisodeNumber00}} - {{{Name}}}\n{{Overview}}\n\nRuntime\n{{RunTime}}\n\nStatus\nAvailable"
|
||||
{{/if_equals}}
|
||||
{{/if_equals}}
|
||||
|
||||
{{#if_equals NotificationType 'PendingRestart'}}
|
||||
"title": "Jellyfin Restart Required",
|
||||
"priority": 4,
|
||||
"message": "Jellyfin needs to be restarted, please restart jellyfin as soon as possible!"
|
||||
{{/if_equals}}
|
||||
}
|
37
Jellyfin.Plugin.Webhook/Templates/README.md
Normal file
37
Jellyfin.Plugin.Webhook/Templates/README.md
Normal file
@ -0,0 +1,37 @@
|
||||
##Templates
|
||||
####Telegram
|
||||
Webhook URL:
|
||||
```
|
||||
https://api.telegram.org/bot<id>:<token>/sendPhoto
|
||||
```
|
||||
To get the chatid:
|
||||
- start a chat with your bot
|
||||
- add `@get_id_bot`
|
||||
- issue the `/my_id` command
|
||||
After adding the template add a request header as follows:
|
||||
```
|
||||
Key:
|
||||
Content-Type
|
||||
|
||||
Value:
|
||||
application/json
|
||||
```
|
||||
|
||||
####Ntfy
|
||||
Webhook URL:
|
||||
```
|
||||
https://ntf.sh
|
||||
|
||||
#or
|
||||
|
||||
https://yourntfyurl.tld
|
||||
```
|
||||
|
||||
If your ntfy needs authorization headers then add a request header as follows:
|
||||
```
|
||||
Key:
|
||||
Authorization
|
||||
|
||||
Value:
|
||||
Basic <base64encodedpassword>
|
||||
```
|
14
Jellyfin.Plugin.Webhook/Templates/Telegram.handlebars
Normal file
14
Jellyfin.Plugin.Webhook/Templates/Telegram.handlebars
Normal file
@ -0,0 +1,14 @@
|
||||
{"chat_id":"{{chatid}}",
|
||||
"photo":"{{ServerUrl}}/Items/{{ItemId}}/Images/Primary",
|
||||
{{#if_equals ItemType 'Season'}}
|
||||
"caption": "<b>{{ItemType}} Now Available</b>\n\n<b>{{{SeriesName}}} ({{Year}})</b>\n<b><em>{{{Name}}}</em></b>\n{{Overview}}\n\n<b>Runtime</b>\n{{RunTime}}\n\n<b>Status</b>\nAvailable"
|
||||
{{else}}
|
||||
{{#if_equals ItemType 'Episode'}}
|
||||
"caption": "<b>Episode Now Available</b>\n\n<b>{{{SeriesName}}} ({{Year}})</b>\n<b>S{{SeasonNumber00}}E{{EpisodeNumber00}}</b> - <b><em>{{{Name}}}</em></b>\n{{Overview}}\n\n<b>Runtime</b>\n{{RunTime}}\n\n<b>Status</b>\nAvailable"
|
||||
{{else}}
|
||||
"caption": "<b>{{ItemType}} Now Available</b>\n\n<b>{{{Name}}} ({{Year}})</b>\n{{Overview}}\n\n<b>Runtime</b>\n{{RunTime}}\n\n<b>Status</b>\nAvailable"
|
||||
{{/if_equals}}
|
||||
{{/if_equals}},
|
||||
"parse_mode": "html",
|
||||
"disable_notification":"true","protect_content":"true"
|
||||
}
|
Loading…
Reference in New Issue
Block a user