jellyfin / jellyfin-plugin-webhook

GNU General Public License v3.0
142 stars 45 forks source link

Webhooks Sending Too Many Notifications #250

Open Ahrimdon opened 3 months ago

Ahrimdon commented 3 months ago

I am currently using the Discord webhook with the template below and it is working flawlessly, with the exception being there are multiple notifications appearing, instead of a single one. For example, when I click play, anywhere from 3-10 notifications are sent when there should have only been one.

I initially setup a generic webhook for a Telegram bot and had the same issue. Not sure if this is an issue with Discord or the plugin itself, but seeing that it happened for both Telegram and Discord, it's not a coincidence. I'm assuming this could also have something to do with running the server on Windows? I've been wanting to switch to Linux but keep getting errors using the Jellyfin Migrator

Jellyfin Server: 10.9.2 (Windows 10) Webhook: 14.0.0.0

Template:

{
    "content": "{{MentionType}}",
    "avatar_url": "{{ServerUrl}}/Users/{{UserId}}/Images/Primary",
    "username": "{{BotUsername}}",
    "embeds": [
        {
            "author": {
                {{#if_equals ItemType 'Episode'}}
                    "name": "Playback Started • {{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} ~ {{{Name}}}",
                {{else}}
                    "name": "Playback Started • {{{Name}}} ({{Year}})",
                {{/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}}]``",

            "color": "3394611",

            "footer": {
                "text": "{{{ServerName}}}",
                "icon_url": "{{AvatarUrl}}"
            },
            "fields": [
            {
              "name": "User",
              "value": "{{{NotificationUsername}}}",
              "inline": true
            }
            ],

            "timestamp": "{{Timestamp}}"
        }
    ]
}
DebXD commented 12 hours ago

I'm facing this too