Skip to content

NFO Season Not Respected When Importing Files #13197

@MathWiz86

Description

@MathWiz86

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found here.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

I have a series with a custom story arc order for that isn't provided by normal metadata providers. To download the initial metadata (namely episode title and description), the file is named with 'S01'. However, I edited the .nfo metadata to set the tag to '2' for my custom order. I also placed the file in a 'Season 02' folder. When I import this file and its .nfo however, the file name is used instead of the .nfo season when Jellyfin adds to the database. This results in the episode appearing in both the 'Season 01' and 'Season 02' folders at the same time.

The .nfo file still says has the tag as '2' at this point, but editing the metadata in the web viewer shows season 1. I'm able to edit the metadata here to be season 2, which properly removes it from the 'Season 01' page. However, it would be tedious to do this for every episode individually when I was able to edit the .nfo tag in a batch.

If the .nfo file has a tag, it should be what is imported to the database when refreshing metadata. To note, this is how the episode number is working. For one test case, I had the episode named with S01E05, but the metadata had the episode tag as 80. The tag in the .nfo file was respected on import, and properly updates if I change the file directly and refresh metadata in the web viewer.

Reproduction steps

  1. Create a new television series folder of any name and year to a library. For this repro, we'll use 'ABC Test (1996)'.
  2. Within the series, create a new season folder beyond 1. Ex. 'Season 02'
  3. Place a video file within the 'Season 02' folder, but give it a different season and episode in its name. Ex. 'ABC Test S01E01.mp4'
  4. Add a new .nfo file with the same name as the test video. Edit it to include the tags 2 and 50.
  5. Turn off all metadata providers for the library. We don't want our .nfo file overwritten.
  6. Scan the library, which adds the new test show.

What is the current bug behavior?

  1. Observe that the episode is placed in both a 'Season 01' and 'Season 02' folder.
  2. Edit the episode's metadata in the Jellyfin web viewer.
  3. Observe that the episode has its season listed as '1', but the episode is properly '50'.

What is the expected correct behavior?

Since the episode's .nfo file lists the season as '2', the episode should only appear in the Season 2 folder. The .nfo should be honored for both the season and episode tags, not just the episode tag.

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.3

Environment

- OS: Windows 10
- Clients: Browser, Windows
- Browser: Firefox
- Hardware Acceleration: Intel QuickSync
- Plugins: TheTVDB, TMDb, AniDB (All Disabled During Testing, But Noted)
- Base URL: None
- Networking: Host
- Storage: Local

Jellyfin logs

[2024-12-09 08:02:07.720 -08:00] [INF] [33] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season "Season Unknown" entry for "ABC Test (1996)"
[2024-12-09 08:02:07.937 -08:00] [INF] [33] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting "ffprobe" with args "-analyzeduration 200M -probesize 1G -i file:\"D:\Shows\ABC Test (1996)\Season 02\ABC Test S01E01.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2024-12-09 08:02:08.306 -08:00] [INF] [9] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season null in series "ABC Test (1996)"
[2024-12-09 08:02:08.315 -08:00] [ERR] [33] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Could not find file 'C:\MyPrograms\Jellyfin\ProgramData\Server\metadata\library\5f\5f795ca43204873c9f5c35431248f4c2\poster.png'". URL "GET" "/Items/5f795ca43204873c9f5c35431248f4c2/Images/Primary".
[2024-12-09 08:02:08.315 -08:00] [ERR] [36] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Could not find file 'C:\MyPrograms\Jellyfin\ProgramData\Server\metadata\library\94\9403711afa65061e9967086eac702a66\poster.png'". URL "GET" "/Items/9403711afa65061e9967086eac702a66/Images/Primary".
[2024-12-09 08:02:08.316 -08:00] [INF] [9] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: "Season", Name: "Season Unknown", Path: "", Id: b5c6087f-9d4a-f7f4-90bf-af10fc43f44f
[2024-12-09 08:02:08.316 -08:00] [ERR] [6] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Could not find file 'C:\MyPrograms\Jellyfin\ProgramData\Server\metadata\library\df\dfa8d6cc53ed17198d552a3536273bf0\poster.png'". URL "GET" "/Items/dfa8d6cc53ed17198d552a3536273bf0/Images/Primary".
[2024-12-09 08:02:08.316 -08:00] [ERR] [31] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Could not find file 'C:\MyPrograms\Jellyfin\ProgramData\Server\metadata\library\f1\f137a2dd21bbc1b99aa5c0f6bf02a805\poster.png'". URL "GET" "/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary".
[2024-12-09 08:02:08.334 -08:00] [INF] [9] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season "Season 1" entry for "ABC Test (1996)"

FFmpeg logs

Client / Browser logs

No response

Relevant screenshots or videos

Image
Image
Image

Additional information

I'm aware this is an unusual use case. The primary reason I went this route is because Jellyfin does not respect folder layout under normal circumstances. By this I mean that if I have all my episodes with their metadata listed at Season 1, but I break it up into separate season folders based on a custom story arc, the separate folders show up properly, but all episodes are duplicated into Season 1 when viewing within Jellyfin. From research, this appears to be intended behavior for the purpose of supporting nfo metadata instead.

As another note, I tested out of interest what would happen if I had the episode named with S01, put in a Season 2 folder, with the .nfo having a tag of 3. The episode will be shown in a Season 1 and Season 2 folder, but not a Season 3, meaning that the .nfo's season is completely ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Needs Testing

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions