NFO files/Movies: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Page cleared)
Line 1: Line 1:
{{mininav|[[NFO files]]}}
Page contents deleted. New contents to be pasted in next edit.<br />
=== Video .nfo Files containing XML data ===
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.
[[User:Karellen|Karellen]] ([[User talk:Karellen|talk]]) 21:57, 12 September 2017 (EDT)
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''').
 
 
<section begin="stacking note" />{{note|In the case of multi-part (stacked) video '''[[file stacking]]''', name the file either '''moviename.nfo''' or '''moviename-CD1.nfo''' where the first filename is '''moviename-CD1.avi'''.}}<section end="stacking note" />
 
{{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.}}
 
{{note|If your movie is ripped as Bluray's and stored in a '''\BDMV\''' folder, you will have to name the file '''index.nfo''' and place it in the same directory with the '''index.bdmv''' file. If you intend to import from the bluray index.nfo files, you must have the following [[Naming_video_files/TV_shows#Examples|advancedsettings.xml]] entries.}}
 
 
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.
 
<syntaxhighlight lang="xml" enclose="div">
    <movie>
        <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><!-- Should be short, will be displayed on a single line. -->
        <plot>A look at the role of the Buckeye State in the 2004 Presidential Election.</plot> <!-- Can contain more information on multiple lines, will be wrapped. -->
        <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> <!-- Library exports uses this field for writers.-->
        <fileinfo>
            <streamdetails> <!-- While it is possible to manually set the information contained within the "streamdetails" tag,there is little point in doing so, as the software will always overwrite this data when it plays back the video file. In other words, no matter how many times you try to manually set it, it will be undone the moment the video is played.-->
            </streamdetails>
        </fileinfo>
        <studio>Dummy Pictures</studio>
        <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>
</syntaxhighlight>
 
=== 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), Kodi 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.
 
* <code>movie.nfo</code> if you use the "Use Foldername for Lookups" option, movie.nfo takes priority over any other .nfo files.
 
If you use the "Movies are in separate folders that match the movie title" [[Set Contents (Video Library)#Options After Selecting Scraper|scraper setting]] Kodi 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.
 
=== Video .nfo files containing a mix of XML and URL ===
You can also create .nfo files that contain both XML data and an URL.
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.
 
Example:
<syntaxhighlight lang="xml" enclose="div">
    <movie>
        <title>Sin City (Recut, Extended, Unrated)</title>
        <runtime>147 min.</runtime>
    </movie>
    http://www.imdb.com/title/tt0401792/
</syntaxhighlight>
 
 
<syntaxhighlight lang="xml" enclose="div">
    <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/
</syntaxhighlight>
 
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:
<syntaxhighlight lang="xml" enclose="div">
<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/
</syntaxhighlight>
 
Currently supported tags for the clear attribute are genre, director, studio, actor, credits and artist for Music Videos.
 
 
=== Movie sets ===
 
 
<syntaxhighlight lang="XML" enclose="div">
<movie>
<title>Hellboy - Uncut Extended</title>
<set>Hellboy Collection</set>
<sorttitle>Hellboy 1</sorttitle>
</movie>
http://www.themoviedb.org/movie/1487
</syntaxhighlight>
* Get the URL at the end by searching the movie on your favorite movie DB site (but you need a [[scraper]] for Kodi 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 Kodi 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.
<syntaxhighlight lang="XML" enclose="div">
<sorttitle>Die Hard 1</sorttitle>
<set>Die Hard Collection</set>
</syntaxhighlight>
''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.''
 
To make it possible to specify an overview/plot in movies sets the <set> tag got extended in Kodi 16:
<syntaxhighlight lang="XML" enclose="div">
<sorttitle>Die Hard 1</sorttitle>
<set>
  <name>Die Hard Collection</name>
  <overview>This is my awesome movie set.</overview>
</set>
</syntaxhighlight>
The <overview> tag is optional, and the original format is still supported to not break existing scrapers or local NFO files.
 
=== 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
<syntaxhighlight lang="XML" enclose="div">
<movie>
    ...
    <tag>Name of the tag</tag>
    ...
</movie>
</syntaxhighlight>
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]]'''}}
{{frodo updated}}
 
[[Category:Scraper]]
[[Category:Video library]]
[[Category:Manual]]

Revision as of 01:57, 13 September 2017

Page contents deleted. New contents to be pasted in next edit.

Karellen (talk) 21:57, 12 September 2017 (EDT)