Difference between revisions of "User:Karellen/scratchpad01"

From Official Kodi Wiki
Jump to: navigation, search
(Music)
Line 190: Line 190:
  
 
== Music ==
 
== Music ==
Music requires the following nfo files
+
Music will fetch additional album and album artist information from nfo files.
#One nfo file for the Artist. See the first table below
 
#One nfo file for '''each''' Album. See the second table below
 
  
The exception to the above requirement are compilation/various artist albums. These require only a single Album nfo file.
+
For additional '''album''' information each album needs to be in its own unique folder, and have a separate album.nfo file located there. See the first table below.
 +
 
 +
For additional '''album artist''' information each artist needs a separate artist.nfo file located in what Kodi determines as the unique common folder for that artist. Kodi does not fetch additional artist data for artists that only feature on songs, either on compilation albums or as guest artists on songs in albums by others, and you do not have any albums by them in your collection.
 +
 
 +
{{note|There are weaknesses in the way that Kodi determines the location of the artist folder. It looks for the folder that is common to all the songs with that album artist, the name of that folder is irrelevent. If you have multiple albums by an artist all under an artist folder then this works perfectly.
 +
However the algorithm does not work for collaboration albums, those that have more than one album artist e.g. "Riding with the King" by Eric Clapton and BB King, or classical music with composer, orchestra and conductor given as the album artist. Also if you have not kept all songs by an artist under a unique folder, then the artist directory will probably be mis-identified. The result is that Kodi can find the wrong artist.NFO file, and give the artist some other artist's information, or fail to fine the artist.nfo you created}}
  
 
<div style="{{linear-gradient|top|#a1f5e4, #f5f5a1}}">
 
<div style="{{linear-gradient|top|#a1f5e4, #f5f5a1}}">
Line 224: Line 227:
 
|}
 
|}
 
</div>
 
</div>
 
 
  
 
== Music Videos ==
 
== Music Videos ==

Revision as of 12:27, 30 August 2017

Home icon grey.png   ▶ Video library
▶ Music library
▶ Management
 
▶ scratchpad01


NFO files can be used to provide metadata to the library for video and a music files. They are helpful if the metadata fetched from a web site does not match the video or music you have, or if data for that particular file does not exist, such as for home movies. It can also be used to control the search behaviour of scrapers.


1 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 may also be used as a method of exporting the library for various reasons, including backup. See: Import & Export

One of the most considered features of Kodi is the way media is displayed. Gone are the days when choosing a movie to watch or album to listen to involved scrolling through lines of text. 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 a SQLite database.

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

  1. Use the online scraper
  2. Create a nfo file, from which Kodi is able to import the metadata

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

See: Adding_music_to_the_library
See: Adding_video_sources
See: Set_content_and_scan

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


2 Types of nfo

Kodi can use the nfo file in one of two ways depending on the contents of the nfo file. This page primarily deals with the Metadata nfo.


2.1 Metadata nfo

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


2.2 Parsing nfo

A Parsing nfo does not contain any metadata that Kodi can use to scrape into the library. Instead it contains the URL to the movie/tv show/album/artist that you want scraped. 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, and trying to navigate to the 65th entry will be problematic. The parsing nfo offers an easy solution to this problem. To create and use the parsing nfo, follow these steps:

  1. Locate the title at the appropriate scraper site
  2. Ensure you have named your files/folder the same as shown on the scraper site and in accordance with the [Naming_video_files | Kodi naming conventions]
  3. Open a text editor and copy the entire address from the address bar into the text editor. No surrounding tags are required. see example after step 5
  4. Save the file in accordance with the naming convention in section 4 below. Ensure the extension is *.nfo and not *.nfo.txt or *.nfo.doc
  5. Run an Update Library. Kodi will parse the URL and locate the title and scrape the correct metadata.
https://www.themoviedb.org/movie/15849-the-mummy 


3 Creating nfo

The following are the three methods that may be used to create nfo files for Kodi. The simplest method is using a Media Manager.


3.1 Media Managers

This is, by far, the simplest method for creating nfo files for your media. 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, unlike Kodi that imports the metadata directly into the library database.
  2. Manual- The Media Manager offers a simple interface that allows you to manually type in the data. This method does not require you to have knowledge of XML tags
  3. Combination- A combination of both methods can be used. If you are not satisfied with the scraped metadata, then simply modify it.

Once the program has been setup and pointed at your media, very little input is required by the user. Select a movie, tv show, album or artist and select scrape. Depending upon your settings, the media manager will scrape the media and create the nfo which is placed in the correct location with the media file. It can also download all artwork for the media. There are a few media managers available. The following managers can be found in the Kodi forum:

Further information, screenshots and guides are available at the websites of the Media Managers.


3.2 Kodi Created nfo

This option requires that your library has already been scraped with metadata. Using the built in export function of Kodi, you can export the library metadata into individual nfo files 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


3.3 Manual Creation

The more difficult of the three methods. It requires basic knowledge of XML Tags. 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:

Requirements of the nfo file are as follows:

  1. Each Tag must have an opening tag and a closing tag. eg <title>my movie title</title>. <title> = opening tag, my movie title = metadata, </title> = closing tag
  2. The file must be in Unicode Transformation Format-8 (UTF-8). The file must be saved in this format. The first line of the file must contain the following <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  3. The second line may contain a note detailing the creation time and date. It may also include the name of the media manager, if one was used to create it. This is optional. '
  4. The next line sets the nfo category - <movie>, <tvshow>, <episodedetails>, <artist>, <album> or <musicvideo>
  5. Between the opening and closing category tags are the tags for the media metadata.
  6. Available tags are listed in Section 6

