Difference between revisions of "NFO files/Episodes"

From Official Kodi Wiki
Jump to navigation Jump to search
m (adjust table)
(More multi-episode corrections)
 
Line 10: Line 10:
One nfo file for '''each''' episode is required. This file holds information specific to that episode.  
One nfo file for '''each''' episode is required. This file holds information specific to that episode.  


Most metadata contained in a {{kodi}} exported NFO file is metadata inherited from the TV Show which is why the episode NFO template is relatively small.
Most metadata contained in a {{kodi}} exported NFO file is metadata inherited from the TV Show or are not used which is why the episode NFO template is relatively small.




Line 74: Line 74:
|<top250></top250> || No || No || || Not used
|<top250></top250> || No || No || || Not used
|-
|-
|<season></season> || No || No || || Ignored on Import. Season is read from filename
|<season></season> || No || No/Yes || || Season number is read from filename in all cases<br/>
Not required for single nfo files<br/>
Required for multi-episode nfo files to match the metadata to the correct episode. See next section
|-
|-
|<episode></episode> || No || No || || Ignored on Import. Episode is read from filename
|<episode></episode> || No || No/Yes || || Episode number is read from filename in all cases<br/>
Not required for single nfo files<br/>
Required for multi-episode nfo files to match the metadata to the correct episode. See next section
|-
|-
|<displayepisode></displayepisode> || No || No || || Used to place Specials episodes in the correct episode order
|<displayepisode></displayepisode> || No || No || || Used to place Specials episodes in the correct episode order
Line 197: Line 201:


Multi-episode video files still use a single nfo file. The metadata for each episode is stacked in the single nfo file. Below is an example of an abbreviated multi-episode nfo file containing 3 episodes.
Multi-episode video files still use a single nfo file. The metadata for each episode is stacked in the single nfo file. Below is an example of an abbreviated multi-episode nfo file containing 3 episodes.
One difference between the single and multi nfo file is that the ''<season></season>'' and ''<episode></episode>'' tags are required for each episode in the multi nfo file. {{kodi}} still requires the filename to contain the season and episode numbering, but it also requires these additional tags so it can match the metadata to the correct episode. The metadata for each episode must be in correct numerical order.


For correct naming of the video file, nfo file and artwork thumb, see: '''[[Naming_video_files/Episodes#Multi-Episode_Files|Naming Multi-Episode Files]]'''
For correct naming of the video file, nfo file and artwork thumb, see: '''[[Naming_video_files/Episodes#Multi-Episode_Files|Naming Multi-Episode Files]]'''
Line 210: Line 216:
     <userrating></userrating>
     <userrating></userrating>
     <plot></plot>
     <plot></plot>
    <season>1</season>
    <episode>1</episode>
     <uniqueid type="" default="true"></uniqueid>
     <uniqueid type="" default="true"></uniqueid>
     <credits></credits>
     <credits></credits>
Line 225: Line 233:
     <userrating></userrating>
     <userrating></userrating>
     <plot></plot>
     <plot></plot>
    <season>1</season>
    <episode>2</episode>
     <uniqueid type="" default="true"></uniqueid>
     <uniqueid type="" default="true"></uniqueid>
     <credits></credits>
     <credits></credits>
Line 240: Line 250:
     <userrating></userrating>
     <userrating></userrating>
     <plot></plot>
     <plot></plot>
    <season>1</season>
    <episode>3</episode>
     <uniqueid type="" default="true"></uniqueid>
     <uniqueid type="" default="true"></uniqueid>
     <credits></credits>
     <credits></credits>

Latest revision as of 22:50, 30 December 2021

NFO Contents

NFO Main Page


See also:


Return to:

Home icon grey.png   ▶ NFO files ▶ Episodes


1 Introduction

Episodes must abide by the standard filenaming conventions even when using nfo files. Kodi determines the season and episode numbering (S01E01) from the episode filename, not from the NFO file.

