jellyfin / jellyfin-plugin-webhook

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

SeasonNumber is empty. #129

Open Fribb opened 2 years ago

Fribb commented 2 years ago

I use the example below to send a notification of what was recently added to my server. This was copied from one of the templates provided in the repitory.

"text": "'{{{SeriesName}}} S{{SeasonNumber000}}E{{EpisodeNumber00}} {{{Name}}}' was recently added"

Everything works except {{SeasonNumber00}}, I also tried {{SeasonNumber}} and {{SeasonNumber000}} with the same effect.

Webhook output is:

"text": "'Another Life (2019) SE09 What's Bourne / What's Left Behind' was recently added",

I also tried with 3x braces with no impact. I also couldn't find an answer why some of the Placeholders have 3 and others have 2 Braces.

haydenbroadhead commented 2 years ago

Also broken for me

DevPGSV commented 1 year ago

I have the same problem. The 3 EpisodeNumber variants work, but the 3 SeasonNumber variants are always empty.

DevPGSV commented 1 year ago

I do not know how to do this, so I'll just post it here in case it's useful for someone who does:

http://old.jellyfin.org/docs/plugin-api/MediaBrowser.Controller.Entities.BaseItem.html#MediaBrowser_Controller_Entities_BaseItem_ParentIndexNumber

I guess it should be possible to change: https://github.com/jellyfin/jellyfin-plugin-webhook/blob/4c454578acd5237f637fdfb86582d13d8193f5e9/Jellyfin.Plugin.Webhook/Helpers/DataObjectHelpers.cs#L96-L101

So instead of: episode.Season.IndexNumber it uses episode.ParentIndexNumber .

zeroquinc commented 11 months ago

Hmm, I can't replicate this.

Output for me is for example:

    "SeasonNumber": 5,
    "SeasonNumber00": "05",
    "SeasonNumber000": "005",
    "EpisodeNumber": 2,
    "EpisodeNumber00": "02",
    "EpisodeNumber000": "002",

Would love to fix it, but for me its apparently working. You guys still have this problem?

tam1m commented 9 months ago

I just encountered the same problem. Season numbers do not show up at all.

Repro steps:

  1. create generic webhook
  2. fill in url
  3. select itemAdded event and itemType Episode
  4. add an episode to the library

The output does not contain season numbers

{
  "ServerId": "REDACTED",
  "ServerName": "REDACTED",
  "ServerVersion": "10.8.12",
  "ServerUrl": "REDACTED",
  "NotificationType": "ItemAdded",
  "Timestamp": "2023-11-25T15:30:39.8419702+01:00",
  "UtcTimestamp": "2023-11-25T14:30:39.841971Z",
  "Name": "Episode 1",
  "Overview": "A young intern's first day at GCHQ coincides with a major cyberattack on the UK. To win her superiors' trust, she breaks ranks to analyse the malware code without permission and uncovers a greater threat missed by others.",
  "Tagline": "",
  "ItemId": "eee5b46ca13fddcdf877c648fa2c1c14",
  "ItemType": "Episode",
  "RunTimeTicks": 28261540000,
  "RunTime": "00:47:06",
  "Year": 2022,
  "SeriesName": "The Undeclared War",
  "EpisodeNumber": 1,
  "EpisodeNumber00": "01",
  "EpisodeNumber000": "001",
  "Provider_tmdb": "3485701",
  "Provider_imdb": "tt8115418",
  "Provider_tvdb": "9230216",
  "Video_0_Title": "1080p H264 SDR",
  "Video_0_Type": "Video",
  "Video_0_Codec": "h264",
  "Video_0_Profile": "High",
  "Video_0_Level": 40,
  "Video_0_Height": 1080,
  "Video_0_Width": 1920,
  "Video_0_AspectRatio": "16:9",
  "Video_0_Interlaced": false,
  "Video_0_FrameRate": 25,
  "Video_0_VideoRange": "SDR",
  "Video_0_ColorSpace": "bt709",
  "Video_0_ColorTransfer": "bt709",
  "Video_0_ColorPrimaries": "bt709",
  "Video_0_PixelFormat": "yuv420p",
  "Video_0_RefFrames": 1,
  "Audio_0_Title": "English - AAC - 5.1 - Default",
  "Audio_0_Type": "Audio",
  "Audio_0_Language": "eng",
  "Audio_0_Codec": "aac",
  "Audio_0_Channels": 6,
  "Audio_0_Bitrate": 320000,
  "Audio_0_SampleRate": 48000,
  "Audio_0_Default": true,
  "Subtitle_0_Title": "English [SDH] - SUBRIP",
  "Subtitle_0_Type": "Subtitle",
  "Subtitle_0_Language": "eng",
  "Subtitle_0_Codec": "subrip",
  "Subtitle_0_Default": false,
  "Subtitle_0_Forced": false,
  "Subtitle_0_External": false
}

I tested this with different shows and episodes, but it's never there. Inside JFs metadata editor the season number is shown correctly. So it's not that the data is missing in JFs database.

mad-tunes commented 3 weeks ago

+1, I find the same S{{SeasonNumber00}}E{{EpisodeNumber00}} produces SE01 rather than S01E01