NFO files/Music: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(→‎Technical Details: Correct music files tags not stored in DB)
(Updated for v19)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{|class="infobox" style="width:280px"
{{disambiguation}}
! Steps to create your Music Library
|-
|<small>1. [[Music_tagging|Music File Tagging]]</small>
|-
|<small>2. Scanning Music Into Library</small>
|-
|<small>3. Scraping Additional Music Information</small>
|-
|4. '''[[NFO_files|NFO Files]]'''
:*'''[[NFO files/Music|Music]]'''
|-
|<small>5. [[Music_artwork]]</small>


<small>Report NFO corrections:<br />
[https:// here in the forum]</small>
|}
{{mininav|[[NFO_files]]}}


{{resize|1.2em|'''Music NFO Files''' may refer to one of the following:}}




= Requirements =
== NFO Files ==
{{Red|'''As the Music section of Kodi has many differences to the Video section of Kodi, please read this section to ensure your music and artwork are correctly scraped and displayed.'''}}


* [[NFO_files/Albums|Album NFO Files]]


 
* [[NFO_files/Artists|Artist NFO Files]]
== Understanding the Music Library ==
{{#lst:Music_artwork|understanding}}
 
 
 
== Adding Music to Library ==
{{#lst:Music_artwork|adding}}
 
 
 
== Music nfo Specific Requirements ==
*A number of database fields can be populated initially by music file tags, but then be overwritten by online or nfo scraping. Whether this occurs depends on the setting '''Prefer Online Information''' in ''Settings>Media Settings>Music''. If ''disabled'', these fields will remain with the data scanned from the Music File tags. If ''enabled'' these fields will be overwritten by information obtained from either the online or local nfo file scrape. The affected fields are shown below in the section [[NFO_files/Music#Available_nfo_Tags|Available nfo Tags]]
*In the ''album.nfo'' the top level <artist> tag has been deprecated and is not shown in any sample nfo files. Applies to v12 and prior.
*There is no XML tag for ''votes'' of individual Songs. This can only come from the music file tags. Album ''votes'' can come from either online or local nfo scraping.
*FLAC rating contained within the Music File Tag is scored out of 100. Kodi converts this value to its equivalent value out of 10. Values less than 10 in the FLAC music file tag will return a rating of 0 in Kodi.<br />
 
 
 
= nfo Placement =
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}}
 
<div style="{{linear-gradient|bottom|#f5d3ff, #12b2e7}}">
'''''Naming & Saving conventions for your Music Artist *.nfo files:'''''
{|
|- valign="top"
| width=200px |'''''Saved Artist as'''''
| width=300px |'''''File Name'''''
| width=600px |'''''Save Location'''''
|- valign="top"
| width=200px |Artist\Album\Songs
| width=300px |artist.nfo
| width=600px |f:\MyMusic\Stevie Nicks\artist.nfo
|}
</div>
 
 
<div style="{{linear-gradient|top|#f5d3ff, #12b2e7}}">
'''''Naming & Saving conventions for your Music Album *.nfo files:'''''
{|
|- valign="top"
| width=200px |'''''Saved Album as'''''
| width=300px |'''''File Name'''''
| width=600px |'''''Save Location'''''
|- valign="top"
| width=200px |Artist\Album\Songs
| width=300px |album.nfo
| width=600px |f:\MyMusic\Stevie Nicks\Crystal Visions\album.nfo
|}
</div>
*The PERFORMER tag can contain many different kinds of musician tags, including ARTIST, ARRANGER, COMPOSER, CONDUCTOR, DJMIXER, ENGINEER, LYRICIST, MIXER, PRODUCER, REMIXER and PERFORMER
 
 
 
= Available nfo Tags =
The following two tables list the available tags that can be used in each nfo file. The Album nfo section includes an example nfo for collaboration type albums.
 
 
 
== Artist nfo ==
 
{|class="prettytable"
! NFO (xml) Tag || Required || Overwrites || Multiple ** || Notes
|-
|<artist></artist> || Yes || No || No || The top level parent tag for the nfo file. All other tags must be contained within these two tags
|-
|<name></name> || No || Yes || No || Overwrites artist name in artist table, when "prefer online info" is "enabled". Does not change that name anywhere else
|-
|<musicBrainzArtistID></musicBrainzArtistID> || No || No || No || Exported but not imported
|-
|<genre></genre> || No || No || Yes || Artist genre is not related to song genre. <br />Used for display only.
|-
|<style></style> || No || No || Yes ||
|-
|<mood></mood> || No || No || Yes ||
|-
|<yearsactive></yearsactive> || No || No || Yes ||
|-
|<instruments></instruments> || No || No || Yes ||
|-
|<born></born> || No || No || No ||
|-
|<formed></formed> || No || No || No ||
|-
|<biography></biography> || No || No || No ||
|-
|<died></died> || No || No || No ||
|-
|<disbanded></disbanded> || No || No || No ||
|-
|<thumb preview="path"></thumb> || No || No || Yes || Path to available online artist images. <br />Importing will also accept paths to local art files which can subsequently be exported <br />
Export to Single File will export a single path. Export to Separate Files will export multiple paths.
|-
|<path></path> || No || No || No || Exported but not used on Import
|-
|
<fanart>
  <thumb preview=""></thumb>
</fanart>
|| No || No || Yes || Path to available online artist images. <br />Importing will also accept paths to local art files which can subsequently be exported <br />
Export to Single File will not export any paths. Export to Separate Files will export multiple paths.
|-
|
<album>
  <title></title>
  <year></year>
</album>
|| No || No || Yes || Artist discography. <br />A scraped listing not releated to the albums in the library
|-
|
<art>
  <fanart></fanart>
  <thumb preview="path"></thumb>
</art>
|| No || No || Yes || Path to currently selected artwork. Exported to single file nfo only. Not used on import.
|}
 
{|class="prettytable"
!'''Notes'''
|-
|** || With multiple value fields those values are entered using XML tag per value, and when no data exists, the XML tag will not be created on expor
|}
 
 
 
== Album nfo ==
 
{|class="prettytable"
! NFO (xml) Tag || Required || Overwrites || Multiple ** || Notes
|-
|<album></album> || Yes || No || No || The top level parent tag for the nfo file. All other tags must be contained within these two tags
|-
|<title></title> || No || Yes || No ||
|-
|<musicBrainzAlbumID></musicBrainzAlbumID> || No || No || No || Exported but tag not merged when scraped or imported
|-
|<artistdesc></artistdesc> || No || No || No || Exported but tag not merged when scraped or imported
|-
|<genre></genre> || No || Yes || Yes ||
|-
|<style></style> || No || No|| Yes ||
|-
|<mood></mood> || No || No || Yes ||
|-
|<theme></theme> || No || No || Yes ||
|-
|<compilation></compilation> || No || Yes || No ||
|-
|<review></review> || No || No || No ||
|-
|<type></type> || No || Yes || No ||
|-
|<releasedate></releasedate> || No || No || No || Empty XML tag exported, not not used when scraped or imported
|-
|<label></label> || No || Yes || No ||
|-
|<thumb preview="path"></thumb> || No || No || Yes || Path to available online artwork <br />Importing will also accept paths to local art files which can subsequently be exported
|-
|<path></path> || No || No || No || Exported but tag not used when scraped or imported
|-
|<rating max="10"></rating> || No || No || No || Optional qualifier gives maximum value score is out of
|-
|<userrating max="10"></userrating> || No || No || No || Optional qualifier gives maximum value score is out of
|-
|<votes></votes> || No || No || No ||
|-
|<year></year> || No || Yes || No ||
|-
|
<albumArtistCredits>
  <artist></artist>
  <musicBrainzArtistID></musicBrainzArtistID>
</albumArtistCredits>
|| No || Yes || Yes || Scraped album artist credits can replace those derrived from music file tags. Note even when overwrite is disabled missing album artists will be added
|-
|
<track>
    <musicBrainzTrackID></musicBrainzTrackID>
    <title></title>
    <position></position>
    <duration></duration>
  </track>
|| No || No || Yes || Album track listing. </br>
Not related in any way to the songs in the music library, it simply provides descriptive info used by some skins.<br />
<musicBrainzTrackID> will always be empty and can be safely ignored if creating your own nfo files.
|-
|<releasetype></releasetype> || No || No || No || Exported with value "album", not used when scraped or imported. </br>
This is an internal flag.
|}
 
{|class="prettytable"
!'''Notes'''
|-
|** || With multiple value fields those values are entered using XML tag per value, and when no data exists, the XML tag will not be created on export
|}
 
= Sample nfo Files =
An example of the ''artist.nfo'' and the ''album.nfo'' are provided. Use these as a guide to create  your own nfo files, or to determine errors in your own files.
 
 
 
== Artist nfo ==
Sample Music Artist nfo extracted from Single File Export. Click the '''Expand''' button, to the right, to view
 
{{collapse top| Music Artist nfo file  (click 'expand' to view)}}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <artist>
        <name>Annie Lennox</name>
        <musicBrainzArtistID>3e30aebd-0557-4cfd-8fb9-3945afa5d72b</musicBrainzArtistID>
        <genre>Soul</genre>
        <style>Rock</style>
        <style>Pop</style>
        <mood>Bittersweet</mood>
        <yearsactive>1970s - 2010s</yearsactive>
        <born>Aberdeen, Scotland (1954)</born>
        <formed></formed>
        <biography>Ann &quot;Annie&quot; Lennox, OBE (born 25 December 1954) is a Scottish singer-songwriter, political activist and philanthropist. After achieving minor success in the late 1970s...</biography>
        <died></died>
        <disbanded></disbanded>
        <thumb preview="http://www.theaudiodb.com/images/media/artist/thumb/vtquqv1353945074.jpg/preview">http://www.theaudiodb.com/images/media/artist/thumb/vtquqv1353945074.jpg</thumb>
        <path>E:\Music-Picard\Annie Lennox\</path>
        <fanart />
        <album>
            <title>Medusa / Live in Central Park</title>
            <year>1995</year>
        </album>
        <album>
            <title>Medusa</title>
            <year>1995</year>
        </album>
        <album>
            <title>Songs of Mass Destruction</title>
            <year>2007</year>
        </album>
        <album>
            <title>Annie Lennox &amp; the BBC Concert Orchestra</title>
            <year>2007</year>
        </album>
        <album>
            <title>Nostalgia</title>
            <year>2014</year>
        </album>
        <album>
            <title>A Christmas Cornucopia</title>
            <year>2010</year>
        </album>
        <album>
            <title>Diva</title>
            <year>1992</year>
        </album>
        <album>
            <title>An Evening of Nostalgia With Annie Lennox</title>
            <year>2015</year>
        </album>
        <album>
            <title>Die Nixe • The Mermaid</title>
            <year>2001</year>
        </album>
        <art>
            <fanart>E:\Music-Picard\Annie Lennox\fanart.jpg</fanart>
            <thumb>E:\Music-Picard\Annie Lennox\folder.jpg</thumb>
        </art>
    </artist>
{{collapse bottom}}
 
 
 
== Music Album nfo ==
Sample Music Album nfo. Click '''Expand''', to the right, to view.
 
{{collapse top| Music Album nfo file  (click 'expand' to view)}}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <title>Symphony no. 5 & The Water Goblin</title>
    <musicBrainzAlbumID>df943086-8bb9-41fa-a984-b70be7286701</musicBrainzAlbumID>
    <artistdesc>Dvořák; Antonín Leopold</artistdesc>
    <genre>Classical</genre>
    <genre>Romantic</genre>
    <style>Pastoral</style>
    <style>Old and slow</style>
    <mood>Happy</mood>
    <mood>Dramatic</mood>
    <theme>Fantasy theme of water gobin</theme>
    <theme>Gratefulness</theme>
    <compilation>false</compilation>
    <review>Dvořák composed his fifth symphony in the summer months in June and July 1875. The opus number is actually incorrect. The autograph was marked with number 24, but the publisher Simrock gave this symphony a high...</review>
    <type>album; live recording</type>
    <label>Chandos</label>
    <thumb preview="http://www.theaudiodb.com/images/media/album/thumb/uuvuvt1389633744.jpg/preview">http://www.theaudiodb.com/images/media/album/thumb/uuvuvt1389633744.jpg</thumb>
    <path>N:\Music\Lib\Classical\Dvořák\Symphony no. 5 , The Water Goblin\</path>
    <rating max="10">3.500000</rating>
    <userrating max="10">6</userrating>
    <votes>502</votes>
    <year>1987</year>
    <albumArtistCredits>
        <artist>Antonín Leopold Dvořák</artist>
        <musicBrainzArtistID>819eaeb2-8dd8-48a5-ad07-0bcd137985ef</musicBrainzArtistID>
    </albumArtistCredits>
    <albumArtistCredits>
        <artist>Scottish National Orchestra</artist>
        <musicBrainzArtistID>c6c4103b-cf07-42ad-91a7-b7eab7586e56</musicBrainzArtistID>
    </albumArtistCredits>
    <albumArtistCredits>
        <artist>Neeme J├ñrvi</artist>
        <musicBrainzArtistID>8a1d9496-603f-40b1-a38d-2e8985834940</musicBrainzArtistID>
    </albumArtistCredits>
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>Symphony no. 5 in F major, op. 76: I. Allegro ma non troppo</title>
        <position>1</position>
        <duration>12:50</duration>
    </track>
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>Symphony no. 5 in F major, op. 76: II. Andante con moto</title>
        <position>2</position>
        <duration>07:49</duration>
    </track>
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>Symphony no. 5 in F major, op. 76: III. Scherzo. Allegro scherzando</title>
        <position>3</position>
        <duration>07:39</duration>
    </track>
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>Symphony no. 5 in F major, op. 76: IV. Finale. Allegro molto</title>
        <position>4</position>
        <duration>12:08</duration>
    </track>
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>The Water Goblin, op. 107</title>
        <position>5</position>
        <duration>20:39</duration>
    </track>
    <releasetype>album</releasetype>
</album>
 
{{collapse bottom}}
 
 
 
= Technical Details =
{{Red|The information in this section is provided for technical interest and reference only. It can be safely disregarded if you have no technical interest in nfo and database functions}}<br />
 
*The data within the nfo file should, theoretically, all go to/come from somewhere in the database but, because the content source of the data field can be diverse, the data does not always come from a single source or go to a single database field. Scanning is not just about reading data but processing it too. As some fields are initially set from tags and can then be overwritten by nfo data, there is also a merge process involved in scraping.<br />
*There exist peculiarities with some XML tags in the nfo files:
**'''<name>''' in artist.nfo can overwrite the name of the artist in the artist table, if "prefer online info" is "enabled", but does not change that name anywhere else
**'''<releasedate>''' is required as part of the internal function of the online scraping process. It does not map directly to any db field, and nothing (currently) happens with its data. Exporting the library to nfo files will create an empty XML tag. It is not used during import/scrape.
**'''<artistdesc>''' tag in the album.nfo file is related to the strArtists field of the album table of the database. It is derived from ALBUMARTIST and ALBLUMARTISTS tags from the music file tags. If those two tags are empty, then it will be derived from ARTIST and ARTISTS tags in the music files. It is exported to album.nfo as <artistdesc> but the value is not imported/scraped.
**'''<releasetype>''' appears in the album.nfo by mistake. It is an internal flag that, in nfo files, will always be output as ''<releasetype>album</releasetype>'', and it is ignored during import/scrape of the nfo file. It relates to the strReleaseType field of the album table in the database. It does '''not''' relate to the RELEASETYPE tag in the MusicFile, which connects to ''<type>'' in album.nfo.
**'''<track>''' XML tag, and its children tags in the album.nfo, are not related in any way to the songs in the music library or in the Song table of the database. This XML tag and its children are related to the [[Databases#albuminfosong|albuminfosong]] table which simply provides more descriptive details of the album, which can be displayed by some skins. The presence of ''<musicBrainzTrackID>'' under ''<track>'' is a mistake and is always empty. It is recommended that when creating your own nfo, that these XML tags be omitted from the album.nfo. These XML tags have been removed in v18.<br />
*There are music file tags that are not saved to the database, therefore there are no XML tags. The music file tags are accessed by the music player at the commencement of playback.
 
{|class="prettytable"
! Music File Tags Not Stored In DB
|-
|LYRICS
|-
|REPLAYGAIN_TRACK_GAIN
|-
|REPLAYGAIN_ALBUM_GAIN
|-
|REPLAYGAIN_TRACK_PEAK
|-
|REPLAYGAIN_ALBUM_PEAK
|}
 
*In music the only XML tags with a qualifier is ''Rating'' and ''User Rating''. It limits the maximum score that is possible for the given rating. This is relevant as Kodi switched from a maximum 5 rating to a maximum of 10 rating.
*A FLAC file can have a cuesheet embedded in the CUESHEET tag. In v17 and prior there is a Cue table in the Database to make possible replaygain handling during playback for those kinds of files, but this slowed down Kodi for all users, even when no cuesheets were in the music file. v17 removed ReplayGain handling, so there is no replay gain applied for songs from FLAC with embedded cuesheets. This made the songs node 30% faster. This function has been redesigned and will be re-implemented in v18.
 
 
There are differences in tags used by Single File Export and Separate File Export. Though testing reveals that transposing tages between the two has no detrimental affect on the scrape.
 
{|class="prettytable"
! colspan="23" style="background-color:#E6E6E6;" | '''Artist nfo<br/>'''
|-
! XML Tag
! Exported in
Single File
! Exported in
Separate File
! Notes
|-
|
<art>
  <fanart></fanart>
  <poster></poster>
</art>
|| Yes || No || Path to currently selected artwork. Exported to single file nfo only. Not used on import.
|}
 
 
 
{{Top}}
 
 
{{updated|17}}
[[Category:FAQ]]
[[Category:Index]]
[[Category:Guides]]
[[Category:Manual]]
[[Category:First time user]]
[[Category:Music library]]
[[Category:Advanced topics]]
[[Category:Quick Start Guide]]

Latest revision as of 00:24, 23 April 2021


Music NFO Files may refer to one of the following:


NFO Files