Import-export library: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Sho
No edit summary
>Sho
Line 16: Line 16:
By default at the time of scanning, if the movie folder contains a *.nfo file with the same name as the stacked video file name then XBMC will load the *.nfo file and attempt to either get the metadata directly from the file (in the case of it containing XML data) or will parse it for a direct URL to the movies scraper info page.  This allows XBMC to skip it's normal lookup and/or search procedures, useful if a movie's information is not available on any of the scraper sites, or if the filematching criteria fails for the particular movie.
By default at the time of scanning, if the movie folder contains a *.nfo file with the same name as the stacked video file name then XBMC will load the *.nfo file and attempt to either get the metadata directly from the file (in the case of it containing XML data) or will parse it for a direct URL to the movies scraper info page.  This allows XBMC to skip it's normal lookup and/or search procedures, useful if a movie's information is not available on any of the scraper sites, or if the filematching criteria fails for the particular movie.


There are two cases:
===The different nfo options:===
 
====Nfo as an XML file====
1.  The *.nfo file is an XML file containing the data directly.
1.  The *.nfo file is an XML file containing the data directly.


Line 71: Line 71:
</xml>
</xml>


====Nfo containing an URL====
2.  The *.nfo file contains a URL of the information page to scrape.
2.  The *.nfo file contains a URL of the information page to scrape.



Revision as of 15:25, 22 August 2007

The Import / Export options for the Video Library can be found in Videos Settings

Export Video Library
Exports the Video Library database to a XML file.
Import Video Library
Imports a XML file into the Video Library database. If the entry does not exist it is appended.
If it exists:
  1. It removes all current info for that entry from the database.
  2. Inserts the info for that entry from the XML file.

If you wish to import a movie, TV Show or episode into the library, use the corresponding format in the exported xml file and enclose it with the <videodb></videodb> tags.

  • Note an example for movies can be seen below, as an nfo file.

Nfo Files

Nfo files can be used to provide data for a movie or influence the search behavior of scrapers. In particular they are helpful if a search for the movie does not return the correct one or data for that particular movie does not exist.

By default at the time of scanning, if the movie folder contains a *.nfo file with the same name as the stacked video file name then XBMC will load the *.nfo file and attempt to either get the metadata directly from the file (in the case of it containing XML data) or will parse it for a direct URL to the movies scraper info page. This allows XBMC to skip it's normal lookup and/or search procedures, useful if a movie's information is not available on any of the scraper sites, or if the filematching criteria fails for the particular movie.

The different nfo options:

Nfo as an XML file

1. The *.nfo file is an XML file containing the data directly.

Example:' <xml>

   <movie>
       <title>Who knows</title>
       <rating>6.100000</rating>
       <year>2006</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 min</runtime>
       <thumb>http://ia.ec.imdb.com/media/imdb/01/I/25/65/31/10f.jpg</thumb>
       <mpaa>Not available</mpaa>
       <watched>false</watched>
       <imdbnumber>tt0432337</imdbnumber>
       <filenameandpath>c:\Dummy_Movie_Files\Movies\...So Goes The Nation.avi</filenameandpath>
       <genre></genre>
       <credits></credits>
       <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>
       <actor>
           <name>Terry McAuliffe</name>
           <role>Himself</role>
       </actor>
       <actor>
           <name>Ken Mehlman</name>
           <role>Himself</role>
       </actor>
   </movie>

</xml>

Nfo containing an URL

2. The *.nfo file contains a URL of the information page to scrape.

Example:

http://www.imdb.com/title/tt0333766

The *.nfo must be named exactly the same as the video file it is representing (ei. moviename.avi and moviename.nfo), allowing multiple video and *.nfo files within the same folder. In the case of multi-part video stacking, name the file "stackedname.nfo".

The scraper tries to match url's to all scrapers of the content type a dir is set to. E.g. if you set the content type to movies all movie scrapers check the nfo file for a matching url. This means that nfo's override the scraper setting. e.g. A directory is set to use the imdb scraper but you have a german movie in it. Simply create a nfo for that movie with the ofdb link in it and you are sorted!