NFO files/Episodes

From Official Kodi Wiki
Jump to navigation Jump to search
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 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. [1]

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.

For multi-part episodes, add multiple <episodedetails> XML blocks in succession in the same nfo file


NFO (xml) Tag Required Multiple Notes
<episodedetails></episodedetails> Yes No The top level parent tag for the nfo file. All other tags must be contained within these two tags
<title></title> Yes No The title for the episode
<originaltitle></originaltitle> No No Inherited from TV show
<showtitle></showtitle> No No 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 Ignored on Import. Season is read from filename
<episode></episode> No No Ignored on Import. Episode is read from filename
<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
<thumb aspect="thumb" preview=""></thumb> No Yes Path to episode artwork. Not needed when using local artwork
<mpaa></mpaa> No No 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 as this is a 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 uniqueID's 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 Inherited from TV show
<credits></credits> No Yes Field for writers.
<director></director> No Yes Director
<premiered></premiered> No No Inherited from TV show
<year></year> No No 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 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 References



Return to top