Smart Sync puts all specials first

When using Smart Sync from my Jellyfin server, all the specials for a show (Season 00) get downloaded first, even though they have identified “After series” tags.

When I turn on the “Available offline” filter, I see the correct episode in the “Next episodes” list, but it has no downloaded tick and is not available offline. Instead, a special which is meant to be seen much later in the show has a downloaded tick and shows up in the “Recently added episodes” list. I’ve seen this happen with multiple series, and it means I need to mark future specials as watched to get the syncing to work, which means I then need to remember that I’ve done so in order to watch them in the sequence.

Please provide the mandatory logs as requested by the template.

If the specials have the proper data returned by Jellyfin they are downloaded in order (Have you disabled the option to show specials in normal seasons?)

debug.log (1.0 MB)
Ok, activated Smart sync on two shows:
My Family - next episode is S05E05, but S00E08 was downloaded, which is set as after Season 7
Zoey’s Extraordinary Playlist - next episode is S01E05, but S00E01 was downloaded, which is set for after Season 2.

The option to show specials in normal seasons is on.

From the logs seems Jellyfin does not return proper data to inject those specials in the normal seasons.

Do those episodes appears in the normal season views in Yatse? For specials to be handled in proper ordering the fake season / episode number is required it’s not based on dates.

The specials do not appear in the normal season views in Yatse, though they do in Jellyfin, and as I pointed out, their placement is correctly handled in the “Next Up” list.

Both of the specials downloaded had “After Season” metadata set. I’ve added “Before Season” and “Before Episode” to the My Family specials to see if that makes a difference, and it doesn’t. None of the specials in any of my shows are appearing in the normal season views in Yatse, even though they do in Jellyfin, using the After/Before metadata.

You need to remember that Yatse is multi provider and as such needs to find a common ground between all the providers. The fact that Jellyfin can do something with it’s own hacks does not mean the data is properly exposed to the API or that it does not require more hacks on Yatse side.

Please provide logs during a full sync so I can see the whole data that Jellyfin sends for those episodes to see if I can rebuilt the necessary information. Specials normally have a corresponding season / episode number for where they are supposed to be seen in the lists.

How does that work for specials that are in the middle of a season? Are fractional episode numbers possible?

From memory, Plex uses a similar system of extra metadata to know where to schedule specials without requiring fake episode numbering.

Please provide the asked logs so I can see what Jellyfin send as those Metadata …

Kodi does provide the specials as season 0 episode X and also provide an season Y / episode Z for when the episode is supposed to be in the normal seasons.

This is also how Yatse works and Yatse tries to rebuild that data if the provider does not provide it.

So please stop telling me X does something this is irrelevant to Yatse and how things works.

I’ll provide the logs as soon as I can; might be a couple of days due to my work schedule.

Sorry, had no idea Kodi/Yatse worked in a different way with specials metadata, so I was expecting it would be a case of differently labelled metadata rather than a whole different model. How does it handle specials in mid season?

Eg, Doctor Who (2005) season 7 has a special halfway through the season after the sixth episode, would it be allocated s07e06.5?

It would be given 6 or 7 with a proper premiered date.

Ah, so duplicated episode numbers are sorted by release date. I see.

Sorry to take so long to get around to capturing logs. Hopefully this one has all the info you need:

What special are you talking about ?
“The Doctor, the Widow and the Wardrobe”?

From the logs there does not seem to have any indicator that it’s to be displayed inside a season and not as standalone one.

