NFO files: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
(33 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{mininav|[[Video library]] {{l2|[[Music library]]}}|[[Video management|Management]] <br />&nbsp; }}
{{NFO_content}}
{{see also|Set content and scan}}
<section begin="intro" />NFO files can be used to provide data for a video file in XBMC or influence the search behaviour of scrapers. In particular they are helpful if the information fetched from a web site does not match the video file, or data for that particular file does not exist.<section end="intro" />


By default at the time of scanning, if the media folder contains a correctly named *.nfo file, then XBMC will load the *.nfo file and attempt to either, in the case of it containing XML data get the meta-data directly from the .nfo file or will parse it for a direct URL to the scraper info page. This allows XBMC to skip its normal lookup and/or search procedures; this is useful if a file's information is not available on any of the scraper sites or if the file-matching criteria fail for the particular file.
{{mininav|[[Video library]] {{l2| [[Music library]] }} }}




XBMC also contains a Local-NFO-only mode for when you add videos to the library, but this mode is only required if you want to prevent online-lookups for videos that lack NFO files. See '''[[Set content and scan#Local NFO only options]]''' for more information on this Local-NFO-only mode.
<section begin="intro" />NFO files are used to populate the music and video library using locally stored information. They are helpful if data for your particular title does not exist, such as for home movies and sporting events. They can also be used to control the search behaviour of scrapers when problematic and ambiguous titles prevent your preferred title from being fetched.<section end="intro" />


== Getting an .NFO file ==
Various options:


=== .NFO exists ===
If you have a movie with an .NFO file already, continue with the next section.


