Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SeasonNumber is empty. #129

Open
Fribb opened this issue Aug 22, 2022 · 6 comments
Open

SeasonNumber is empty. #129

Fribb opened this issue Aug 22, 2022 · 6 comments

Comments

@Fribb
Copy link

Fribb commented Aug 22, 2022

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
Copy link

Also broken for me

@DevPGSV
Copy link

DevPGSV commented Nov 18, 2022

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

@DevPGSV
Copy link

DevPGSV commented Nov 18, 2022

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:

if (episode.Season?.IndexNumber is not null)
{
dataObject["SeasonNumber"] = episode.Season.IndexNumber;
dataObject["SeasonNumber00"] = episode.Season.IndexNumber.Value.ToString("00", CultureInfo.InvariantCulture);
dataObject["SeasonNumber000"] = episode.Season.IndexNumber.Value.ToString("000", CultureInfo.InvariantCulture);
}

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

@zeroquinc
Copy link
Contributor

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
Copy link

tam1m commented Nov 25, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants