NFO files/Episodes: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
m (adjust table)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
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 96: Line 100:
|<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<br>
Format as ''yyyy-mm-dd''
|-
|-
|<id></id> || No || No || || The default ID. <br>
|<id></id> || No || No || || The default ID. <br>
Line 120: Line 125:
|<director></director> || No || Yes || || Director
|<director></director> || No || Yes || || Director
|-
|-
|<premiered></premiered> || No || No || Yes || Inherited from TV show
|<premiered></premiered> || No || No || Yes || Inherited from TV show<br>
Format as ''yyyy-mm-dd''
|-
|-
|<year></year> || No || No || Yes || Inherited from TV show
|<year></year> || No || No || Yes || Inherited from TV show<br>
{{note|Kodi v17: Tag deprecated, use <premiered> tag instead.}}
{{note|Kodi v20: Use <premiered> tag only.}}
|-
|-
|<status></status> || No || No || || Not used  
|<status></status> || No || No || || Not used  
|-
|-
|<code><code></code></code> || No || No || || Not used
|<nowiki><code></code></nowiki> || 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<br>
Format as ''yyyy-mm-dd''
|-
|-
|<studio></studio> || No || Yes || Yes || Production studio. Inherited from TV Show
|<studio></studio> || No || Yes || Yes || Production studio. Inherited from TV Show
Line 135: Line 144:
|-
|-
|<syntaxhighlight lang="xml">
|<syntaxhighlight lang="xml">
    <episodebookmark>
  <episodebookmark>
        <position></position>
    <position></position>
    </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>
Line 152: Line 161:
         <durationinseconds></durationinseconds>
         <durationinseconds></durationinseconds>
         <stereomode></stereomode>
         <stereomode></stereomode>
        <hdrtype></hdrtype>
       </video>
       </video>
       <audio>
       <audio>
Line 167: Line 177:
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>
If ommitted, {{kodi}} will add runtime upon scanning
If ommitted, {{kodi}} will add runtime upon scanning<br><br>
 
Accepted values for <hdrtype></hdrtype> are:
* empty = SDR;
* hdr10;
* dolbyvision;
* hlg
|-
|-
|<syntaxhighlight lang="xml">
|<syntaxhighlight lang="xml">
Line 197: Line 213:


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 228:
     <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 245:
     <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 262:
     <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>
Line 266: Line 290:


{{top}}
{{top}}
{{updated|19}}
{{updated|20}}


[[Category:Karellen]]
[[Category:Karellen]]
[[Category:Video library]]
[[Category:Video library]]

Latest revision as of 09:59, 28 December 2023

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 or are not used 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/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

Format 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

Format as yyyy-mm-dd

<year></year> No No Yes Inherited from TV show

Note: Kodi v17: Tag deprecated, use <premiered> tag instead. Note: Kodi v20: Use <premiered> tag only.

<status></status> No No Not used
<code></code> No No Not used
<aired></aired> No No Original air date of the episode

Format 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>
        <hdrtype></hdrtype>
      </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

Accepted values for <hdrtype></hdrtype> are:

  • empty = SDR;
  • hdr10;
  • dolbyvision;
  • hlg
 <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.

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>


References



Return to top