NFO files/Movies: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Fixed <code> tag)
(40 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{mininav|[[General topics]]|[[Videos]]|[[Video library/Management|Management]]|[[NFO files]]}}
{{NFO_content}}
=== Video .nfo Files containing XML data ===
{{mininav|[[NFO files]]}}
1. The *.nfo file is an XML file containing the data for inclusion in the library.


movie.nfo will override all and any .nfo files in the same folder as the media files if you use the "Use foldernames for lookups" setting. If you don't, then moviename.nfo is used.
__TOC__
If there is only one .nfo file in a folder, The scraper will use it for all media files in that folder. If there are multiple media files in a folder, the *.nfo should be named exactly the same as the video file it is representing (ie. '''moviename.avi''' and '''moviename.nfo'''). In the case of multi-part (stacked) video [[File Stacking|stacking]], name the file either '''moviename.nfo''' or '''moviename-CD1.nfo''' where the first filename is '''moviename-CD1.avi'''. Note, if your movie is ripped as VOB's and stored in a 'VIDEO_TS' folder, you will have to name the file 'VIDEO_TS.nfo' and place it in the same directory with the VIDEO_TS.ifo file.


Additionally the 'set' tag can be used to help sort movies that are [[Movie Sets|part of a series or collection]] (ie Harry Potter, James Bond films). This sort of collection tagging must be done in the .NFO file before the movie is scanned into the library.


<source lang="xml">
= Introduction =
    <movie>
NFO files to be scraped into the movie library are relatively simple and require only a single nfo file per title.
        <title>Who knows</title>
        <originaltitle>Who knows for real</originaltitle>
        <sorttitle>Who knows 1</sorttitle>
        <set>Who knows trilogy</set>
        <rating>6.100000</rating>
        <year>2008</year>
        <top250>0</top250>
        <votes>50</votes>
        <outline>A look at the role of the Buckeye State in the 2004 Presidential Election.</outline>
        <plot>A look at the role of the Buckeye State in the 2004 Presidential Election.</plot>
        <tagline></tagline>
        <runtime>90</runtime> //runtime in minutes
        <thumb>http://ia.ec.imdb.com/media/imdb/01/I/25/65/31/10f.jpg</thumb>
        <mpaa>Not available</mpaa>
        <playcount>0</playcount><!-- setting this to > 0 will mark the movie as watched if the "importwatchedstate" flag is set in advancedsettings.xml -->
        <id>tt0432337</id>
        <filenameandpath>c:\Dummy_Movie_Files\Movies\...So Goes The Nation.avi</filenameandpath>
        <trailer></trailer>
        <genre></genre>
        <credits></credits>
        <fileinfo>
            <streamdetails>
                <video>
                    <codec>h264</codec>
                    <aspect>2.35</aspect>
                    <width>1920</width>
                    <height>816</height>
                </video>
                <audio>
                    <codec>ac3</codec>
                    <language>eng</language>
                    <channels>6</channels>
                </audio>
                <audio>
                    <codec>ac3</codec>
                    <language>spa</language>
                  <channels>2</channels>
                </audio>
                <subtitle>
                    <language>spa</language>
                </subtitle>
            </streamdetails>
        </fileinfo>
        <director>Adam Del Deo</director>
        <actor>
            <name>Paul Begala</name>
            <role>Himself</role>
        </actor>
        <actor>
            <name>George W. Bush</name>
            <role>Himself</role>
        </actor>
        <actor>
            <name>Mary Beth Cahill</name>
            <role>Herself</role>
        </actor>
        <actor>
            <name>Ed Gillespie</name>
            <role>Himself</role>
        </actor>
        <actor>
            <name>John Kerry</name>
            <role>Himself</role>
        </actor>
    </movie>
</source>


=== Video .nfo files containing a URL ===
2. The *.nfo file contains a URL of the information page to scrape.
The file can include other information (i.e. scene info), XBMC will scan through it and use a relevant URL if a match is found.