Once created, the file is saved with the nfo extension and placed in the folder as directed in Section 4.

See example nfo files in Section 6


4 nfo Placement

Correct placement of the nfo file is essential. Failing to save the file in the correct location, as detailed below, will force Kodi to scrape the information from online sources or, if you have Local Info Only set as your scraper, then no entry will be made into the library.

The order of importing metadata is as follows:

  1. nfo file. If no nfo file exists then
  2. online scraper sites

When Kodi locates the nfo file it will load the *.nfo file and attempt to either,

  1. If the nfo file contains XML data (tags), Kodi will import the meta-data directly into the library from the .nfo file or
  2. Will parse the nfo file for a direct URL to the scraper info page.


4.1 Movies

Movies require one nfo file as follows:

Naming & Saving conventions for your Movie *.nfo files:

Saved movies as File Name Save Location
BluRay Structure: index.nfo f:\MyMovies\Big Buck Bunny (2008)\BDMV\index.nfo
DVD Structure: VIDEO_TS.nfo f:\MyMovies\Big Buck Bunny (2008)\VIDEO_TS\VIDEO_TS.nfo
Single movie in directory: <MovieFileName>.nfo f:\MyMovies\Big Buck Bunny (2008)\<MovieFileName>.nfo
All movies in single directory: <MovieFileName>.nfo f:\MyMovies\Big Buck Bunny (2008)\<MovieFileName>.nfo


4.2 TV Shows

TV Shows require the following nfo files

  1. One nfo file for the TV Show. See the first table below
  2. One nfo file for each Episode. See the second table below

For one TV Show with 10 episodes, you will require 11 nfo files.

Naming & Saving conventions for your TV Show *.nfo files:

Saved TV Show as File Name Save Location
All formats tvshow.nfo f:\MyTVShows\iZombie\tvshow.nfo


Naming & Saving conventions for your TV Episode *.nfo files:

Saved Episodes as File Name Save Location
BluRay Structure: index.nfo f:\MyTVShows\iZombie\iZombie S01E01\BDMV\index.nfo
DVD Structure: VIDEO_TS.nfo f:\MyTVShows\iZombie\iZombie S01E01\VIDEO_TS\VIDEO_TS.nfo
Single Episode file in directory: <EpisodeFileName>.nfo f:\MyTVShows\iZombie\iZombie S01E01\<EpisodeFileName>.nfo
All episodes in TV Show directory: <MovieFileName>.nfo f:\MyTVShows\iZombie\<EpisodeFileName>.nfo


4.3 Music

Music will fetch additional album and album artist information from nfo files.

For additional album information each album needs to be in its own unique folder, and have a separate album.nfo file located there. See the first table below.

For additional album artist information each artist needs a separate artist.nfo file located in what Kodi determines as the unique common folder for that artist. Kodi does not fetch additional artist data for artists that only feature on songs, either on compilation albums or as guest artists on songs in albums by others, and you do not have any albums by them in your collection.

Note: There are weaknesses in the way that Kodi determines the location of the artist folder. It looks for the folder that is common to all the songs with that album artist, the name of that folder is irrelevent. If you have multiple albums by an artist all under an artist folder then this works perfectly. However the algorithm does not work for collaboration albums, those that have more than one album artist e.g. "Riding with the King" by Eric Clapton and BB King, or classical music with composer, orchestra and conductor given as the album artist. Also if you have not kept all songs by an artist under a unique folder, then the artist directory will probably be mis-identified. The result is that Kodi can find the wrong artist.NFO file, and give the artist some other artist's information, or fail to fine the artist.nfo you created

Naming & Saving conventions for your Music Artist *.nfo files:

Saved Artist as File Name Save Location
Artist\Album\Songs artist.nfo f:\MyMusic\Stevie Nicks\artist.nfo


Naming & Saving conventions for your Music Album *.nfo files:

Saved Album as File Name Save Location
Artist\Album\Songs album.nfo f:\MyMusic\Stevie Nicks\Crystal Visions\album.nfo

4.4 Music Videos

Music Videos require one nfo for each music video in the folder. These nfo files need to be named exactly as the Music Video file is named, but with the nfo extension.

Naming & Saving conventions for your Music Videos *.nfo files:

Saved Music Videos as File Name Save Location
All formats <MusicVideoFileName>.nfo f:\MyMusicVideos\<MusicVideoFileName>.nfo


5 Scraping nfo files

There is no special procedure to scrape nfo files. Performing the usual Library Update will scrape the nfo files into the library. Be aware that nfo files are not easily interchangeable between Movies, TV Shows, 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, the NFO file is 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.

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


6 Sample nfo Files

Provided below are sample nfo files to assist with the manual creation process


6.1 Movie nfo

Sample Movie nfo file


6.2 TV Show nfo

Sample TV Show nfo


6.3 TV Show Episode nfo

Sample TV Episode nfo


6.4 Music Artist nfo

Sample Music Artist nfo


6.5 Music Album nfo

Sample Music Album nfo


6.6 Music Video nfo

Sample Music Video nfo


7 nfo Tags

A list of all available tags that Kodi recognises follows in this section. As mentioned previously, there are many common tags, but there are also specific tags for each part of the library. Ensure you use the correct tags.


7.1 Movie Tags

7.2 TV Show Tags

7.3 TV Show Episode Tags

7.4 Music Tags

7.5 Music Video Tags

Return to top