[Issue]: TV show not listing any seasons because season is flagged as virtual #5975

Closed
opened 2026-02-07 02:46:49 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @jellouser on GitHub (Jun 9, 2024).

Please describe your bug

I'm using locally generated NFO files for TV recordings: when the recording is completed then NFO file is created for the episode.

The problem is that when first episode for the show is recorded Jellyfin should create 1) show 2) season and 3) episode which it does according to database items, but the season is flagged as "IsVirtualItem" and because of this not listed in the user interface.

I am able "fix" this by forcing full metadata update for the show but it is annoying workaround and should work without it. After the season is "fixed" all episodes for this season work fine, until next new season which also needs "fix".

Looking at the code SeasonMetadataService SaveIsVirtualItem has some logic related to episode count, maybe episode does yet not "exist" at this point which would explain metadata update "fixing" it later? This problem also existed in 10.8.x.

EDIT: It seems that for master I need to refresh metadata twice until episode count is correct (1) and virtual flag is set to false for season.

Reproduction Steps

  1. Create a show folder including episode video file and NFO file for episode with title, season, seasonnumber and episode tags.
  2. After automatic scan database information is correct for show, season and episode but season is marked as virtual
  3. Do full metadata fresh for the show, now season is no longer marked as virtual and displayed in UI

Jellyfin Version

Master branch

if other:

No response

Environment

- OS:
- Linux Kernel:
- Virtualization:
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

<recording started>

[12:50:30] [DBG] [18] Emby.Server.Implementations.IO.LibraryMonitor: New file refresher created for /mnt/Recordings/Show Name
...
[13:02:01] [DBG] [39] Emby.Server.Implementations.IO.LibraryMonitor: Timer stopped.
[13:02:01] [INF] [39] Emby.Server.Implementations.IO.LibraryMonitor: Recordings (/mnt/Recordings) will be refreshed.
[13:02:01] [DBG] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Running SeriesNfoProvider for /mnt/Recordings/Show Name
[13:02:01] [DBG] [40] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name
[13:02:01] [INF] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season Unknown entry for Show Name
[13:02:01] [DBG] [40] MediaBrowser.Providers.TV.EpisodeMetadataService: Running ProbeProvider for /mnt/Recordings/Show Name/Show Name.ts
..
[13:02:02] [INF] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series Show Name
[13:02:02] [INF] [40] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season Unknown, Path: , Id: dd218b9c-42a8-8644-d251-8b9f781d424f
[13:02:02] [INF] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season 1 entry for Show Name


<manual full metadata refresh>

