Tv show(anime): episode sequence is wrong when using absolute display order #1656

Closed
opened 2025-12-21 19:13:48 +01:00 by backuprepo · 6 comments
Owner

Originally created by @kerhbal on GitHub (May 7, 2020).

Describe the bug
for anime, episode sequence is wrong when using absolute display order
in my case, there is no mismatch, just the sequence is wrong.

System (please complete the following information):

  • OS: Linux raspberrypi 4.19.66-v7+ #1253 SMP armv7l
  • Virtualization: none
  • Clients: browser
  • Browser: Safari 13.0.5
  • Jellyfin Version: Jellyfin.Server 10.5.5.0
  • Playback: not related
  • Installed Plugins: AudioDB, MusicBrainz
  • Reverse Proxy: none
  • Base URL: none
  • Networking: host
  • Storage: local

To Reproduce
My folder:(I copied these two episodes to a new library just as a test case)

.
└── Naruto
    └── s01
        ├── Naruto.s01e001.x264_aac.mkv
        └── Naruto.s01e036.x264_acc.mkv
  • when using aired display order(the normal one):
    you can see the episode1 and episode36 are in the correct order
    Xnip2020-05-06_18-22-16

  • when using absolute display order:
    you can see that the titles are correct, which means there is no mismatch, but the number before titles are both 1, and the sequence is wrong
    Xnip2020-05-06_21-15-05

Expected behavior
in both scenarios(aired or absolute display order), the episode with title "Enter: Naruto Uzumaki!"(the first episode) should list before any other episodes.

Thank you!

Originally created by @kerhbal on GitHub (May 7, 2020). **Describe the bug** for anime, episode sequence is wrong when using absolute display order in my case, **there is no mismatch**, just the sequence is wrong. **System (please complete the following information):** - OS: Linux raspberrypi 4.19.66-v7+ #1253 SMP armv7l - Virtualization: none - Clients: browser - Browser: Safari 13.0.5 - Jellyfin Version: Jellyfin.Server 10.5.5.0 - Playback: not related - Installed Plugins: AudioDB, MusicBrainz - Reverse Proxy: none - Base URL: none - Networking: host - Storage: local **To Reproduce** **My folder:**(I copied these two episodes to a new library just as a test case) ``` . └── Naruto └── s01 ├── Naruto.s01e001.x264_aac.mkv └── Naruto.s01e036.x264_acc.mkv ``` - when using aired display order(the normal one): you can see the episode1 and episode36 are in the correct order <img width="1229" alt="Xnip2020-05-06_18-22-16" src="https://user-images.githubusercontent.com/11629684/81244256-e32bd100-8fdf-11ea-8bfd-8d3ebebc313e.png"> - when using absolute display order: you can see that the titles are correct, which means there is no mismatch, but the number before titles are both `1`, and the sequence is wrong <img width="1210" alt="Xnip2020-05-06_21-15-05" src="https://user-images.githubusercontent.com/11629684/81244378-43bb0e00-8fe0-11ea-893f-e9273a59fcf7.png"> **Expected behavior** in both scenarios(aired or absolute display order), the episode with title "Enter: Naruto Uzumaki!"(the first episode) should list before any other episodes. Thank you!
backuprepo 2025-12-21 19:13:48 +01:00
  • closed this issue
  • added the
    bug
    stale
    labels
Author
Owner
@Artiume commented on GitHub (May 7, 2020): related issues https://github.com/jellyfin/jellyfin/issues/1180 https://github.com/jellyfin/jellyfin/issues/2446
Author
Owner

@dominikh commented on GitHub (Jun 22, 2020):

This doesn't really seem related to either of those issues.

What I think is happening here is that the episode number field in the metadata gets incorrectly populated from the season-based numbering, not the absolute numbering.

For example, consider https://www.thetvdb.com/series/is-this-a-zombie

When using absolute display order, this occurs:

image

The first three "episode 1" are the first episodes in season 2, season 1 and season 0 respectively. Looking at the metadata, all 3 episodes have season 1 and episode 1. The same pattern continues with the other episodes.

The incorrect sorting is then merely a side-effect of sorting on the incorrect episode numbers. All 1's followed by all 2's and so on.

@dominikh commented on GitHub (Jun 22, 2020): This doesn't really seem related to either of those issues. What I think is happening here is that the episode number field in the metadata gets incorrectly populated from the season-based numbering, not the absolute numbering. For example, consider https://www.thetvdb.com/series/is-this-a-zombie When using absolute display order, this occurs: ![image](https://user-images.githubusercontent.com/39825/85345124-ec222480-b4f1-11ea-882b-ddcecb922c19.png) The first three "episode 1" are the first episodes in season 2, season 1 and season 0 respectively. Looking at the metadata, all 3 episodes have season 1 and episode 1. The same pattern continues with the other episodes. The incorrect sorting is then merely a side-effect of sorting on the incorrect episode numbers. All 1's followed by all 2's and so on.
Author
Owner

@kerhbal commented on GitHub (Jun 23, 2020):

@dominikh this totally makes sense, thank you for sharing!

@kerhbal commented on GitHub (Jun 23, 2020): @dominikh this totally makes sense, thank you for sharing!
Author
Owner

@lmaonator commented on GitHub (Aug 24, 2020):

Ran into the same issue.

It seems like the Tvdb plugin correctly queries the metadata with absoluteNumber but then doesn't handle "absolute" order in MapEpisodeToResult():
93fe595e5e/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs (L151-L163)
It only handles "dvd" order here.
In the case of "absolute" it incorrectly defaults to AiredEpisodeNumber.

@lmaonator commented on GitHub (Aug 24, 2020): Ran into the same issue. It seems like the Tvdb plugin correctly queries the metadata with absoluteNumber but then doesn't handle "absolute" order in MapEpisodeToResult(): https://github.com/jellyfin/jellyfin/blob/93fe595e5e9863874c1973e4f2d7f3c85549d3f9/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs#L151-L163 It only handles "dvd" order here. In the case of "absolute" it incorrectly defaults to AiredEpisodeNumber.
Author
Owner

@lmaonator commented on GitHub (Sep 5, 2020):

I can't reproduce this for episode 36 in the OP, only for S02E01 which is absolute order E58 as explained by @dominikh above.
I submitted a pull request for that case.

@lmaonator commented on GitHub (Sep 5, 2020): I can't reproduce this for episode 36 in the OP, only for S02E01 which is absolute order E58 as explained by @dominikh above. I submitted a pull request for that case.
Author
Owner

@stale[bot] commented on GitHub (Jan 3, 2021):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Jan 3, 2021): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#1656
No description provided.