{
      "Name": "The Doctor, the Widow and the Wardrobe",
      "ServerId": "5fffcccc40b54f359f80e62eaf384fcb",
      "Id": "824a17b9fb535b9413dc99e5c41f34c1",
      "DateCreated": "2020-02-22T01:52:38.352Z",
      "Container": "mkv,webm",
      "SortName": "000 - 0047 - The Doctor, the Widow and the Wardrobe",
      "PremiereDate": "2011-12-25T00:00:00.0000000Z",
      "MediaSources": [
        {
          "Protocol": "File",
          "Id": "824a17b9fb535b9413dc99e5c41f34c1",
          "Path": "/media1/Doctor Who (2005)/Specials/Doctor.Who.S00E047.The.Doctor.The.Widow.And.The.Wardrobe.2011.Xmas.720p.HDTV.x264-FoV.mkv",
          "Type": "Default",
          "Container": "mkv",
          "Size": 1681932160,
          "Name": "Doctor.Who.S00E047.The.Doctor.The.Widow.And.The.Wardrobe.2011.Xmas.720p.HDTV.x264-FoV",
          "IsRemote": false,
          "ETag": "73343c5a8c32e98638a9fc28af692db6",
          "RunTimeTicks": 35009601536,
          "ReadAtNativeFramerate": false,
          "IgnoreDts": false,
          "IgnoreIndex": false,
          "GenPtsInput": false,
          "SupportsTranscoding": true,
          "SupportsDirectStream": true,
          "SupportsDirectPlay": true,
          "IsInfiniteStream": false,
          "RequiresOpening": false,
          "RequiresClosing": false,
          "RequiresLooping": false,
          "SupportsProbing": true,
          "VideoType": "VideoFile",
          "MediaStreams": [
            {
              "Codec": "h264",
              "Language": "eng",
              "TimeBase": "1/1000",
              "CodecTimeBase": "1/50",
              "VideoRange": "SDR",
              "VideoRangeType": "SDR",
              "DisplayTitle": "720p H264 SDR",
              "NalLengthSize": "0",
              "IsInterlaced": false,
              "IsAVC": false,
              "BitRate": 3843362,
              "BitDepth": 8,
              "RefFrames": 1,
              "IsDefault": true,
              "IsForced": false,
              "Height": 720,
              "Width": 1280,
              "AverageFrameRate": 25,
              "RealFrameRate": 25,
              "Profile": "High",
              "Type": "Video",
              "AspectRatio": "16:9",
              "Index": 0,
              "IsExternal": false,
              "IsTextSubtitleStream": false,
              "SupportsExternalStream": false,
              "PixelFormat": "yuv420p",
              "Level": 41
            },
            {
              "Codec": "ac3",
              "TimeBase": "1/1000",
              "CodecTimeBase": "1/48000",
              "DisplayTitle": "Dolby Digital - 5.1 - Default",
              "IsInterlaced": false,
              "ChannelLayout": "5.1",
              "BitRate": 384000,
              "Channels": 6,
              "SampleRate": 48000,
              "IsDefault": true,
              "IsForced": false,
              "Type": "Audio",
              "Index": 1,
              "IsExternal": false,
              "IsTextSubtitleStream": false,
              "SupportsExternalStream": false,
              "Level": 0
            }
          ],
          "MediaAttachments": [],
          "Formats": [],
          "Bitrate": 4227362,
          "RequiredHttpHeaders": {},
          "DefaultAudioStreamIndex": 1
        }
      ],
      "Path": "/media1/Doctor Who (2005)/Specials/Doctor.Who.S00E047.The.Doctor.The.Widow.And.The.Wardrobe.2011.Xmas.720p.HDTV.x264-FoV.mkv",
      "ChannelId": null,
      "Overview": "The story is set during World War II and is about a family of Blitz refugees, Madge Arwell and her two children, Lily and Cyril, who have to relocate to Dorset, where they meet the Doctor.",
      "CommunityRating": 6.5,
      "RunTimeTicks": 35009601536,
      "AspectRatio": "",
      "ProductionYear": 2011,
      "IndexNumber": 47,
      "ParentIndexNumber": 0,
      "ProviderIds": {
        "Tvdb": "4195944"
      },
      "IsFolder": false,
      "Type": "Episode",
      "People": [
        {
          "Name": "Claire Skinner",
          "Id": "522189d1be3bb61e5d1d788fd5f62390",
          "Role": "Madge Arwell",
          "Type": "GuestStar",
          "PrimaryImageTag": "d0b547beb998dfa7315c56127dc6c0d9",
          "ImageBlurHashes": {
            "Primary": {
              "d0b547beb998dfa7315c56127dc6c0d9": "dIE_v]~W9]IU#5waadoLKQNd%1xanibHNGRjIoM{xFxa"
            }
          }
        },
        {
          "Name": "Maurice Cole",
          "Id": "3bcdf96e3a74aa97b65140f7228c7dfe",
          "Role": "Cyril Arwell",
          "Type": "GuestStar",
          "ImageBlurHashes": {
            "Primary": {}
          }
        },
        {
          "Name": "Holly Earl",
          "Id": "117afa93cccba99195b31d6247591187",
          "Role": "Lily Arwell",
          "Type": "GuestStar",
          "PrimaryImageTag": "17980c5f52c07c61079c0a89b75e5c19",
          "ImageBlurHashes": {
            "Primary": {
              "17980c5f52c07c61079c0a89b75e5c19": "dPF=?g9F9ut601%ND$t8tRRjxaayIoRj-;V@D%tRf6WB"
            }
          }
        },
        {
          "Name": "Alexander Armstrong",
          "Id": "dd254eb32b23368adfef00d95c814551",
          "Role": "Reg Arwell",
          "Type": "GuestStar",
          "PrimaryImageTag": "77a78b921c95d6b14edc5ea06062b6c8",
          "ImageBlurHashes": {
            "Primary": {
              "77a78b921c95d6b14edc5ea06062b6c8": "dCAb^fI;NDfQx0R*NEW;0#xGahbHt0R-j_oIxTxVs?ag"
            }
          }
        },
        {
          "Name": "Farren Blackburn",
          "Id": "d6086831f3cf22b01ad0a87e99fcae5e",
          "Role": "Director",
          "Type": "Director",
          "ImageBlurHashes": {
            "Primary": {}
          }
        },
        {
          "Name": "Steven Moffat",
          "Id": "337cc94d4f935a844f85fbd08aacca5a",
          "Role": "Writer",
          "Type": "Writer",
          "ImageBlurHashes": {
            "Primary": {}
          }
        }
      ],
      "ParentBackdropItemId": "8c5a67dafdfd289ee7a08234e87f4837",
      "ParentBackdropImageTags": [
        "d999044f3c3ed33fd7f7c60ee57ce8c8"
      ],
      "UserData": {
        "PlaybackPositionTicks": 0,
        "PlayCount": 0,
        "IsFavorite": false,
        "Played": false,
        "Key": "78804000047"
      },
      "SeriesName": "Doctor Who (2005)",
      "SeriesId": "8c5a67dafdfd289ee7a08234e87f4837",
      "SeasonId": "0d9b5cf8d87d51cc61d154a9bd080cc9",
      "SeriesPrimaryImageTag": "581f2facc4c04468b6fdcf95946935e6",
      "SeasonName": "Specials",
      "VideoType": "VideoFile",
      "ImageTags": {
        "Primary": "d9b5bf7e5151b44afe7c98ef1d076013"
      },
      "BackdropImageTags": [],
      "ImageBlurHashes": {
        "Primary": {
          "d9b5bf7e5151b44afe7c98ef1d076013": "WMCjFaxZ0KD$aK.8%MkDM{oLRQof8_Rj%2tRWURjROoKkXX8tQMx",
          "581f2facc4c04468b6fdcf95946935e6": "dL8OoMx{IrS*.Tn|M_jERNV=s+t5MzkExvgOVroen#WW"
        },
        "Backdrop": {
          "d999044f3c3ed33fd7f7c60ee57ce8c8": "WDC6u@pe?bj^E5~W~Xt6s;Ipt8?b-VE0xZNHtQ-pw@IotQocS2xY"
        }
      },
      "LocationType": "FileSystem",
      "MediaType": "Video"
    }