[13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Running SeriesNfoProvider for /mnt/Recordings/Show Name
[13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name
[13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season 1 in series Show Name
[13:11:42] [INF] [71] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season 1, Path: , Id: f2e7f59e-53fe-8836-60db-1fe0188e3678
[13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season 1 entry for Show Name
[13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Running SeriesNfoProvider for /mnt/Recordings/Show Name
[13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name
[13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season 1 in series Show Name
[13:11:42] [INF] [71] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season 1, Path: , Id: f2e7f59e-53fe-8836-60db-1fe0188e3678
[13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season 1 entry for Show Name
[13:11:42] [DBG] [71] MediaBrowser.Providers.TV.EpisodeMetadataService: Running ProbeProvider for /mnt/Recordings/Show Name/Show Name.ts
...
[13:12:40] [DBG] [65] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @jellouser on GitHub (Jun 9, 2024). ### Please describe your bug I'm using locally generated NFO files for TV recordings: when the recording is completed then NFO file is created for the episode. The problem is that when first episode for the show is recorded Jellyfin should create 1) show 2) season and 3) episode which it does according to database items, but the season is flagged as "IsVirtualItem" and because of this not listed in the user interface. I am able "fix" this by forcing full metadata update for the show but it is annoying workaround and should work without it. After the season is "fixed" all episodes for this season work fine, until next new season which also needs "fix". Looking at the code SeasonMetadataService SaveIsVirtualItem has some logic related to episode count, maybe episode does yet not "exist" at this point which would explain metadata update "fixing" it later? This problem also existed in 10.8.x. EDIT: It seems that for master I need to refresh metadata twice until episode count is correct (1) and virtual flag is set to false for season. ### Reproduction Steps 1. Create a show folder including episode video file and NFO file for episode with title, season, seasonnumber and episode tags. 2. After automatic scan database information is correct for show, season and episode but season is marked as virtual 3. Do full metadata fresh for the show, now season is no longer marked as virtual and displayed in UI ### Jellyfin Version Master branch ### if other: _No response_ ### Environment ```markdown - OS: - Linux Kernel: - Virtualization: - Clients: - Browser: - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: - Plugins: - Reverse Proxy: - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell <recording started> [12:50:30] [DBG] [18] Emby.Server.Implementations.IO.LibraryMonitor: New file refresher created for /mnt/Recordings/Show Name ... [13:02:01] [DBG] [39] Emby.Server.Implementations.IO.LibraryMonitor: Timer stopped. [13:02:01] [INF] [39] Emby.Server.Implementations.IO.LibraryMonitor: Recordings (/mnt/Recordings) will be refreshed. [13:02:01] [DBG] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Running SeriesNfoProvider for /mnt/Recordings/Show Name [13:02:01] [DBG] [40] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name [13:02:01] [INF] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season Unknown entry for Show Name [13:02:01] [DBG] [40] MediaBrowser.Providers.TV.EpisodeMetadataService: Running ProbeProvider for /mnt/Recordings/Show Name/Show Name.ts .. [13:02:02] [INF] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series Show Name [13:02:02] [INF] [40] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season Unknown, Path: , Id: dd218b9c-42a8-8644-d251-8b9f781d424f [13:02:02] [INF] [40] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season 1 entry for Show Name <manual full metadata refresh> [13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Running SeriesNfoProvider for /mnt/Recordings/Show Name [13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name [13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season 1 in series Show Name [13:11:42] [INF] [71] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season 1, Path: , Id: f2e7f59e-53fe-8836-60db-1fe0188e3678 [13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season 1 entry for Show Name [13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Running SeriesNfoProvider for /mnt/Recordings/Show Name [13:11:42] [DBG] [71] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name [13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season 1 in series Show Name [13:11:42] [INF] [71] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season 1, Path: , Id: f2e7f59e-53fe-8836-60db-1fe0188e3678 [13:11:42] [INF] [71] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season 1 entry for Show Name [13:11:42] [DBG] [71] MediaBrowser.Providers.TV.EpisodeMetadataService: Running ProbeProvider for /mnt/Recordings/Show Name/Show Name.ts ... [13:12:40] [DBG] [65] MediaBrowser.Providers.TV.SeriesMetadataService: SeriesNfoProvider returned no metadata for /mnt/Recordings/Show Name ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bugstale labels 2026-02-07 02:46:49 +03:00
Author
Owner

@jellyfin-bot commented on GitHub (Jun 9, 2024):

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You are not running an up-to-date version of Jellyfin. Please update to the latest release.
  • You have not filled in the environment completely.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@jellyfin-bot commented on GitHub (Jun 9, 2024): Hi, it seems like your issue report has the following item(s) that need to be addressed: - You are not running an up-to-date version of Jellyfin. Please update to the latest release. - You have not filled in the environment completely. This is an automated message, currently under testing. Please file an issue [here](https://github.com/jellyfin/jellyfin-triage-scripts/issues) if you encounter any problems.
Author
Owner

@sjorge commented on GitHub (Jun 9, 2024):

Might be similar to https://github.com/jellyfin/jellyfin/issues/11575

Do you happen to have Display specials within seasons they aired in unchecked under library -> display ?

@sjorge commented on GitHub (Jun 9, 2024): Might be similar to https://github.com/jellyfin/jellyfin/issues/11575 Do you happen to have `Display specials within seasons they aired in` unchecked under library -> display ?
Author
Owner

@jellouser commented on GitHub (Jun 9, 2024):

Might be similar to #11575

Do you happen to have Display specials within seasons they aired in unchecked under library -> display ?

Thanks, I saw your issue earlier and now tested this. Indeed enabling/checking Display specials within seasons they aired in seems to "fix" my issue.

@jellouser commented on GitHub (Jun 9, 2024): > Might be similar to #11575 > > Do you happen to have `Display specials within seasons they aired in` unchecked under library -> display ? Thanks, I saw your issue earlier and now tested this. Indeed enabling/checking `Display specials within seasons they aired in` seems to "fix" my issue.
Author
Owner

@sjorge commented on GitHub (Jun 9, 2024):

So it's probably the same issue, somewhat relieved I am no longer alone 😅

@sjorge commented on GitHub (Jun 9, 2024): So it's probably the same issue, somewhat relieved I am no longer alone 😅
Author
Owner

@jellouser commented on GitHub (Aug 17, 2024):

I still have this issue on 10.9.9

Using "Display specials within seasons they aired in" checked as workaround...

@jellouser commented on GitHub (Aug 17, 2024): I still have this issue on 10.9.9 Using "Display specials within seasons they aired in" _checked_ as workaround...
Author
Owner

@sjorge commented on GitHub (Aug 17, 2024):

It was reverted by Niels in 2 chunks because it broke stuff for him

I think to fix our problem we only needed the query optimization reverted #12240 and the fix for Niels issue is actually #12356

But i have not tried building jellyfin with only the query change to verify, and further more that won't be enough it would also need to be verified by Niels that it did not re-breaks everything for him.

Probably going to just live with the workaround until the EF migration is done in a few years, and then hope the entire virtual vs physical stuff can be revisited. There is more breakage as a result of this with how marked as watched is propagated being all funky with real episodes but virtual seasons.

It seems not many people are hitting this bug because most people follow the jellyfin naming convention of having S#E# in the filename and having everything from S# inside a Season #/ directory. Doing that also makes the issue disappear as the seaons are now no longer virtual. So there are 2 workarounds I guess.

I just hope https://github.com/jellyfin/jellyfin-plugin-tvdb/pull/176 won't make things worse for us. But at first glance I don't think it will.

@sjorge commented on GitHub (Aug 17, 2024): It was reverted by Niels in 2 chunks because it broke stuff for him - https://github.com/jellyfin/jellyfin/pull/12240 - https://github.com/jellyfin/jellyfin/pull/12356 I think to fix our problem we only needed the query optimization reverted #12240 and the fix for Niels issue is actually #12356 But i have not tried building jellyfin with only the query change to verify, and further more that won't be enough it would also need to be verified by Niels that it did not re-breaks everything for him. Probably going to just live with the workaround until the EF migration is done in a few years, and then hope the entire virtual vs physical stuff can be revisited. There is more breakage as a result of this with how marked as watched is propagated being all funky with real episodes but virtual seasons. It seems not many people are hitting this bug because most people follow the jellyfin naming convention of having `S#E#` in the filename and having everything from `S#` inside a `Season #/` directory. Doing that also makes the issue disappear as the seaons are now no longer virtual. So there are 2 workarounds I guess. I just hope https://github.com/jellyfin/jellyfin-plugin-tvdb/pull/176 won't make things worse for us. But at first glance I don't think it will.
Author
Owner

@Iowerth commented on GitHub (Sep 5, 2024):

Same issue. Server version 10.9.10. If I have disabled Display specials within seasons they aired in then error like from first post:

[2024-09-05 21:23:54.029 +03:00] [INF] [10] Jellyfin.Api.Controllers.ItemLookupController: Setting provider id's to item 0f5f6196-05a7-b2d4-fd17-ebf520937c83-"House of the Dragon": [("Imdb": "tt11198330")]
[2024-09-05 21:23:54.121 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series "House of the Dragon"
[2024-09-05 21:23:54.123 +03:00] [INF] [26] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: "Season", Name: "Season Unknown", Path: "", Id: 7f1366e9-ca86-6502-f122-7b5d95e327f2
[2024-09-05 21:23:54.128 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season "Season Unknown" entry for "House of the Dragon"
[2024-09-05 21:23:54.168 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series "House of the Dragon"
[2024-09-05 21:23:54.169 +03:00] [INF] [26] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: "Season", Name: "Season Unknown", Path: "", Id: 7f1366e9-ca86-6502-f122-7b5d95e327f2
[2024-09-05 21:23:54.171 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season "Season Unknown" entry for "House of the Dragon"

If I enable Display specials within seasons they aired in then error disappear but no thumbnail creating after trying to create it. An only this in logs:
[2024-09-05 21:30:45.532 +03:00] [INF] [19] Jellyfin.Api.Controllers.ItemLookupController: Setting provider id's to item 0f5f6196-05a7-b2d4-fd17-ebf520937c83-"House of the Dragon": [("Imdb": "tt11198330")]

@Iowerth commented on GitHub (Sep 5, 2024): Same issue. Server version 10.9.10. If I have disabled `Display specials within seasons they aired in` then error like from first post: ``` [2024-09-05 21:23:54.029 +03:00] [INF] [10] Jellyfin.Api.Controllers.ItemLookupController: Setting provider id's to item 0f5f6196-05a7-b2d4-fd17-ebf520937c83-"House of the Dragon": [("Imdb": "tt11198330")] [2024-09-05 21:23:54.121 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series "House of the Dragon" [2024-09-05 21:23:54.123 +03:00] [INF] [26] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: "Season", Name: "Season Unknown", Path: "", Id: 7f1366e9-ca86-6502-f122-7b5d95e327f2 [2024-09-05 21:23:54.128 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season "Season Unknown" entry for "House of the Dragon" [2024-09-05 21:23:54.168 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series "House of the Dragon" [2024-09-05 21:23:54.169 +03:00] [INF] [26] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: "Season", Name: "Season Unknown", Path: "", Id: 7f1366e9-ca86-6502-f122-7b5d95e327f2 [2024-09-05 21:23:54.171 +03:00] [INF] [26] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season "Season Unknown" entry for "House of the Dragon" ``` If I enable `Display specials within seasons they aired in` then error disappear but no thumbnail creating after trying to create it. An only this in logs: `[2024-09-05 21:30:45.532 +03:00] [INF] [19] Jellyfin.Api.Controllers.ItemLookupController: Setting provider id's to item 0f5f6196-05a7-b2d4-fd17-ebf520937c83-"House of the Dragon": [("Imdb": "tt11198330")]`
Author
Owner

@jellouser commented on GitHub (Nov 21, 2024):

Using Jellyfin 10.10.1 my setup does not work anymore at all. First I lost all metadata for recordings for whatever reason.

Now with "Display specials within seasons they aired in" checked everything goes under "Season 1" instead of correct ones with full re-scan and re-create of library.

Without it checked, same problem as originally - no seasons are created so library is useless only showing Shows with no seasons.

I'm amazed how this simple use case does not work, everything is included in NFO data...

@jellouser commented on GitHub (Nov 21, 2024): Using Jellyfin 10.10.1 my setup does not work anymore at all. First I lost all metadata for recordings for whatever reason. Now with "Display specials within seasons they aired in" checked everything goes under "Season 1" instead of correct ones with full re-scan and re-create of library. Without it checked, same problem as originally - no seasons are created so library is useless only showing Shows with no seasons. I'm amazed how this simple use case does not work, everything is included in NFO data...
Author
Owner

@jellyfin-bot commented on GitHub (Mar 22, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Mar 22, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@jellyfin-bot commented on GitHub (Apr 12, 2025):

This issue was closed due to inactivity.

@jellyfin-bot commented on GitHub (Apr 12, 2025): This issue was closed due to inactivity.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#5975