Create jellyfin-discord-template.json

This commit is contained in:
deflax 2023-08-14 23:42:20 +03:00 committed by GitHub
parent 2e8b9d9787
commit 73419aefb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,82 @@
{
"content": "{{MentionType}}",
"avatar_url": "{{AvatarUrl}}",
"username": "{{{BotUsername}}}",
"embeds": [
{
{{#if_equals NotificationType 'ItemAdded'}}
{{#if_equals ItemType 'Season'}}
"title": "{{{SeriesName}}} {{{Name}}} has been added",
{{else}}
{{#if_equals ItemType 'Episode'}}
"title": "{{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} {{{Name}}} has been added",
{{else}}
"title": "{{{Name}}} ({{Year}}) has been added",
{{/if_equals}}
{{/if_equals}}
"description": "External 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~}}
{{~#if_exist Provider_tvmaze~}}
{{~#if_equals ItemType 'Episode'~}}
[TVMaze](https://www.tvmaze.com/episodes/{{Provider_tvmaze}})\n
{{~/if_equals~}}
{{~#if_equals ItemType 'Series'~}}
[TVMaze](https://www.tvmaze.com/shows/{{Provider_tvmaze}})\n
{{~/if_equals~}}
{{~/if_exist~}}",
"thumbnail":{
"url": "{{ServerUrl}}/Items/{{ItemId}}/Images/Primary"
},
{{/if_equals}}
{{#if_equals NotificationType 'PlaybackStart'}}
{{#if_equals ItemType 'Season'}}
"description": "{{{NotificationUsername}}} started watching {{{SeriesName}}} {{{Name}}}",
{{else}}
{{#if_equals ItemType 'Episode'}}
"description": "{{{NotificationUsername}}} started watching {{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} {{{Name}}}",
{{else}}
"description": "{{{NotificationUsername}}} started watching {{{Name}}} ({{Year}})",
{{/if_equals}}
{{/if_equals}}
{{/if_equals}}
{{#if_equals NotificationType 'PlaybackStop'}}
{{#if_equals ItemType 'Season'}}
"description": "{{{NotificationUsername}}} stopped watching {{{SeriesName}}} {{{Name}}}",
{{else}}
{{#if_equals ItemType 'Episode'}}
"description": "{{{NotificationUsername}}} stopped watching {{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} {{{Name}}}",
{{else}}
"description": "{{{NotificationUsername}}} stopped watching {{{Name}}} ({{Year}})",
{{/if_equals}}
{{/if_equals}}
{{/if_equals}}
"color": "{{EmbedColor}}"
}
]
}