The Doctor Who special in the middle of season 7 is “The Snowmen” (Airs before series: 7, Airs before episode: 7). “The Doctor, the Widow, and the Wardrobe” is marked in Jellyfin as Airs after series: 6 and Airs before series: 7.

Well it’s the same no info at all except the PremiereDate.

Can you give me an access to your server in private and to that show so I can see if the web interface request some additional data to get the proper info?

Sent you a PM. What’s the method Yatse uses to pull sync info from the server?

I’m using the normal API but there’s tons of not fully documented parameters and many small differences in Jellyfin vs Emby.

Looking at the API doco, the “GET /Shows/{seriesId}/Episodes” call should have the data:

{
  "Items": [
    {
      "Name": "string",
      "OriginalTitle": "string",
      ...
      "AirsBeforeSeasonNumber": 0,
      "AirsAfterSeasonNumber": 0,
      "AirsBeforeEpisodeNumber": 0,
      ...

“GET ​/Items” should return those three fields, too.

I’m not getting episodes per show but the whole episodes and it’s probably hidden behind a a parameter to get them.

In Emby it’s SpecialEpisodeNumbers and the returned fields are SortIndexNumber / SortParentIndexNumber so seems they switched to something different once again.

Can probably fix once I can log in see PM.

1 Like

Ok so yes … They use the same value to request the additional data but do not return the data in the same fields …

Will see to fix and be compatible with Jellyfin next week.

If you have time can you publish a library with only doctor who to speed up the tests? Your server is very slow for me as I’m far away and this large library take ages to sync. (And of course please keep the account for a few days, I won’t touch code this week end :p)