Generate NFOs for Jellyfin

Any questions? Need some help?
Post Reply
rg7qpkoh
Posts: 9
Joined: 08 Dec 2023, 02:15

Generate NFOs for Jellyfin

Post by rg7qpkoh »

I can't seem to figure out how to generate all of the .nfo files that Jellyfin needs to work for a TV show.

Shows require a tvshow.nfo at the top level, a season.nfo in each season folder, and then a <filename of the episode>.nfo for each episode in each season folder. Source: https://jellyfin.org/docs/general/server/metadata/nfo/ (this should all match what Kodi wants, as well)

If I run, say:

Code: Select all

filebot -rename */*.mkv --db TheTVDB --order DVD --format "{n} - {s00e00} - {t}" --apply nfo -no-xattr
then I only get a tvshow.nfo, which Jellyfin will get top-level show info from, but nothing else.

I don't want to get artwork and stuff. The only thing I want an `.nfo` file for is fixing the episode ordering permanently (Jellyfin obeys local .nfo over everything else).

Thoughts? Ideas? Help? Do I need to make a feature request?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Generate NFOs for Jellyfin

Post by rednoah »

:idea: The Export NFO files only generates top-level tvshow.nfo files. Episode-level *.nfo files are not supported. I've never even heard of season.nfo files.


:idea: The Fetch artwork and NFO files (v2) script does support Episode-level *.nfo files though. The *.nfo files generated may or may not be exactly what Jellyfin wants though.


:arrow: You'll want to rename files with {jellyfin.id} so that Jellyfin can easily and reliably identify files. You don't need *.nfo files for that. If you want *.nfo files you can then configure Jellyfin / Emby / Kodi / etc to export them in the Jellyfin / Emby / Kodi / etc format as needed. You'll want Jellyfin to generate those *.nfo files because only Jellyfin knows exactly what Jellyfin wants.
:idea: Please read the FAQ and How to Request Help.
rg7qpkoh
Posts: 9
Joined: 08 Dec 2023, 02:15

Re: Generate NFOs for Jellyfin

Post by rg7qpkoh »

rednoah wrote: 08 Dec 2023, 04:20 :idea: The Export NFO files only generates top-level tvshow.nfo files. Episode-level *.nfo files are not supported. I've never even heard of season.nfo files.
Thanks for confirming the behavior. That's what I was seeing, but wanted to make sure I wasn't just holding it wrong. What Jellyfin wants should be basically exactly what Kodi wants/generates, according to their docs, when it comes to NFO files.

rednoah wrote: 08 Dec 2023, 04:20 :idea: The Fetch artwork and NFO files (v2) script does support Episode-level *.nfo files though. The *.nfo files generated may or may not be exactly what Jellyfin wants though.
I suppose I can just delete the images after and cleanup the NFO files. I'll have to give this a whirl...

rednoah wrote: 08 Dec 2023, 04:20 :arrow: You'll want to rename files with {jellyfin.id} so that Jellyfin can easily and reliably identify files. You don't need *.nfo files for that. If you want *.nfo files you can then configure Jellyfin / Emby / Kodi / etc to export them in the Jellyfin / Emby / Kodi / etc format as needed. You'll want Jellyfin to generate those *.nfo files because only Jellyfin knows exactly what Jellyfin wants.
Perhaps my timing is just unfortunate (just migrated from Plex). TheTVDB plugin for Jellyfin is currently non-functional, so I cannot match to the TVDB DVD order for anything. I've matched lots of things (but not everything) to the TVDB DVD order in Plex over the years, so my library is definitely a certain way already. TheMovieDB has DVD order for some things, but it very rarely matches up with TheTVDB in my experience.

:!: Cartoons in particular are a nightmare...

:?: Perhaps there's another solution to this problem I'm not seeing.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Generate NFOs for Jellyfin

Post by rednoah »

Well, the inconvenient answer is to make everything conform to TMDB standard order.

If you already have episode titles then the task at hand should be fairly straightforward, though it will take some time going through everything even if just to double-check and confirm.
:idea: Please read the FAQ and How to Request Help.
rg7qpkoh
Posts: 9
Joined: 08 Dec 2023, 02:15

Re: Generate NFOs for Jellyfin

Post by rg7qpkoh »

Re:
The Fetch artwork and NFO files (v2) script does support Episode-level *.nfo files though. The *.nfo files generated may or may not be exactly what Jellyfin wants though.
This seems to...almost fully solve some other one-off show issues. Only problem is...I can't seem to specify the language as English? So I can end up with all of my titles and plots in Japanese instead of English, for instance. :o

Additionally: I can't seem to re-generate `.xattr` folders/files unless I rename all of my episodes the wrong thing and running `filebot -rename` again. Surely I'm missing something?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Generate NFOs for Jellyfin

Post by rednoah »

1.
If you're using the Fetch artwork and NFO files (v2) script then the *.nfo language is based on xattr metadata, i.e. if you have renamed files with English language preferences then English is used.




2.
You can't re-generate .xattr folders without renaming files. filebot -rename will fail (and not post-process files in any way) if files cannot be renamed since they're already named as required.

:?: What is the use case? Why do you need to re-generate .xattr folders? What original problem does re-generating .xattr folders solve? (changing .xattr typically means changing the Episode / Movie match, which means changing the file name, which means new .xattr folders for the new file names)
:idea: Please read the FAQ and How to Request Help.
rg7qpkoh
Posts: 9
Joined: 08 Dec 2023, 02:15

Re: Generate NFOs for Jellyfin

Post by rg7qpkoh »

rednoah wrote: 13 Dec 2023, 00:41 1.
If you're using the Fetch artwork and NFO files (v2) script then the *.nfo language is based on xattr metadata, i.e. if you have renamed files with English language preferences then English is used.
I don't know what I'm doing wrong, then.

Here's an example of the generated `.xattr` for a file:

Code: Select all

Full Metal Panic!$ cat -pp Season\ 04/.xattr/Full\ Metal\ Panic\!\ \(2002\)\ -\ S04E01\ -\ Zero\ Hour.mkv/net.filebot.*
Full Metal Panic (2002) - S04E01 - Zero Hour.mkv
{
  "@type": "Episode",
  "seriesName": "Full Metal Panic!",
  "season": 4,
  "episode": 1,
  "title": "Zero Hour",
  "absolute": 50,
  "airdate": {
    "year": 2018,
    "month": 4,
    "day": 14
  },
  "id": 5895913,
  "group": "Full Metal Panic! Invisible Victory",
  "seriesInfo": {
    "database": "TheTVDB",
    "order": "Airdate",
    "language": "en-US",
    "type": "TV Series",
    "id": 78914,
    "name": "Full Metal Panic!",
    "aliasNames": [
      "Full Metal Panic? Fumoffu",
      "フルメタル・パニック! (2002)",
      "フルメタル・パニック?ふもっふ",
      "フルメタル・パニック! The Second Raid",
      "フルメタル・パニック! Invisible Victory",
      "わりとヒマな戦隊長の一日"
    ],
    "startDate": {
      "year": 2002,
      "month": 1,
      "day": 8
    },
    "genres": [
      "Science Fiction",
      "Adventure",
      "Action",
      "Anime"
    ],
    "rating": 29915,
    "runtime": 25,
    "status": "Ended"
  }
}
But the episode NFO is in Japanese:

Code: Select all

Full Metal Panic!$ cat -pp Season\ 04/Full\ Metal\ Panic\!\ \(2002\)\ -\ S04E01\ -\ Zero\ Hour.nfo
<episodedetails>
  <uniqueid type='tvdb'>5895913</uniqueid>
  <title>ゼロアワー</title>
  <season>4</season>
  <episode>1</episode>
  <aired>2018-04-14</aired>
  <plot>波しぶき立ち上がる岸壁近くの墓地で出会う双子の兄妹、レナードとテッサ。対峙する二人。テロ組織「アマルガム」は“その時”を迎えるべく、着々と準備を進めていく。一方、冬の都立陣代高校では間もなく、三学期を迎えようとしていた・・・。</plot>
  <thumb aspect='thumb'>https://artworks.thetvdb.com/banners/episodes/78914/5895913.jpg</thumb>
  <credits>Shoji Gatoh</credits>
  <director>Katsuichi Nakayama</director>
  <fileinfo>
    <streamdetails>
      <video>
        <codec>AVC</codec>
        <aspect>1.778</aspect>
        <width>1920</width>
        <height>1080</height>
      </video>
      <audio>
        <codec>AAC</codec>
        <language>eng</language>
        <channels>2</channels>
      </audio>
      <audio>
        <codec>AAC</codec>
        <language>jpn</language>
        <channels>2</channels>
      </audio>
      <subtitle>
        <language>eng</language>
      </subtitle>
      <subtitle>
        <language>eng</language>
      </subtitle>
    </streamdetails>
  </fileinfo>
</episodedetails>
:( Note: I have to do this as there is no way to match the episodes to TheMovieDB as it's completely missing episodes and the show is locked and people have been shot down on edits...so the only way to match this is against TheTVDB and NFO files, so Jellyfin has the right data.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Generate NFOs for Jellyfin

Post by rednoah »

I see. I checked the code and it looks like episode translations are not even supported in the first place. FileBot will just pass on the Episode information as-is returned by the API. Translations would require additional network requests due to API limitations, i.e. can't have extended Episode information and translated name / summary at the same time.
:idea: Please read the FAQ and How to Request Help.
rg7qpkoh
Posts: 9
Joined: 08 Dec 2023, 02:15

Re: Generate NFOs for Jellyfin

Post by rg7qpkoh »

Ah-ha! At least I'm not going crazy. :D
Post Reply