One nfo file for each episode is required. This file holds information specific to that episode.

Most metadata contained in a Kodi exported NFO file is metadata inherited from the TV Show or are not used which is why the episode NFO template is relatively small.


2 nfo Name and Location

Regardless of what settings you have set for the source and scraper, Kodi will always search for and scan the nfo file first where available.

The episode nfo file is placed alongside each episode video file. The episode nfo filename is the same as the video filename but with the .nfo extension. See image below for examples.



3 nfo Tags

The following table lists the available XML tags in the episode nfo file. [1]

Yes in the Inherited column indicates a tag that uses data from the parent TV Show. These tags are created in the exported nfo file but are ignored on import so it is not possible to change this data at the episode level.

Three XML tags are required and are indicated in the table below. All other tags are optional. Of course the less tags used, the less information scanned into the library.


NFO (xml) Tag Required Multiple Inherited Notes
<episodedetails></episodedetails> Yes No/Yes The top level parent tag for the nfo file. All other tags must be contained within these two tags

Yes - When creating multi-episode nfo files. See next section.
No - In all other cases, a single instance is used.

<title></title> Yes No The title for the episode
<originaltitle></originaltitle> No No Yes Inherited from TV show
<showtitle></showtitle> No No Yes Inherited from TV show
<ratings>
    <rating name="" max="10" default="">
       <value></value>
       <votes></votes>
    </rating>
  </ratings>
No No default="true" default="false"
Only one rating can be set as default="true", additional ratings must be set as default="false" or ommitted

name="identifier". Do not use "default". Examples of identifier include...

<rating name="imdb" max="10">
<rating name="trakt" max="10">
<rating name="tvmaze" max="10">
<rating name="metacritic" max="10">
<rating name="tomatometerallcritics" max="10">
<rating name="tomatometerallaudience" max="10">

Example of complete entry...

<rating name="themoviedb" max="10" default="true">
<rating name="imdb" max="10" default="false"> or <rating name="themoviedb" max="10">
<userrating></userrating> No No Personal rating set by the user
<top250></top250> No No Not used
<season></season> No No/Yes Season number is read from filename in all cases

Not required for single nfo files
Required for multi-episode nfo files to match the metadata to the correct episode. See next section

<episode></episode> No No/Yes Episode number is read from filename in all cases

Not required for single nfo files
Required for multi-episode nfo files to match the metadata to the correct episode. See next section

<displayepisode></displayepisode> No No Used to place Specials episodes in the correct episode order
<displayseason></displayseason> No No Used to place Specials episodes in the correct season
<outline></outline> No No Not used
<plot></plot> No No A description of the episode
<tagline></tagline> No No Short slogan of the episode. No skins use this.
<runtime></runtime> No No Minutes only. If ommitted, Kodi will add runtime upon scanning of the video file
<thumb aspect="thumb" preview=""></thumb> No Yes Path to episode artwork. Not needed when using local artwork
<mpaa></mpaa> No No Yes Inherited from TV show
<playcount></playcount> No No Number of times episode has been played.
See... Import-Export
<lastplayed></lastplayed> No No Date last played as yyyy-mm-dd
<id></id> No No The default ID.

Do not use. It is a deprecated Kodi generated tag. See next item.

<uniqueid type="" default=""></uniqueid> Yes Yes The ID from the scraper site.

type="" Identifier of the ID. Do not use "default". Examples of identifier include...

<uniqueid type="imdb"
<uniqueid type="tvdb"
<uniqueid type="tmdb"
For non-scraped items, use simple values like "home", "sport", "doco" etc
The value can be alpha-numeric eg tt3480556 for imdb, 286668 for tmdb, home001 for home movies, etc

default="true" default="false"

Only one uniqueID can be set as default="true", additional uniqueIDs must be set as default="false" or ommit the default attribute

Example of complete entry...