The scraper tries to match URL's to all scrapers of the content type a directory is set to. e.g. if you set the content type to movies, all movie scrapers check .nfo files for a matching URL. This means that .nfo files override the scraper setting. I.e. a directory is set to use the IMDB scraper but you have a German movie in it. Simply create an .nfo for that movie with the OFDB link in it and you are sorted!


* <code>Moviename.nfo</code> placed next to Moviename.avi where Moviename is the name of the movie file.
= nfo Name and Location =
'''{{resize|1.2em|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.}}'''


* <code>movie.nfo</code> if you use the "Use Foldername for Lookups" option, movie.nfo takes priority over any other .nfo files.
There are two naming schemes for movie nfo files. Both are explained and {{kodi}} recommends using the ''<VideoFileName>.nfo'' format.


If you use the "Movies are in separate folders that match the movie title" [[Set Contents (Video Library)#Options After Selecting Scraper|scraper setting]] XBMC will use the first nfo file it finds in the folder (other than the .nfo files described above) and apply it to any valid video file it finds in the same folder.
<section begin="MovieNFONaming" />;<VideoFileName>.nfo
:*NFO Files are named the same as the video file except with the ''.nfo'' extension.
:*We recommend using this filename format to name nfo files.


=== Video .nfo files containing a mix of XML and URL ===
;movie.nfo
You can also create .nfo files that contain both XML data and an URL.
:{{Kodi}} may also scan nfo files named '''''movie.nfo'''''. To use this name, the setting '''Movies are in separate folders that match the movie title''' must be '''Enabled''' in the '''[[Adding_video_sources#Set_Content|Set Content Screen]]'''
This is useful for instance, if you want the entry in your database to have another name than the one officially provided by the scraper, for the movie to sort differently or the movie to be a part of a movie set.
:*If the above setting is not enabled, {{kodi}} will ignore the ''movie.nfo''. If the ''<VideoFileName>.nfo'' file is available, {{kodi}} will scan this one instead, otherwise an online scrape will be performed if a valid scraper is set for the Source.
:*If you use ''movie.nfo'' and later Export your library to Separate Files, {{kodi}} will still create the nfo file in the ''<VideoFileName>.nfo'' format and two nfo files will exist. If a Refresh or rescan is run in future, and the above setting is still enabled, the ''<VideoFileName>.nfo'' file will be ignored in favour of ''movie.nfo'', which means any changes you may have made to the library entry (play counts, watched status etc) will not be re-scanned back into the library.
:*We recommend using the ''<VideoFileName>.nfo'' format for nfo files to avoid the above traps.<section end="MovieNFONaming" />


Example:
The below image details naming and location for Single File, DVD and Bluray movies:
<source lang="xml">
    <movie>
        <title>Sin City (Recut, Extended, Unrated)</title>
        <runtime>147 min.</runtime>
    </movie>
    http://www.imdb.com/title/tt0401792/
</source>


<gallery mode="packed" widths="1000px" heights="562px">
File:LocalMovieArtwork01.jpg|'''''Example of correct use of Movie Folder with artwork, nfo file, trailer and theme.<br> Take note of file naming and location.'''''
</gallery>


<source lang="xml">
    <movie>
        <title>Star Wars (1977 Original Theatrical Release)</title>
        <runtime>121 min.</runtime>
        <set>Star Wars Saga</set>
        <sorttitle>Star Wars1</sorttitle>
    </movie>
    http://www.imdb.com/title/tt0076759/
</source>


By default the xml entry is '''added''' to the scraped entry in the database and may result in some duplicates. If you want to completely override the scraped result you need to set a clear attribute for the relevant xml tag in the .nfo file.


Example:
= nfo Tags =
<source lang="xml">
The following table lists available XML tags. <ref>https://github.com/xbmc/xbmc/blob/master/xbmc/video/VideoInfoTag.cpp</ref>
<movie>
    <genre clear="true">Action</genre>
    <genre>Horror</genre>
    <genre>Thriller</genre>
    <director clear="true">Frank Miller</director>
    <director>Robert Rodriguez</director>
    <director>Quentin Tarantino</director>
</movie>
http://www.imdb.com/title/tt0401792/
</source>


Currently supported tags for the clear attribute are genre, director, studio, actor, credits and artist for Music Videos.
The "Required" column indicates whether a tag can be optionally added or ommitted when creating the nfo to suit your purpose. The less tags used, the less information added to the library.


{|class="prettytable"
! width=430px | NFO (xml) Tag || Required || Multiple || Notes
|-
|<movie></movie> ||  {{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 movie
|-
|<originaltitle></originaltitle> || No || No || Displays the original title of the movie. <br>
For example, if the scraper is set to german language and the scraped movie in german is "Der mit dem Wolf tanzt" the original title will be "Dances with Wolves"
|-
|<sorttitle></sorttitle> || No || No || Allows alternate title sort without modifying movie title. Not displayed in any library listing. See: ''[[Movie_sets#Sort_Title|Sort Title]]''
|-
|
  <ratings>
    <rating name="" max="10" default="">
      <value></value>
      <votes></votes>
    </rating>
  </ratings>
|| 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 omit the default attribute<br>


=== Movie sets ===
''name="identifier"''. Do not use "default". Examples of identifier include...<br>
::''<rating name="imdb" max="10">''<br>
::''<rating name="trakt" max="10">''<br>
::''<rating name="themoviedb" max="10">''<br>
::''<rating name="metacritic" max="10">''<br>
::''<rating name="tomatometerallcritics" max="10">''<br>
::''<rating name="tomatometerallaudience" max="10">''<br>


Example of complete entry...
::''<rating name="themoviedb" max="10" default="true">''<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
|-
|<top250></top250> || No || No || Ranking in IMDB Top 250 movies
|-
|<outline></outline> ||  ||  || Should be short, will be displayed on a single line (scraped from IMDB only)
|-
|<plot></plot> ||  ||  || Can contain more information on multiple lines, will be wrapped
|-
|<tagline></tagline> || No || No || Short movie slogan. "The true story of a real fake" is the tagline for "Catch me if you can"
|-
|<runtime></runtime> || No || No || Minutes only. If ommitted, {{kodi}} will add runtime upon scanning
|-
|<thumb aspect="" preview=""></thumb> || No || Yes || Path to available Movie Posters. Not needed when using local artwork<br>
Example use of ''aspect=""''
:<thumb aspect="banner"
:<thumb aspect="clearart"
:<thumb aspect="clearlogo"
:<thumb aspect="discart"
:<thumb aspect="keyart"
:<thumb aspect="landscape"
:<thumb aspect="poster"
|-
|
<fanart>
    <thumb preview=""></thumb>
</fanart>
|| No || Yes^ || Path to available movie fanart.<br>
:^ Multiple <thumb> entries allowed between the <fanart></fanart> tags
|-
|<mpaa></mpaa> || No || No || Country specific mpaa rating system. Check with skin author which prefix is required to diplay your country certification flags
|-
|<playcount></playcount> || No || No || Number of times movie 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''
|-
|<id></id> || No || No || The default ID. <br>
Do not use. This is a Kodi generated tag. See next item.
|-
|<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>
::''<uniqueid type="imdb"''<br>
::''<uniqueid type="tvdb"''<br>
::''<uniqueid type="tmdb"''<br>
::For non-scraped items, use simple values like ''"home", "sport", "doco"'' 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>
::Only one uniqueID can be set as ''default="true"'', additional uniqueID's must be set as ''default="false"'' or ommit the default attribute<br>
Example of complete entry...
::''<uniqueid type="tmdb" default="true">''<br>
::''<uniqueid type="imdb" default="false"> or <uniqueid type="imdb">''<br>
|-
|<genre></genre> || No || Yes || Movie genre.
|-
|<tag></tag> || No || Yes || Library Tags. See...'''[[Video library tags]]'''
|-
|
<set>
    <name></name>
    <overview></overview>
</set>
|| No || No || Movie set tags <br />
The <overview> tag allows a short summary of the movie set. It can be displayed by some skins.
<br />See... '''[[Movie sets]]'''
|-
|<country></country> || No || Yes || Country of origin
|-
|<credits></credits> || No || Yes || Field for writers.
|-
|<director></director> || No || Yes || Movie Director
|-
|<premiered></premiered> || No || No || Release date of movie. Format as ''yyyy-mm-dd''
|-
|<year></year> || No || No || Release Year.<br>
{{note|Kodi v17: Tag deprecated, use <premiered> tag instead.}}
{{note|Kodi v20: Use <premiered> tag only.}}
|-
|<status></status> || No || No || Not used
|-
|<nowiki><code></code></nowiki> || No || No || Not used
|-
|<aired></aired> || No || No || Not used
|-
|<studio></studio> || No || Yes || Production studio
|-
|<trailer></trailer> || No || No || Local or online path to movie trailer<br> Do not add local path to trailer. {{kodi}} will automatically scan for local trailers.<br> See... '''[[Trailers]]'''
|-
|
<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<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>
|-
|
<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
|-
|<showlink></showlink> || No || No || Connect movie to TV Show. Use the TV Show <title></title> name.
|-
|
<resume>
  <position></position>
  <total></total>
</resume>
|| No || No || Movie resume point in Seconds<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]]'''
|}


<source lang="XML">
<movie>
<title>Hellboy - Uncut Extended</title>
<set>Hellboy Collection</set>
<sorttitle>Hellboy 1</sorttitle>
</movie>
http://www.themoviedb.org/movie/1487
</source>
* Get the URL at the end by searching the movie on your favorite movie DB site (but you need a [[scraper]] for XBMC of this site) and copy the link from the address bar of the browser.
* Doing it this way has the advantage, to get all other information like cast, poster, fanart, rating, etc. automatically from the movie DB site, while being able to specify the exact title.<br />''This is especially helpful for example for the themoviedb.org, which does not recognise "Uncut", "Extended Version", etc. in the movie title.''
* '''Only single movie sets are supported'''


==== Editing the .NFO file ====
The two tags we’re interested in are shown on the [[NFO files/movies]] page, but not really explained. They are:
* '''&lt;sorttitle>''': This tag is used to give a secondary ’sort title’ that will be used to order the movies when sorting the movies by name. The easiest way to handle this is to just use “Die Hard 1″, "Die Hard 2″, etc.
Since XBMC also remembers views for different folders, you could also just sort this folder by movie year, rather than name, and achieve the same result.
* <'''&lt;set>''': This tag is used to give a name to the set, or series, so that it can be listed in your Movies view.


For the Die Hard example we would add the following tags to each .NFO file in the movie series.
= References =
<source lang="XML">
<references />
<sorttitle>Die Hard 1</sorttitle>
<set>Die Hard Collection</set>
</source>
''Note that the sorttitle tag is an option tag that is not specific to sets. You only need it if you want your movies to sort by a different name other than their actual title. It is safe to leave it out if you would rather just use the date sort.''


=== Movie tags ===
To add a movie to one or multiple tags an  [[NFO files|NFO file]] can be created and for every tag an XML tag can be added like this
<source lang="XML">
<movie>
    ...
    <tag>Name of the tag</tag>
    ...
</movie>
</source>
If there's no tag with the specified name it will be automatically created and the tag will be attached to the movie. A movie can be added to multiple tags by adding it multiple times.


{{tip|See '''[[Video library tags]]'''}}


[[Category:Scraper]]
 
[[Category:Video Library]]
 
[[Category:XBMC Manual]]
{{top}}
{{frodo updated}}
{{updated|19}}
 
[[Category:Karellen]]
[[Category:Video library]]

Revision as of 10:33, 26 December 2022

NFO Contents

NFO Main Page


See also:


Return to:

Home icon grey.png   ▶ NFO files ▶ Movies


Introduction

NFO files to be scraped into the movie library are relatively simple and require only a single nfo file per title.


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.

There are two naming schemes for movie nfo files. Both are explained and Kodi recommends using the <VideoFileName>.nfo format.

<VideoFileName>.nfo
  • NFO Files are named the same as the video file except with the .nfo extension.
  • We recommend using this filename format to name nfo files.
movie.nfo
Kodi may also scan nfo files named movie.nfo. To use this name, the setting Movies are in separate folders that match the movie title must be Enabled in the Set Content Screen
  • If the above setting is not enabled, Kodi will ignore the movie.nfo. If the <VideoFileName>.nfo file is available, Kodi will scan this one instead, otherwise an online scrape will be performed if a valid scraper is set for the Source.
  • If you use movie.nfo and later Export your library to Separate Files, Kodi will still create the nfo file in the <VideoFileName>.nfo format and two nfo files will exist. If a Refresh or rescan is run in future, and the above setting is still enabled, the <VideoFileName>.nfo file will be ignored in favour of movie.nfo, which means any changes you may have made to the library entry (play counts, watched status etc) will not be re-scanned back into the library.
  • We recommend using the <VideoFileName>.nfo format for nfo files to avoid the above traps.

The below image details naming and location for Single File, DVD and Bluray movies:


nfo Tags

The following table lists available XML tags. [1]

The "Required" column indicates whether a tag can be optionally added or ommitted when creating the nfo to suit your purpose. The less tags used, the less information added to the library.

NFO (xml) Tag Required Multiple Notes
<movie></movie> 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 movie
<originaltitle></originaltitle> No No Displays the original title of the movie.

For example, if the scraper is set to german language and the scraped movie in german is "Der mit dem Wolf tanzt" the original title will be "Dances with Wolves"

<sorttitle></sorttitle> No No Allows alternate title sort without modifying movie title. Not displayed in any library listing. See: Sort Title
 <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 omit the default attribute

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

<rating name="imdb" max="10">
<rating name="trakt" max="10">
<rating name="themoviedb" 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 Ranking in IMDB Top 250 movies
<outline></outline> Should be short, will be displayed on a single line (scraped from IMDB only)
<plot></plot> Can contain more information on multiple lines, will be wrapped
<tagline></tagline> No No Short movie slogan. "The true story of a real fake" is the tagline for "Catch me if you can"
<runtime></runtime> No No Minutes only. If ommitted, Kodi will add runtime upon scanning
<thumb aspect="" preview=""></thumb> No Yes Path to available Movie Posters. Not needed when using local artwork

Example use of aspect=""

<thumb aspect="banner"
<thumb aspect="clearart"
<thumb aspect="clearlogo"
<thumb aspect="discart"
<thumb aspect="keyart"
<thumb aspect="landscape"
<thumb aspect="poster"
<fanart>
    <thumb preview=""></thumb>
</fanart>
No Yes^ Path to available movie fanart.
^ Multiple <thumb> entries allowed between the <fanart></fanart> tags
<mpaa></mpaa> No No Country specific mpaa rating system. Check with skin author which prefix is required to diplay your country certification flags
<playcount></playcount> No No Number of times movie 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. 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 Movie genre.
<tag></tag> No Yes Library Tags. See...Video library tags
<set>
   <name></name>
   <overview></overview>
</set>
No No Movie set tags

The <overview> tag allows a short summary of the movie set. It can be displayed by some skins.
See... Movie sets

<country></country> No Yes Country of origin
<credits></credits> No Yes Field for writers.
<director></director> No Yes Movie Director
<premiered></premiered> No No Release date of movie. Format as yyyy-mm-dd
<year></year> No No Release Year.

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 Not used
<studio></studio> No Yes Production studio
<trailer></trailer> No No Local or online path to movie trailer
Do not add local path to trailer. Kodi will automatically scan for local trailers.
See... Trailers
<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]

<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
<showlink></showlink> No No Connect movie to TV Show. Use the TV Show <title></title> name.
<resume>
  <position></position>
  <total></total>
</resume>
No No Movie resume point in Seconds
See... Import-Export
<dateadded></dateadded> No No mTime of the playable video file. Can be altered in advancedsettings.xml
See... Advancedsettings.xml#videolibrary


References



Return to top