jellyfin-plugin-webhook/Jellyfin.Plugin.Webhook/Templates/Discord/PlaybackStop.handlebars

57 lines
1.8 KiB
Handlebars

{
"content": "{{MentionType}}",
"avatar_url": "{{ServerUrl}}/Users/{{UserId}}/Images/Primary",
"username": "{{BotUsername}}",
"embeds": [
{
"author": {
{{#if_equals ItemType 'Episode'}}
{{#if_equals PlayedToCompletion true}}
"name": "Playback Completed • {{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} ~ {{{Name}}}",
{{else}}
"name": "Playback Stopped • {{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} ~ {{{Name}}}",
{{/if_equals}}
{{else}}
{{#if_equals PlayedToCompletion true}}
"name": "Playback Completed • {{{Name}}} ({{Year}})",
{{else}}
"name": "Playback Stopped • {{{Name}}} ({{Year}})",
{{/if_equals}}
{{/if_equals}}
"url": "{{ServerUrl}}/web/index.html#!/details?id={{ItemId}}&serverId={{ServerId}}"
},
"thumbnail":{
"url": "{{ServerUrl}}/Items/{{ItemId}}/Images/Primary"
},
"description": "> {{{Overview}}}\n\n``[{{PlaybackPosition}}/{{RunTime}}]``",
{{#if_equals PlayedToCompletion true}}
"color": "3381759",
{{else}}
"color": "15737923",
{{/if_equals}}
"footer": {
"text": "{{{ServerName}}}",
"icon_url": "{{AvatarUrl}}"
},
"fields": [
{
"name": "User",
"value": "{{{NotificationUsername}}}",
"inline": true
}
],
"timestamp": "{{Timestamp}}"
}
]
}