<uniqueid type="tmdb" default="true">
<uniqueid type="imdb" default="false"> or <uniqueid type="imdb">
<genre></genre> No Yes Yes Inherited from TV show
<credits></credits> No Yes Field for writers.
<director></director> No Yes Director
<premiered></premiered> No No Yes Inherited from TV show
<year></year> No No Yes Inherited from TV show
<status></status> No No Not used
No No Not used
<aired></aired> No No Original air date of the episode as as yyyy-mm-dd
<studio></studio> No Yes Yes Production studio. Inherited from TV Show
<trailer></trailer> No No Not used
<episodebookmark>
        <position></position>
    </episodebookmark>
No No Episode Bookmark in seconds. See: Episode Bookmarks

Not used for Import

<fileinfo>
    <streamdetails>
      <video>
        <codec></codec>
        <aspect></aspect>
        <width></width>
        <height></height>
        <durationinseconds></durationinseconds>
        <stereomode></stereomode>
      </video>
      <audio>
        <codec></codec>
        <language></language>
        <channels></channels>
      </audio>
      <subtitle>
        <language></language>
      </subtitle>
    </streamdetails>
 </fileinfo>
No Yes Multiple entries of <audio> and <subtitles> accepted

In v17 and prior, Kodi would overwrite these values on first play of the file.
In v18 that process was removed and values in these tags will remain.[2]
If ommitted, Kodi will add runtime upon scanning

<actor>
   <name></name>
   <role></role>
   <order></order>
   <thumb></thumb>
 </actor>
No Yes The <order> tag determines where in the list the actor will appear. 0 = first in the list

Supports "clear" attribute

<resume>
   <position></position>
   <total></total>
 </resume>
No No Set the resume position
See... Import-Export
<dateadded></dateadded> No No mTime of the playable video file. Can be altered in advancedsettings.xml
See... Advancedsettings.xml#videolibrary


4 Multi-Episode Files

There may be instances where a video file contains two or more episodes. This is common for ISO files.

Multi-episode video files still use a single nfo file. The metadata for each episode is stacked in the single nfo file. Below is an example of an abbreviated multi-episode nfo file containing 3 episodes.

One difference between the single and multi nfo file is that the <season></season> and <episode></episode> tags are required for each episode in the multi nfo file. Kodi still requires the filename to contain the season and episode numbering, but it also requires these additional tags so it can match the metadata to the correct episode. The metadata for each episode must be in correct numerical order.

For correct naming of the video file, nfo file and artwork thumb, see: Naming Multi-Episode Files


Example Multi-Episode NFO File
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>                                    <!-- metadata for first episode-->
    <title>Episode 1</title>
    <userrating></userrating>
    <plot></plot>
    <season>1</season>
    <episode>1</episode>
    <uniqueid type="" default="true"></uniqueid>
    <credits></credits>
    <director></director>
    <aired></aired> 
    <actor>
        <name></name>
        <role></role>
        <order></order>
        <thumb></thumb>
    </actor>
</episodedetails>
<episodedetails>                                    <!-- metadata for second episode-->
    <title>Episode 2</title>
    <userrating></userrating>
    <plot></plot>
    <season>1</season>
    <episode>2</episode>
    <uniqueid type="" default="true"></uniqueid>
    <credits></credits>
    <director></director>
    <aired></aired>
    <actor>
        <name></name>
        <role></role>
        <order></order>
        <thumb></thumb>
    </actor>
</episodedetails>
<episodedetails>                                    <!-- metadata for third episode-->
    <title>Episode 3</title>
    <userrating></userrating>
    <plot></plot>
    <season>1</season>
    <episode>3</episode>
    <uniqueid type="" default="true"></uniqueid>
    <credits></credits>
    <director></director>
    <aired></aired>
    <actor>
        <name></name>
        <role></role>
        <order></order>
        <thumb></thumb>
    </actor>
</episodedetails>


5 References



Return to top