=== Create an .NFO file (recommended) ===
= What is nfo =
* This is recommended to have .NFO files only where needed.
'''nfo''' is a contraction of Info or Information. It is a Filename Extension - ''mymovie.nfo'' and the contents of the file are written in [http://en.wikipedia.org/wiki/XML XML]. The file itself does nothing except hold information. It is basically a text document with special tags inserted around the information. These tags are recognised by Kodi which enables data importing.  
* Create a text file with a text editor (e.g. notepad) with '''exactly the same name as the movie file''' (if all movies in one dir; in case each movie has its own folder, place the '''.nfo''' file there and the name does not matter). The extension has to be '''.nfo''' (e.g. ''Hellboy (2004) English.DTS.1080p.x264.nfo'').


=== Export .NFO files for all movies ===
Kodi uses nfo files as one way of importing metadata into the library. It is also used as a method of exporting the library for various reasons, including backup.  '''''See: [[Import-export_library| Import & Export]]'''''
* First you need to have all the movies scanned into your [[Video Library]].
* Once this is done you’ll need to export your library as a series of separate .NFO files. This can be done by going to [[Videos Settings|Settings > Video]] > Library and choosing Export Library. Make sure you choose the separate files option, and a bunch of .NFO files (one for every movie) will be dumped to the directories the movies are stored in.
{{tip|See '''[[Import-export library]]'''}}
* Once you have the .NFO you'll need to open it for all the movies in the series and add some info to them.


== NFO Examples ==
'''Note''': During the scanning process {{kodi}} always searches for, and uses NFO files first. When NFO files are not found then the scrapers are used to download information from online sources. Be aware of this if you are experiencing unexpected results.


Below are the different sections explained on how to create specific nfo files for them.
Kodi uses [[Artwork]], and Extended Information to display your media. This information includes Actors, Directors, Plots, Taglines, Ratings, Run Times  and more. All this data, known as metadata, is stored in the Kodi Library. The Library is stored in an [http://www.sqlite.org/ SQLite database].


There are two primary methods to load metadata into your library:
#Create a nfo file, from which Kodi is able to import the metadata (Primary- nfo files are always searched for)
#Use the online scraper (Secondary- if no nfo files exist, scrapers are used)


* '''[[NFO files/movies|Movies]]'''
:* [[NFO files/movies#Movie sets|Movie sets]]
:* [[NFO files/movies#Movie tags|Movie tags]]


* '''[[NFO files/tvshows|TV Shows]]'''
For information on how to use the online scraper within Kodi:<br />
:'''''See: [[Adding_music_to_the_library|Adding Music to Library]]'''''
:'''''See: [[Adding_video_sources|Adding Video Sources]]'''''<br />


:* '''[[NFO files/tvepisodes|TV Episodes]]'''
'''The remainder of this wiki topic will provide the required information to create and use nfo files.'''


* '''[[NFO files/musicvideos|Music videos]]'''
= Types of nfo =
Kodi can use the nfo file in one of three ways depending on the contents of the nfo file, as explained in the following sub-sections.


* '''[[NFO files/music|Music]]'''


== Importing library information from "My Movies" media management software ==
== Metadata nfo ==
[http://www.mymovies.dk/ My Movies (www.mymovies.dk)] is an online database for profiling DVD-Video movies. [http://www.mymovies.dk/ My Movies] saves an XML file and a poster cover image which with this patch will get scanned by XBMC in the same way as XBMC's own XML formatted NFO files are scanned/scraped.
This is the most common use of the nfo file. The Metadata nfo contains the metadata for the movie/tv show/music video/album/artist within the file. Kodi will scan this file and import its contents into the library.


XBMC has the ability to get the import movie library information from "[http://www.mymovies.dk/ My Movies]" via the mymovies.xml files that it generates, these mymovies.xml are checked after the movie.nfo file.
For more details on creating and using the common Metadata NFO file, see the following sections...


{{gotham updated}}
=== Movie nfo ===
:'''''See: [[NFO_files/Movies|Movie nfo]]'''''


[[Category:Scraper]]
=== TV Show nfo ===
:'''''See: [[NFO_files/TV_shows|TV Show nfo]]'''''
 
=== Music nfo ===
:'''''See: [[NFO_files/Music|Music nfo]]'''''
 
=== Music Video nfo ===
:'''''See: [[NFO_files/Music_videos|Music Videos nfo]]'''''
 
 
 
== Parsing nfo ==
A Parsing nfo does not contain any metadata that Kodi can use to import into the library. Instead it contains the URL to the the information at the site of the information provider.
 
As an example, searching for ''The Mummy'' on [https://www.themoviedb.org/ TMDB] returns 65 titles. If you are attempting to add one of the more obscure versions to your library, chances are that Kodi will scrape the incorrect title. The Parsing nfo offers an easy solution to this problem by pointing {{kodi}} to the correct title.
 
{{red|'''Note''': Most online Movie and TV Show databases include an IMDB field that contains the IMDB ID. This allows the use of the IMDB address in the Parsing NFO for Movies and TV Shows. This does NOT mean the title will be scraped from IMDB. The scraper simply recognises the ''ttxxxxx'' ID and uses it to search for the title at the online database of the currently active scraper. If your preference is for IMDB data, then you will need to install the appropriate scraper.}}
 
 
To create and use the parsing nfo, follow these steps:
#Locate the title at the appropriate site of the information provider, eg ''[https://www.themoviedb.org/ TheMovieDB]''
#Ensure you have correctly named your media files/folder. See: '''''[[Naming_video_files|Kodi naming conventions]]'''''
#Open a text file and copy the entire URL address of the movie from the address bar and paste it into the text file. No tags or code is required. ''See example below''
#Save the file and ensure it is correctly named. See the nfo sub-pages listed above for correct naming. '''Ensure the extension is *.nfo''' and not ''*.nfo.txt'' or ''*.nfo.doc''
#Run an ''Update Library'' or a ''Scan item to library''. Kodi will parse the URL and locate the title and scrape the correct metadata.
 
 
Example of Parsing Movie NFO :
 
<syntaxhighlight lang="xml">
https://www.themoviedb.org/movie/15849-the-mummy
</syntaxhighlight>
 
'''Notes:'''
*Parsing NFO files cannot be used for individual episodes or seasons, they can only be used at the TV Show level. Once the TV Show is found the <episodeguide> URL will then find the episodes.
*If there is more than one URL in the file only the first URL will be used.
 
 
 
== Combination nfo ==
It is possible to combine the above two types of nfo files into one nfo file. An example use would be to override data from the scraper site such as the title, runtime, movieset etc. It will scan the metadata located between the ''<movie></movie>'' XML tags and the omitted data will be scraped at the provided URL. An example:
 
''Example: Contents of Combination NFO file:''
<syntaxhighlight lang="xml">
<movie>
    <title>Star Wars (99 second cut)</title>
    <runtime>2</runtime>
    <set>Star Wars Saga</set>
    <sorttitle>Star Wars 01</sorttitle>
    <genre clear="true">SciFi</genre>
    <genre>Romance</genre>
    <genre>Action</genre>
</movie>
http://www.imdb.com/title/tt0076759/
</syntaxhighlight>
 
 
Various tags allow multiple entries, eg multiple ''<genre>'' and ''<director>'' tags. If you use these tags in a Combination nfo, these tags will have their data '''added''' to the scraped entry in the database and, in some cases, may result in duplicate entries. To avoid this, use the ''clear'' attribute to clear out the downloaded metadata for those particular tags. See the <genre> tag in the above example.
 
A listing of which tags allow multiple entries can be found in the appropriate sub-pages. Does not apply to muic.
 
'''Notes:'''
*Combination NFO files cannot be used for individual episodes or seasons, they can only be used at the TV Show level.
*If there is more than one URL in the file only the first URL will be used.
 
 
 
= Creating nfo =
The following are the three methods that may be used to create nfo files for Kodi.
 
 
 
== Kodi Created nfo ==
This option requires that your library has already been scraped with metadata. Using the built in [[Import-export_library| Import & Export]] function of Kodi, you can export the library metadata into individual nfo files  which are correctly created and saved. This is useful if you have an existing library and would like to backup the library or to import the library into another Kodi installation.
:'''''See: [[Import-export_library| Import & Export]]'''''
 
 
 
== Manual Creation ==
NFO files are simple text files containing XML tags. Creating your own nfo files is simple, and templates and examples are provided in the sub-pages of this wiki topic. They can be created using a simple text editor such as Notepad in Windows, or the equivelant in other operating systems. There are dedicated code editors that can also be used. They will not provide the required Kodi tags, but they will avoid glitches when saving the nfo file, which is commonly experienced with text editors.
 
Two common code editors that can be used:
*[https://notepad-plus-plus.org/ Notepad++]
*[https://code.visualstudio.com/ Visual Studio Code]
 
 
'''Structure of the nfo file''':
 
1. The file must be saved as Unicode Transformation Format-8 (UTF-8). The first line of the file will contain the following...
:<syntaxhighlight lang=xml enclose="div"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></syntaxhighlight>
 
 
2. The second line and the last line of the file contains the nfo category opening and closing tags. Avaliable category tags are...
:<syntaxhighlight lang=xml enclose="div"><movie></movie>, <tvshow></tvshow>, <episodedetails></episodedetails>, <artist></artist>, <album></album> and <musicvideo></musicvideo></syntaxhighlight>
 
 
3. Between the opening and closing category tags are the tags for the media metadata. Each tag must have an opening tag and a closing tag. eg...
:<syntaxhighlight lang=xml enclose="div"><title>Blade Runner 2049</title>
 
<title> = opening tag
Blade Runner 2049 = metadata
</title> = closing tag
</syntaxhighlight>
 
4. Available tags are listed in the relevant sub-pages along with a sample and template nfo file.
 
Once created, the file must be saved with the ''.nfo'' extension in accordance with the details in the relevant sub-pages.
 
 
 
== Media Managers ==
The Media Manager can create nfo files in one of three ways:
#Scraping- This is the same process as performed by the Kodi scraper. The Media Manager will fetch metadata from the online scraper site and will create the nfo file which then needs to be scanned into the library, unlike Kodi that imports the metadata directly into the library.
#Manual- The Media Manager offers an interface that allows you to manually type in the data.
#Combination- A combination of both methods can be used. If you are not satisfied with the scraped metadata, then you are able to modify it.
 
 
 
<section begin="MediaManagers" />The following is a list of Media Managers on the forum. Questions regarding their use should be directed to the media manager developers.
*[https://forum.kodi.tv/forumdisplay.php?fid=195  Ember Media Manager]
*[https://forum.kodi.tv/showthread.php?tid=142723  Tiny Media Manager aka TMM]
*[https://forum.kodi.tv/showthread.php?tid=129134  Media Companion 3]
*[https://forum.kodi.tv/showthread.php?tid=136333  MediaElch]
 
Be aware there are many other media managers available that claim to be Kodi compatible but have not been updated in many years, and are clearly not compatible. Use of these incompatible media managers can break your library and require rebuilding using the {{kodi}} scrapers.
 
 
{{red|'''Note''': While Media Managers offer some level of control, there are limitations with their use. {{Kodi}} is in a constant state of development. Changes to allow new types of data or features into the library must be expected. Media Managers are known to be slow in catching up to these changes and, in many instances, these changes are never incorporated. No media manager is 100% Kodi compatible.}}
 
'''{{red|Kodi can create correct and accurate NFO's from the data already in the library which has been populated by a correct scraping process.}}'''
<section end="MediaManagers" />
 
 
= Scanning nfo files =
There is no special procedure to scrape nfo files. Performing the usual '''''[[Updating_or_removing_videos|Library Update]]''''', or selecting '''''[[Updating_or_removing_videos#Refresh_Library|Refresh]]''''' for individual items, will scan the nfo files into the library.
 
Be aware that nfo files are not easily interchangeable between Movies, TV Shows, Music Videos, Artists and Albums. Although they all share common tags, each also has its own specific tags that won't be recognised in other parts of the library.
 
'''After the NFO files are scanned into the library, they are no longer used and only serves as a backup. If you make changes to the NFO file you will need to ''[[Updating_or_removing_videos#Refresh_Library|Refresh]]'' that library entry for the changes to be loaded into Kodi.''' An Update Library will not capture the change as this only looks for '''new''' items.
 
 
 
= Troubleshooting =
If you have followed the guidelines of this wiki topic, and the NFO File still does not scan into the library, then check the following:
 
#Ensure your NFO File is encoded correctly. The NFO File must be encoded as a '''UTF-8''' type file. ANSI, has also been known to work.
#Check the setting '''Movies are in separate folders that match the movie title''' in the scraper settings is correctly set for your folder structure.
#If TV Shows are being mixed, this is most likely caused by using outdated or incorrectly created NFO Files. Ensure at least one of the following tags is in the tvshow.nfo file. If there are no ID's at the scraper site (eg home movies) then any random alpha-numeric entry will suffice.
 
:<syntaxhighlight lang=xml enclose="div">
  <uniqueid type="" default="true"></uniqueid>
  <!-- Where type="" contains the identifier for the ID. eg imdb, tvdb, tmdb, or other as chosen by the user. eg type="home" for home movies -->
</syntaxhighlight>
 
 
 
= References =
<references />
 
 
 
 
 
{{top}}
 
 
{{updated|18}}
[[Category:FAQ]]
[[Category:Index]]
[[Category:Guides]]
[[Category:Manual]]
[[Category:Karellen]]
[[Category:Video library]]
[[Category:Video library]]
[[Category:Music library]]
[[Category:Music library]]
[[Category:XBMC Manual]]
[[Category:First time user]]
[[Category:Quick Start Guide]]

Revision as of 00:04, 21 July 2020

NFO Contents

NFO Main Page


See also:


Return to:

Home icon grey.png   ▶ Video library
▶ Music library
▶ NFO files


NFO files are used to populate the music and video library using locally stored information. They are helpful if data for your particular title does not exist, such as for home movies and sporting events. They can also be used to control the search behaviour of scrapers when problematic and ambiguous titles prevent your preferred title from being fetched.


What is nfo

nfo is a contraction of Info or Information. It is a Filename Extension - mymovie.nfo and the contents of the file are written in XML. The file itself does nothing except hold information. It is basically a text document with special tags inserted around the information. These tags are recognised by Kodi which enables data importing.

Kodi uses nfo files as one way of importing metadata into the library. It is also used as a method of exporting the library for various reasons, including backup. See: Import & Export

Note: During the scanning process Kodi always searches for, and uses NFO files first. When NFO files are not found then the scrapers are used to download information from online sources. Be aware of this if you are experiencing unexpected results.

Kodi uses Artwork, and Extended Information to display your media. This information includes Actors, Directors, Plots, Taglines, Ratings, Run Times and more. All this data, known as metadata, is stored in the Kodi Library. The Library is stored in an SQLite database.

There are two primary methods to load metadata into your library:

  1. Create a nfo file, from which Kodi is able to import the metadata (Primary- nfo files are always searched for)
  2. Use the online scraper (Secondary- if no nfo files exist, scrapers are used)


For information on how to use the online scraper within Kodi:

See: Adding Music to Library
See: Adding Video Sources

The remainder of this wiki topic will provide the required information to create and use nfo files.

Types of nfo

Kodi can use the nfo file in one of three ways depending on the contents of the nfo file, as explained in the following sub-sections.


Metadata nfo

This is the most common use of the nfo file. The Metadata nfo contains the metadata for the movie/tv show/music video/album/artist within the file. Kodi will scan this file and import its contents into the library.

For more details on creating and using the common Metadata NFO file, see the following sections...

Movie nfo

See: Movie nfo

TV Show nfo

See: TV Show nfo

Music nfo

See: Music nfo

Music Video nfo

See: Music Videos nfo


Parsing nfo

A Parsing nfo does not contain any metadata that Kodi can use to import into the library. Instead it contains the URL to the the information at the site of the information provider.

As an example, searching for The Mummy on TMDB returns 65 titles. If you are attempting to add one of the more obscure versions to your library, chances are that Kodi will scrape the incorrect title. The Parsing nfo offers an easy solution to this problem by pointing Kodi to the correct title.

Note: Most online Movie and TV Show databases include an IMDB field that contains the IMDB ID. This allows the use of the IMDB address in the Parsing NFO for Movies and TV Shows. This does NOT mean the title will be scraped from IMDB. The scraper simply recognises the ttxxxxx ID and uses it to search for the title at the online database of the currently active scraper. If your preference is for IMDB data, then you will need to install the appropriate scraper.


To create and use the parsing nfo, follow these steps:

  1. Locate the title at the appropriate site of the information provider, eg TheMovieDB
  2. Ensure you have correctly named your media files/folder. See: Kodi naming conventions
  3. Open a text file and copy the entire URL address of the movie from the address bar and paste it into the text file. No tags or code is required. See example below
  4. Save the file and ensure it is correctly named. See the nfo sub-pages listed above for correct naming. Ensure the extension is *.nfo and not *.nfo.txt or *.nfo.doc
  5. Run an Update Library or a Scan item to library. Kodi will parse the URL and locate the title and scrape the correct metadata.


Example of Parsing Movie NFO :

https://www.themoviedb.org/movie/15849-the-mummy

Notes:

  • Parsing NFO files cannot be used for individual episodes or seasons, they can only be used at the TV Show level. Once the TV Show is found the <episodeguide> URL will then find the episodes.
  • If there is more than one URL in the file only the first URL will be used.


Combination nfo

It is possible to combine the above two types of nfo files into one nfo file. An example use would be to override data from the scraper site such as the title, runtime, movieset etc. It will scan the metadata located between the <movie></movie> XML tags and the omitted data will be scraped at the provided URL. An example:

Example: Contents of Combination NFO file:

 <movie>
    <title>Star Wars (99 second cut)</title>
    <runtime>2</runtime>
    <set>Star Wars Saga</set>
    <sorttitle>Star Wars 01</sorttitle>
    <genre clear="true">SciFi</genre>
    <genre>Romance</genre>
    <genre>Action</genre>
 </movie>
 http://www.imdb.com/title/tt0076759/


Various tags allow multiple entries, eg multiple <genre> and <director> tags. If you use these tags in a Combination nfo, these tags will have their data added to the scraped entry in the database and, in some cases, may result in duplicate entries. To avoid this, use the clear attribute to clear out the downloaded metadata for those particular tags. See the <genre> tag in the above example.

A listing of which tags allow multiple entries can be found in the appropriate sub-pages. Does not apply to muic.

Notes:

  • Combination NFO files cannot be used for individual episodes or seasons, they can only be used at the TV Show level.
  • If there is more than one URL in the file only the first URL will be used.


Creating nfo

The following are the three methods that may be used to create nfo files for Kodi.


Kodi Created nfo

This option requires that your library has already been scraped with metadata. Using the built in Import & Export function of Kodi, you can export the library metadata into individual nfo files which are correctly created and saved. This is useful if you have an existing library and would like to backup the library or to import the library into another Kodi installation.

See: Import & Export


Manual Creation

NFO files are simple text files containing XML tags. Creating your own nfo files is simple, and templates and examples are provided in the sub-pages of this wiki topic. They can be created using a simple text editor such as Notepad in Windows, or the equivelant in other operating systems. There are dedicated code editors that can also be used. They will not provide the required Kodi tags, but they will avoid glitches when saving the nfo file, which is commonly experienced with text editors.

Two common code editors that can be used:


Structure of the nfo file:

1. The file must be saved as Unicode Transformation Format-8 (UTF-8). The first line of the file will contain the following...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>


2. The second line and the last line of the file contains the nfo category opening and closing tags. Avaliable category tags are...

<movie></movie>, <tvshow></tvshow>, <episodedetails></episodedetails>, <artist></artist>, <album></album> and <musicvideo></musicvideo>


3. Between the opening and closing category tags are the tags for the media metadata. Each tag must have an opening tag and a closing tag. eg...

<title>Blade Runner 2049</title>

<title> = opening tag 
Blade Runner 2049 = metadata 
</title> = closing tag

4. Available tags are listed in the relevant sub-pages along with a sample and template nfo file.

Once created, the file must be saved with the .nfo extension in accordance with the details in the relevant sub-pages.


Media Managers

The Media Manager can create nfo files in one of three ways:

  1. Scraping- This is the same process as performed by the Kodi scraper. The Media Manager will fetch metadata from the online scraper site and will create the nfo file which then needs to be scanned into the library, unlike Kodi that imports the metadata directly into the library.
  2. Manual- The Media Manager offers an interface that allows you to manually type in the data.
  3. Combination- A combination of both methods can be used. If you are not satisfied with the scraped metadata, then you are able to modify it.


The following is a list of Media Managers on the forum. Questions regarding their use should be directed to the media manager developers.

Be aware there are many other media managers available that claim to be Kodi compatible but have not been updated in many years, and are clearly not compatible. Use of these incompatible media managers can break your library and require rebuilding using the Kodi scrapers.


Note: While Media Managers offer some level of control, there are limitations with their use. Kodi is in a constant state of development. Changes to allow new types of data or features into the library must be expected. Media Managers are known to be slow in catching up to these changes and, in many instances, these changes are never incorporated. No media manager is 100% Kodi compatible.

Kodi can create correct and accurate NFO's from the data already in the library which has been populated by a correct scraping process.


Scanning nfo files

There is no special procedure to scrape nfo files. Performing the usual Library Update, or selecting Refresh for individual items, will scan the nfo files into the library.

Be aware that nfo files are not easily interchangeable between Movies, TV Shows, Music Videos, Artists and Albums. Although they all share common tags, each also has its own specific tags that won't be recognised in other parts of the library.

After the NFO files are scanned into the library, they are no longer used and only serves as a backup. If you make changes to the NFO file you will need to Refresh that library entry for the changes to be loaded into Kodi. An Update Library will not capture the change as this only looks for new items.


Troubleshooting

If you have followed the guidelines of this wiki topic, and the NFO File still does not scan into the library, then check the following:

  1. Ensure your NFO File is encoded correctly. The NFO File must be encoded as a UTF-8 type file. ANSI, has also been known to work.
  2. Check the setting Movies are in separate folders that match the movie title in the scraper settings is correctly set for your folder structure.
  3. If TV Shows are being mixed, this is most likely caused by using outdated or incorrectly created NFO Files. Ensure at least one of the following tags is in the tvshow.nfo file. If there are no ID's at the scraper site (eg home movies) then any random alpha-numeric entry will suffice.
   <uniqueid type="" default="true"></uniqueid>
 
   <!-- Where type="" contains the identifier for the ID. eg imdb, tvdb, tmdb, or other as chosen by the user. eg type="home" for home movies -->


References




Return to top