NFO files/Episodes: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
m (add multi-episode)
m (adjust table)
Line 27: Line 27:


= nfo Tags =
= nfo Tags =
The following table lists the available XML tags. <ref>https://github.com/xbmc/xbmc/blob/master/xbmc/video/VideoInfoTag.cpp</ref>
The following table lists the available XML tags in the episode nfo file. <ref>https://github.com/xbmc/xbmc/blob/master/xbmc/video/VideoInfoTag.cpp</ref>
 
''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.
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




{|class="prettytable"
{|class="prettytable"
! NFO (xml) Tag || Required || Multiple || Notes
! NFO (xml) Tag || Required || Multiple || Inherited || Notes
|-
|-
|<episodedetails></episodedetails> || {{Yes}} || No || The top level parent tag for the nfo file. All other tags must be contained within these two tags
|<episodedetails></episodedetails> || {{Yes}} || No/Yes || || The top level parent tag for the nfo file. All other tags must be contained within these two tags<br/>
Yes - When creating multi-episode nfo files. See next section. <br/>
No - In all other cases, a single instance is used.
|-
|-
|<title></title> || {{Yes}} || No || The title for the episode
|<title></title> || {{Yes}} || No || || The title for the episode
|-
|-
|<originaltitle></originaltitle> || No || No || Inherited from TV show
|<originaltitle></originaltitle> || No || No || Yes || Inherited from TV show
|-
|-
|<showtitle></showtitle> || No || No || Inherited from TV show
|<showtitle></showtitle> || No || No || Yes || Inherited from TV show
|-
|-
|<syntaxhighlight lang="xml">
|<syntaxhighlight lang="xml">
Line 53: Line 55:
   </ratings>
   </ratings>
</syntaxhighlight>
</syntaxhighlight>
|| No || No || ''default="true"''  ''default="false"''<br>
|| No || No || || ''default="true"''  ''default="false"''<br>
::Only one rating can be set as ''default="true"'', additional ratings must be set as ''default="false"'' or ommitted<br>
::Only one rating can be set as ''default="true"'', additional ratings must be set as ''default="false"'' or ommitted<br>


Line 68: Line 70:
::''<rating name="imdb" max="10" default="false"> or <rating name="themoviedb" max="10">''<br>
::''<rating name="imdb" max="10" default="false"> or <rating name="themoviedb" max="10">''<br>
|-
|-
|<userrating></userrating> || No || No || Personal rating set by the user
|<userrating></userrating> || No || No || || Personal rating set by the user
|-
|-
|<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 || || Ignored on Import. Season is read from filename
|-
|-
|<episode></episode> || No || No || Ignored on Import. Episode 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
|<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
|<displayseason></displayseason> || No || No || || Used to place Specials episodes in the correct season
|-
|-
|<outline></outline> || No || No || Not used
|<outline></outline> || No || No || || Not used
|-
|-
|<plot></plot> || No || No || A description of the episode
|<plot></plot> || No || No || || A description of the episode
|-
|-
|<tagline></tagline> || No || No || Short slogan of the episode. No skins use this.
|<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
|<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
|<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
|<mpaa></mpaa> || No || No || Yes || Inherited from TV show
|-
|-
|<playcount></playcount> || No || No || Number of times episode has been played.<br>See... [[Import-export_library/Video#Watched.2C_PlayCount.2C_ResumePoints|Import-Export]]
|<playcount></playcount> || No || No || || Number of times episode has been played.<br>See... [[Import-export_library/Video#Watched.2C_PlayCount.2C_ResumePoints|Import-Export]]
|-
|-
|<lastplayed></lastplayed> || No || No || Date last played as ''yyyy-mm-dd''
|<lastplayed></lastplayed> || No || No || || Date last played as ''yyyy-mm-dd''
|-
|-
|<id></id> || No || No || The default ID. <br>
|<id></id> || No || No || || The default ID. <br>
Do not use as this is a Kodi generated tag. See next item.
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.<br>
|<uniqueid type="" default=""></uniqueid> || {{Yes}} || Yes || || The ID from the scraper site.<br>
''type=""'' Identifier of the ID. Do not use "default". Examples of identifier include...<br>
''type=""'' Identifier of the ID. Do not use "default". Examples of identifier include...<br>
::''<uniqueid type="imdb"''<br>
::''<uniqueid type="imdb"''<br>
Line 107: Line 109:
::The value can be alpha-numeric eg ''tt3480556'' for imdb, ''286668'' for tmdb, ''home001'' for home movies, etc<br>
::The value can be alpha-numeric eg ''tt3480556'' for imdb, ''286668'' for tmdb, ''home001'' for home movies, etc<br>
''default="true"''  ''default="false"''<br>
''default="true"''  ''default="false"''<br>
::Only one uniqueID can be set as ''default="true"'', additional uniqueID's must be set as ''default="false"'' or ommit the default attribute<br>
::Only one uniqueID can be set as ''default="true"'', additional uniqueIDs must be set as ''default="false"'' or ommit the default attribute <br/>
Example of complete entry...
Example of complete entry...
::''<uniqueid type="tmdb" default="true">''<br>
::''<uniqueid type="tmdb" default="true">''<br>
::''<uniqueid type="imdb" default="false"> or <uniqueid type="imdb">''<br>
::''<uniqueid type="imdb" default="false"> or <uniqueid type="imdb">''<br>
|-
|-
|<genre></genre> || No || Yes || Inherited from TV show
|<genre></genre> || No || Yes || Yes || Inherited from TV show
|-
|-
|<credits></credits> || No || Yes || Field for writers.
|<credits></credits> || No || Yes || || Field for writers.
|-
|-
|<director></director> || No || Yes || Director
|<director></director> || No || Yes || || Director
|-
|-
|<premiered></premiered> || No || No || Inherited from TV show
|<premiered></premiered> || No || No || Yes || Inherited from TV show
|-
|-
|<year></year> || No || No || Inherited from TV show
|<year></year> || No || No || Yes || Inherited from TV show
|-
|-
|<status></status> || No || No || Not used  
|<status></status> || No || No || || Not used  
|-
|-
|<code><code></code></code> || No || No || Not used
|<code><code></code></code> || No || No || || Not used
|-
|-
|<aired></aired> || No || No || Original air date of the episode as as ''yyyy-mm-dd''
|<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
|<studio></studio> || No || Yes || Yes || Production studio. Inherited from TV Show
|-
|-
|<trailer></trailer> || No || No || Not used
|<trailer></trailer> || No || No ||  ||Not used
|-
|-
|<syntaxhighlight lang="xml">
|<syntaxhighlight lang="xml">
Line 137: Line 139:
     </episodebookmark>
     </episodebookmark>
</syntaxhighlight>
</syntaxhighlight>
|| No || No || Episode Bookmark in seconds. ''See: [[Bookmarks_and_chapters|Episode Bookmarks]]''<br>
|| No || No ||  || Episode Bookmark in seconds. ''See: [[Bookmarks_and_chapters|Episode Bookmarks]]''<br>
Not used for Import
Not used for Import
|-
|-
Line 162: Line 164:
  </fileinfo>
  </fileinfo>
</syntaxhighlight>
</syntaxhighlight>
|| No || Yes || Multiple entries of <audio> and <subtitles> accepted<br>
|| No || Yes || || Multiple entries of <audio> and <subtitles> accepted<br>
In v17 and prior, {{kodi}} would overwrite these values on first play of the file.<br>
In v17 and prior, {{kodi}} would overwrite these values on first play of the file.<br>
In v18 that process was removed and values in these tags will remain.<ref>https://github.com/xbmc/xbmc/pull/16342</ref><br>
In v18 that process was removed and values in these tags will remain.<ref>https://github.com/xbmc/xbmc/pull/16342</ref><br>
Line 175: Line 177:
  </actor>
  </actor>
</syntaxhighlight>
</syntaxhighlight>
|| No || Yes || The <order> tag determines where in the list the actor will appear. 0 = first in the list  
|| No || Yes ||  || The <order> tag determines where in the list the actor will appear. 0 = first in the list  
Supports "clear" attribute
Supports "clear" attribute
|-
|-
Line 184: Line 186:
  </resume>
  </resume>
</syntaxhighlight>
</syntaxhighlight>
|| No || No || Set the resume position<br>See... [[Import-export_library/Video#Watched.2C_PlayCount.2C_ResumePoints|Import-Export]]  
|| No || No || || Set the resume position<br>See... [[Import-export_library/Video#Watched.2C_PlayCount.2C_ResumePoints|Import-Export]]  
|-
|-
|<dateadded></dateadded> || No || No || mTime of the playable video file. Can be altered in advancedsettings.xml<br>See... '''[[Advancedsettings.xml#videolibrary]]'''
|<dateadded></dateadded> || No || No || || mTime of the playable video file. Can be altered in advancedsettings.xml<br>See... '''[[Advancedsettings.xml#videolibrary]]'''
|}
|}


Line 192: Line 194:


= Multi-Episode Files =
= Multi-Episode Files =
There may be instances where a video file contains two or more episodes. This is common for ISO files and is easily handled by {{kodi}}.  
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.


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]]'''
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.




Line 204: Line 206:
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>                                       <!-- NFO for first episode-->
<episodedetails>                                   <!-- metadata for first episode-->
     <title>Episode 1</title>
     <title>Episode 1</title>
     <userrating></userrating>
     <userrating></userrating>
Line 219: Line 221:
     </actor>
     </actor>
</episodedetails>
</episodedetails>
<episodedetails>                                       <!-- NFO for second episode-->
<episodedetails>                                   <!-- metadata for second episode-->
     <title>Episode 2</title>
     <title>Episode 2</title>
     <userrating></userrating>
     <userrating></userrating>
Line 234: Line 236:
     </actor>
     </actor>
</episodedetails>
</episodedetails>
<episodedetails>                                       <!-- NFO for third episode-->
<episodedetails>                                   <!-- metadata for third episode-->
     <title>Episode 3</title>
     <title>Episode 3</title>
     <userrating></userrating>
     <userrating></userrating>

Revision as of 01:01, 30 December 2021

NFO Contents

NFO Main Page


See also:


Return to:

Home icon grey.png   ▶ NFO files ▶ Episodes


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.


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.



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 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 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


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.

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>
    <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>
    <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>
    <uniqueid type="" default="true"></uniqueid>
    <credits></credits>
    <director></director>
    <aired></aired>
    <actor>
        <name></name>
        <role></role>
        <order></order>
        <thumb></thumb>
    </actor>
</episodedetails>


References



Return to top