Jellyfin Webhook Plugin
Debugging:
My webhook isn't working!
Change your logging.json
file to output debug
logs for Jellyfin.Plugin.Webhook
. Make sure to add a comma to the end of "System": "Warning"
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning",
+ "Jellyfin.Plugin.Webhook": "Debug"
}
}
Documentation:
Use Handlebars templating engine to format notifications however you wish.
See Templates for sample templates.
Helpers:
- if_equals
- if first parameter equals second parameter case insensitive
- if_exist
- if the value of the parameter is not null or empty
- link_to
- wrap the $url and $text in an
<a>
tag
Variables:
-
Every Notifier
- ServerId
- ServerName
- ServerVersion
- ServerUrl
- NotificationType
-
BaseItem:
- Timestamp
- Current server time local
- UtcTimestamp
- Name
- Overview
- Tagline
- ItemId
- ItemType
- Year
- SeriesName
- SeasonNumber
- Series number - direct format
- SeasonNumber00
- Series number - padded 00
- SeasonNumber000
- Series number - padded 000
- EpisodeNumber
- Episode number - direct format
- EpisodeNumber00
- Episode number - padded 00
- EpisodeNumber000 -
- Episode number - padded 000
- Provider_{providerId_lowercase}
- RunTimeTicks
- The media runtime, in Ticks
- RunTime
- The media runtime, as
hh:mm:ss
- AspectRatio
- Item original aspect ratio
-
Playback
- Includes everything from
BaseItem
- PlaybackPositionTicks
- The current playback position, in Ticks
- PlaybackPosition
- The current playback position, as
hh:mm:ss
- MediaSourceId
- IsPaused
- IsAutomated
- If notification is automated, or user triggered
- DeviceId
- DeviceName
- ClientName
- NotificationUsername
- User playing item. Note: multiple notifications will be sent if there are multiple users in a session
- UserId
- PlayedToCompletion
true/false
, Only when NotificationType == PlaybackStop
Destination Specific:
- Discord
- MentionType
- EmbedColor
- AvatarUrl
- BotUsername
- Gotify
- Pushbullet
- Pushover
- Token
- UserToken
- Device
- Title
- MessageUrl
- MessageUrlTitle
- MessagePriority
- NotificationSound
- SMTP
- Slack
Future events can be created
from https://github.com/jellyfin/jellyfin/blob/master/Jellyfin.Server.Implementations/Events/EventingServiceCollectionExtensions.cs