User:Karellen/scratchpad

From Official Kodi Wiki
Jump to navigation Jump to search
Steps to create your Music Library
1. Music File Tagging
2. Scanning Music Into Library
3. Scraping Music Into Library
4. NFO Files
5. Music_artwork

Report NFO corrections:
[https:// here in the forum]

Home icon grey.png   ▶ Video library
▶ Music library
▶ scratchpad



Requirements

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.


Understanding the Music Library

Adding Music to Library

Music nfo Specific Requirements

Some general notes from discussions between @daveblake and @karellen. To be created into wiki notes

  • There are MusicFile Tags that are not saved to the database, therefore there are no NFO Tags for them as they are by the player only during playback. eg. LYRICS, REPLAYGAIN
  • 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.
  • FLAC rating contained within the Music File Tag is scored out of 100. that catches people out. A rating of 7- Integer divison truncates it to 0, which is same as no rating
  • Genres, Year, Compilation and Label may have been derived from tag data and these will take prescidence. These values can be overwritten by the scraped values if "Prefer Online Information" setting is enabled.
  • Orchestra comes from PERFORMER tag (TMCL in mp3)

Work in Progress


  • Online scraping populates album rating and votes. NFO scraping can populate userrating, rating and votes. It is song votes that seems impossible to neither set nor get out
  • Some point you will ask about <releasedate> in album.nfo and exported XML Because it is in the XML, but doesn't have a DB entry
  • Also a FLAC file can have the cuesheet embeeded as a CUESHEET tag instead. Because of that v17 and before has a Cue table in the DB just to make replaygain handling possible during playback for those kinds of file. Ugly solution, that slowed down Kodi for everyone even when no cuesheets in your music collection. Disabled in v17 (no replay gain applied for songs from FLAC with embedded cue - boo hoo! but songs node 30% faster!!!) , and implemented differently in v18. If I perform an export to nfo, is any of that cue sheet data exported? - NO. It is considered to be re-derivable from the music files (+ cue)
  • Oh and my "can put in all in one folder" comment, just try it and see. Tagged songs all in one flat folder will load to lib OK.
  • https://forum.kodi.tv/showthread.php?tid=320887&pid=2641709#pid2641709
  • Yes music is different (better actually) because it is not dependant on online sources in the way video is. But be great to have both documented well.
  • Orchestra comes from PERFORMER tag (TMCL in mp3)
  • iTrack is Disc number in upper half, track num in lower (shift bits)- If creating your own nfo file, how do you calculate the required entry?
  • In artist.nfo <name> can overwrite the name of the artist in the artist table (if "prefer online info" enabled") but does not change that name anywhere else
  • In album.nfo the top level <artist> tag is deprecated
  • The NFO data should all go to/come from somewhere in the db, just not always a single db field. The source of data field content can be diverse, scanning is not just about reading data but processing it too. Also some fields are initially set from tags and then can be overwritten by nfo data, there is a merge process involved in scraping.
  • Art table is indirectly populated from both scanning and scraping

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

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


Available nfo Tags

The following two tables list the available tags that can be used in each nfo file.


Artist NFO

NFO (xml) Tag Required Overwrites Multiple Notes
<name></name> Yes Yes no 1
<musicBrainzArtistID></musicBrainzArtistID> No No No 1
<genre></genre> No Yes Yes 1 2 3
<style></style> No No Yes 2 3
<mood></mood> No No Yes 2 3
<theme></theme> No Yes Yes 2 3
<yearsactive></yearsactive> No No Yes 2 3
<born></born> No No No
<formed></formed> No No No
<instruments></instruments> No No No 2 3
<biography></biography> No No No
<died></died> No No No
<disbanded></disbanded> No No No
<thumb preview="path"></thumb> No No Yes 4
<path></path> No No No
<fanart></fanart> No No Yes 4
<album>
  <title></title>
  <year></year>
</album>
No No Yes 5
<art>
  <fanart></fanart>
  <thumb preview="path"></thumb>
</art>
No No Yes 5
Notes
1 Will overwrite when prefer online info is enabled in Kodi settings
2 Multiple entries allowed
3 When no data exists, NFO tag will not be created on Export
4 Path to available online artwork
5 Path to artwork in use



Album NFO

NFO (xml) Tag Required Overwrites Multiple Notes
<title></title> Yes Yes No 1
<musicBrainzAlbumID></musicBrainzAlbumID> No Yes No 1
<artistdesc></artistdesc> Yes Yes No 1
<genre></genre> No Yes Yes 1 2 3
<style></style> No Yes Yes 1 2 3
<mood></mood> No Yes Yes 1 2 3
<theme></theme> No Yes Yes 1
<compilation></compilation> Yes Yes No 1 2 3
<review></review> No Yes No 1
<type></type> No Yes No 1
<releasedate></releasedate> No Yes No 1
<label></label> No Yes No 1
<thumb preview="path"></thumb> No No Yes
<path></path> Yes No No
<rating max="10"></rating> No Yes No 1
<userrating max="10"></userrating> No No No
<votes></votes> No Yes No 1
<year></year> No Yes No 1
<albumArtistCredits>
  <artist></artist>
  <musicBrainzArtistID></musicBrainzArtistID>
</albumArtistCredits>
Yes Yes Yes 1 2 3
<track>
   <musicBrainzTrackID></musicBrainzTrackID>
   <title></title>
   <position></position>
   <duration></duration>
 </track>
Yes Yes Yes 1 2 3
<releasetype></releasetype> No Yes No 1
Notes
1 Will overwrite when prefer online info is enabled in Kodi settings
2 Multiple entries allowed
3 When no data exists, NFO 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. Click the Expand button, to the right, to view


Music Album nfo

Sample Music Album nfo. Click Expand, to the right, to view.