Skip to content

Commit

Permalink
Added Gotify handlebars (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragkrishna authored Sep 7, 2024
1 parent 1ceaaa1 commit ab2afb3
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extras": {
"client::display": {
"contentType": "text/markdown"
}
},
"title": "🚫 Jellyfin Authentication Failure 🚫",
"message": "--------------\n\n**User:** {{Username}}\n\n**Client:** {{App}}\n\n**Device:** {{DeviceName}} \n\n**Client IP:** {{RemoteEndPoint}}",
"priority": {{Priority}}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extras": {
"client::display": {
"contentType": "text/markdown"
}
},
"title": "✅ Jellyfin Authentication Success ✅",
"message": "--------------\n\n**User:** {{NotificationUsername}}\n\n**ID:** {{UserId}}\n\n**Client:** {{Client}}\n\n**Device:** {{DeviceName}} \n\n**Client IP:** {{RemoteEndPoint}}",
"priority": {{Priority}}
}
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"extras":{
"client::display": {
"contentType": "text/markdown"
}
},
"message": "![]({{ServerUrl}}/Items/{{ItemId}}/Images/Primary)\nExternal Links:\n
{{~#if_exist Provider_imdb~}}
[IMDb](https://www.imdb.com/title/{{Provider_imdb}}/)\n
{{~/if_exist~}}
{{~#if_exist Provider_tmdb~}}
{{~#if_equals ItemType 'Movie'~}}
[TMDb](https://www.themoviedb.org/movie/{{Provider_tmdb}})\n
{{~else~}}
[TMDb](https://www.themoviedb.org/tv/{{Provider_tmdb}})\n
{{~/if_equals~}}
{{~/if_exist~}}
{{~#if_exist Provider_musicbrainzartist~}}
[MusicBrainz](https://musicbrainz.org/artist/{{Provider_musicbrainzartist}})\n
{{~/if_exist~}}
{{#if_exist Provider_audiodbartist}}
[AudioDb](https://theaudiodb.com/artist/{{Provider_audiodbartist}})\n
{{~/if_exist~}}
{{~#if_exist Provider_musicbrainztrack~}}
[MusicBrainz Track](https://musicbrainz.org/track/{{Provider_musicbrainztrack}})\n
{{~/if_exist~}}
{{~#if_exist Provider_musicbrainzalbum~}}
[MusicBrainz Album](https://musicbrainz.org/release/{{Provider_musicbrainzalbum}})\n
{{~/if_exist~}}
{{#if_exist Provider_theaudiodbalbum}}
[TADb Album](https://theaudiodb.com/album/{{Provider_theaudiodbalbum}})\n
{{~/if_exist~}}
[Jellyfin]({{ServerUrl}}/web/index.html#!/details?id={{ItemId}}&serverId={{ServerId}})",
"priority": {{Priority}},
{{#if_equals ItemType 'Season'}}
"title": "{{{SeriesName}}} {{{Name}}} has been added to {{{ServerName}}}"
{{else}}
{{#if_equals ItemType 'Episode'}}
"title": "{{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} {{{Name}}} has been added to {{{ServerName}}}"
{{else}}
"title": "{{{Name}}} ({{Year}}) has been added to {{{ServerName}}}"
{{/if_equals}}
{{/if_equals}}
}
{
"extras":{
"client::display": {
"contentType": "text/markdown"
}
},
"message": "![]({{ServerUrl}}/Items/{{ItemId}}/Images/Primary)\nExternal Links:\n
{{~#if_exist Provider_imdb~}}
[IMDb](https://www.imdb.com/title/{{Provider_imdb}}/)\n
{{~/if_exist~}}
{{~#if_exist Provider_tmdb~}}
{{~#if_equals ItemType 'Movie'~}}
[TMDb](https://www.themoviedb.org/movie/{{Provider_tmdb}})\n
{{~else~}}
[TMDb](https://www.themoviedb.org/tv/{{Provider_tmdb}})\n
{{~/if_equals~}}
{{~/if_exist~}}
{{~#if_exist Provider_musicbrainzartist~}}
[MusicBrainz](https://musicbrainz.org/artist/{{Provider_musicbrainzartist}})\n
{{~/if_exist~}}
{{#if_exist Provider_audiodbartist}}
[AudioDb](https://theaudiodb.com/artist/{{Provider_audiodbartist}})\n
{{~/if_exist~}}
{{~#if_exist Provider_musicbrainztrack~}}
[MusicBrainz Track](https://musicbrainz.org/track/{{Provider_musicbrainztrack}})\n
{{~/if_exist~}}
{{~#if_exist Provider_musicbrainzalbum~}}
[MusicBrainz Album](https://musicbrainz.org/release/{{Provider_musicbrainzalbum}})\n
{{~/if_exist~}}
{{#if_exist Provider_theaudiodbalbum}}
[TADb Album](https://theaudiodb.com/album/{{Provider_theaudiodbalbum}})\n
{{~/if_exist~}}
[Jellyfin]({{ServerUrl}}/web/index.html#!/details?id={{ItemId}}&serverId={{ServerId}})",
"priority": {{Priority}},
{{#if_equals ItemType 'Season'}}
"title": "{{{SeriesName}}} {{{Name}}} has been added to {{{ServerName}}}"
{{else}}
{{#if_equals ItemType 'Episode'}}
"title": "{{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} {{{Name}}} has been added to {{{ServerName}}}"
{{else}}
"title": "{{{Name}}} ({{Year}}) has been added to {{{ServerName}}}"
{{/if_equals}}
{{/if_equals}}
}
18 changes: 18 additions & 0 deletions Jellyfin.Plugin.Webhook/Templates/Gotify/PlaybackStart.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extras": {
"client::display": {
"contentType": "text/markdown"
}
},
"title": "🎬 Jellyfin Playing 🎥",
{{~#if_equals ItemType 'Episode'~}}
"message": "--------------\n\n![]({{ServerUrl}}/Items/{{ItemId}}/Images/Primary)\n\n--------------\n\n**User:** {{NotificationUsername}}\n\n**Client:** {{ClientName}} \n\n**Device:** {{DeviceName}} \n\n**Client IP:** {{RemoteEndPoint}} \n\n**Series:** {{SeriesName}} S{{SeasonNumber00}}E{{EpisodeNumber00}} {{Name}} {{RunTime}}\n\n**Video:** {{Video_0_Title}} {{Video_0_Profile}} {{Video_0_Width}}x{{Video_0_Height}}\n\n**Audio:** {{Audio_0_Title}} {{Audio_0_Language}} {{Audio_0_Codec}}, {{Audio_0_Channels}} channels\n\n**Subtitles:** {{Subtitle_0_Language}}\n\n**Play Method:** {{PlayMethod}}",
{{~else~}}
{{~#if_equals ItemType 'Movie'~}}
"message": "--------------\n\n![]({{ServerUrl}}/Items/{{ItemId}}/Images/Primary)\n\n--------------\n\n**User:** {{NotificationUsername}}\n\n**Client:** {{ClientName}} \n\n**Device:** {{DeviceName}} \n\n**Client IP:** {{RemoteEndPoint}}\n\n**Movie:** {{Name}} ({{Year}}) {{RunTime}}\n\n**Video:** {{Video_0_Title}} {{Video_0_Profile}} {{Video_0_Width}}x{{Video_0_Height}}\n\n**Audio:** {{Audio_0_Title}} {{Audio_0_Language}} {{Audio_0_Codec}}, {{Audio_0_Channels}} channels\n\n**Subtitles:** {{Subtitle_0_Language}}\n\n**Play Method:** {{PlayMethod}}",
{{~else~}}
"message": "--------------\n\n![]({{ServerUrl}}/Items/{{ItemId}}/Images/Primary)\n\n--------------\n\n**User:** {{NotificationUsername}}\n\n**Client:** {{ClientName}} \n\n**Device:** {{DeviceName}} \n\n**Client IP:** {{RemoteEndPoint}}\n\n**Video:** {{Name}} {{RunTime}}\n\n**Play Method:** {{PlayMethod}}",
{{~/if_equals~}}
{{~/if_equals~}}
"priority": {{Priority}}
}
10 changes: 10 additions & 0 deletions Jellyfin.Plugin.Webhook/Templates/Gotify/PluginUpdated.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extras": {
"client::display": {
"contentType": "text/markdown"
}
},
"title": "✅ Jellyfin Plugin Updated ✅",
"message": "--------------\n\n**Plugin:** {{PluginName}}\n\n**Version:** {{PluginVersion}}\n\n**Changelog:** {{PluginChangelog}}",
"priority": {{Priority}}
}
10 changes: 10 additions & 0 deletions Jellyfin.Plugin.Webhook/Templates/Gotify/SessionStart.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extras": {
"client::display": {
"contentType": "text/markdown"
}
},
"title": "⚡ Jellyfin User Active ⚡",
"message": "--------------\n\n**User:** {{NotificationUsername}}\n\n**ID:** {{UserId}}\n\n**Client:** {{Client}}\n\n**Device:** {{DeviceName}} \n\n**Client IP:** {{RemoteEndPoint}}",
"priority": {{Priority}}
}

0 comments on commit ab2afb3

Please sign in to comment.