User:Karellen/scratchpad: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
(Blanked the page)
(82 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{|class="infobox" style="width:200px"
! Steps to create your Music Library
|-
|<small>1. [[Music_tagging|Music File Tagging]]</small>
|-
|<small>2. Scanning Music Into Library</small>
|-
|<small>3. Scraping Music Into Library</small>
|-
|4. '''[[NFO_files|NFO Files]]'''
:*'''[[NFO_files/movies|Movies]]'''
:*'''[[NFO_files/tvshows|TV Shows]]'''
:*'''[[NFO_files/music|Music]]'''
:*'''[[NFO_files/musicvideos|Music Videos]]'''
|-
|<small>5. [[Music_artwork]]</small>


<small>Report NFO corrections:<br />
[https:// here in the forum]</small>
|}
{{mininav|[[Video library]] {{l2| [[Music library]] }} }}
= Requirements =
{{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.'''}}
== Understanding the Music Library ==
{{#lst:Music_artwork|understanding}}
== Adding Music to Library ==
{{#lst:Music_artwork|adding}}
== Music nfo Specific Requirements ==
'''Some general notes from discussions between @daveblake and @karellen. To be created into wiki notes'''<br /><br />
*There exist peculiarities with some XML tags in the nfo files:
**'''<releasedate>''' is required as part of the internal function of the online scraping processing. It does not map directly to any db field, and nothing (currently) happens with it. Exporting the library to nfo files will create an empty XML tag. It is not used during import.
**'''<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 Files. If those two tags are empty, then it will be derived from ARTIST and ARTISTS tags. 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 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.
**There is no tag for ''votes'' of individual Songs. Album ''votes'' can come from either online or local nfo scraping.
*There are MusicFile Tags that are not saved to the database, therefore there are no NFO Tags for them. The MusicFile Tags are accessed by the player at the commencement of playback.
{|class="prettytable"
! MusicFile Tags not saved by Kodi
|-
|CUESHEET
|-
|LYRICS
|-
|REPLAYGAIN_TRACK_GAIN
|-
|REPLAYGAIN_ALBUM_GAIN
|-
|REPLAYGAIN_TRACK_PEAK
|-
|REPLAYGAIN_ALBUM_PEAK
|-
|METADATA_BLOCK_PICTURE or COVERART or COVERARTMIME
|}
*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. Kodi converts this value to its equivalent value out of 10. Values less than 10 in the FLAC MusicFile Tag will return a rating of 0 in Kodi.
*A number of database fields can be populated initially by MusicFile 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 from the MusicFile Tags. If ''enabled'' these fields will be overwritten. The affected fields are shown below in the section Available nfo Tags
*When the PERFORMER tag is used from MusicFiles, Kodi will automatically insert the Orchestra tag.
{{Red|Work in Progress}}
<br />
*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)
*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.
*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}}
<div style="{{linear-gradient|top|#a1f5e4, #f5f5a1}}">
'''''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|#f5f5a1, #a1f5e4}}">
'''''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>
= Available nfo Tags =
The following two tables list the available tags that can be used in each nfo file.
== Artist NFO ==
{|class="prettytable"
! 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
|}
{|class="prettytable"
!'''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 ==
{|class="prettytable"
! NFO (xml) Tag || Required || Overwrites || Multiple || Notes
|-
|<title></title> || Yes || Yes || No || 1
|-
|<musicBrainzAlbumID></musicBrainzAlbumID> || No || Yes || No || 1
|-
|<artistdesc></artistdesc> || Yes || No || No || 4
|-
|<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 || No || No || 4
|-
|<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 || No || No || 4
|}
{|class="prettytable"
!'''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 || XML Tag created on Export, not used on Import
|}
= 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
{{collapse top| Music Artist nfo file  (click 'expand' to view)}}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<artist>
    <name>Fleetwood Mac</name>
    <musicBrainzArtistID>bd13909f-1c29-4c27-a874-d4aaf27c5b1a</musicBrainzArtistID>
    <genre>Rock</genre>
    <genre>Hard Rock</genre>
    <style>Rock</style>
    <style>Pop</style>
    <mood>Happy</mood>
    <mood>Relaxed</mood>
    <yearsactive>1960s - 2010s</yearsactive>
    <born></born>
    <formed>London, England (1967)</formed>
    <biography>Fleetwood Mac are a British-American rock band formed in 1967 in London. The only original member present in the band is its eponymous drummer...</biography>
    <died></died>
    <disbanded></disbanded>
    <thumb preview="http://assets.fanart.tv/preview/music/bd1...56146ecf89860.jpg">http://assets.fanart.tv/fanart/music/bd1...f27c5b1a/artistthumb/fleetwood-mac-56146ecf89860.jpg</thumb>
    <thumb preview="http://assets.fanart.tv/preview/music/bd1...4fd37e9a22e1f.jpg">http://assets.fanart.tv/fanart/music/bd1...f27c5b1a/artistthumb/fleetwood-mac-4fd37e9a22e1f.jpg</thumb>
    <thumb preview="http://www.theaudiodb.com/images/media/artist/thumb/svtsux1447415485.jpg/preview">http://www.theaudiodb.com/images/media/artist/thumb/svtsux1447415485.jpg</thumb>
    <path>E:\Music- Test\Fleetwood Mac\</path>
    <fanart>
        <thumb preview="http://assets.fanart.tv/preview/music/bd13...mac-54a08371db4e2.jpg">http://assets.fanart.tv/fanart/music/bd13...ground/fleetwood-mac-54a08371db4e2.jpg</thumb>
        <thumb preview="http://assets.fanart.tv/preview/music/bd13...mac-54a083a3607ed.jpg">http://assets.fanart.tv/fanart/music/bd13...ground/fleetwood-mac-54a083a3607ed.jpg</thumb>
        <thumb preview="http://assets.fanart.tv/preview/music/bd13...mac-4e7ec8bebeba1.jpg">http://assets.fanart.tv/fanart/music/bd13...ground/fleetwood-mac-4e7ec8bebeba1.jpg</thumb>
    </fanart>
    <album>
        <title>Future Games</title>
        <year>1971</year>
    </album>
    <album>
        <title>Live in London 1968</title>
        <year>1989</year>
    </album>
    <album>
        <title>Bare Trees</title>
        <year>1972</year>
    </album>
    <album>
        <title>Tusk</title>
        <year>1979</year>
    </album>
    <album>
        <title>In Concert 1982</title>
        <year>2010</year>
    </album>
    <album>
        <title>Rumours</title>
        <year>1977</year>
    </album>
    <album>
        <title>Say You Will</title>
        <year>2003</year>
    </album>
    <album>
        <title>Kiln House</title>
        <year>1970</year>
    </album>
    <album>
        <title>Tango in the Night</title>
        <year>1987</year>
    </album>
    <album>
        <title>Fleetwood Mac</title>
        <year>1975</year>
    </album>
    <album>
        <title>Penguin</title>
        <year>1973</year>
    </album>
    <album>
        <title>Mirage</title>
        <year>1982</year>
    </album>
    <album>
        <title>Mystery to Me</title>
        <year>1973</year>
    </album>
    <album>
        <title>Peter GreenΓÇÖs Fleetwood Mac</title>
        <year>1968</year>
    </album>
</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" ?>
<title>Gold: Greatest Hits</title>
        <musicBrainzAlbumID>09cc6e86-9901-40f0-a53e-a638e95744ba</musicBrainzAlbumID>
        <artistdesc>ABBA</artistdesc>
        <genre>Pop</genre>
        <style>Rock</style>
        <style>Pop</style>
        <mood>Cheerful</mood>
        <compilation>false</compilation>
        <review>Gold: Greatest Hits is a greatest hits album of recordings by Swedish pop group ABBA. It was released on 21 September 1992... </review>
        <type></type>
        <releasedate></releasedate>
        <label>Polydor</label>
        <thumb preview="http://www.theaudiodb.com/images/media/album/thumb/gold-great...b2.jpg/preview">http://www.theaudiodb.com/images/media/album/thumb/gold-great...b2.jpg</thumb>
        <path>E:\Music-Picard\ABBA\Gold\</path>
        <rating max="10">-1.000000</rating>
        <userrating max="10">-1</userrating>
        <votes>1658</votes>
        <year>1979</year>
        <albumArtistCredits>
            <artist>ABBA</artist>
            <musicBrainzArtistID>d87e52c5-bb8d-4da8-b941-9f4928627dc8</musicBrainzArtistID>
        </albumArtistCredits>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Dancing Queen</title>
            <position>1</position>
            <duration>03:52</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Knowing Me, Knowing You</title>
            <position>2</position>
            <duration>04:02</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Take a Chance on Me</title>
            <position>3</position>
            <duration>04:04</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Mamma Mia</title>
            <position>4</position>
            <duration>03:33</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Lay All Your Love on Me</title>
            <position>5</position>
            <duration>04:34</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Super Trouper</title>
            <position>6</position>
            <duration>04:14</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>I Have a Dream</title>
            <position>7</position>
            <duration>04:44</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>The Winner Takes It All</title>
            <position>8</position>
            <duration>04:55</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Money, Money, Money</title>
            <position>9</position>
            <duration>03:08</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>SOS</title>
            <position>10</position>
            <duration>03:21</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Chiquitita</title>
            <position>11</position>
            <duration>05:26</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Fernando</title>
            <position>12</position>
            <duration>04:13</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Voulez-vous (edit)</title>
            <position>13</position>
            <duration>00:00</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Gimme! Gimme! Gimme! (A Man After Midnight)</title>
            <position>14</position>
            <duration>04:48</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Does Your Mother Know</title>
            <position>15</position>
            <duration>03:15</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>One of Us</title>
            <position>16</position>
            <duration>03:58</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>The Name of the Game (edit)</title>
            <position>17</position>
            <duration>00:00</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Thank You for the Music</title>
            <position>18</position>
            <duration>03:51</duration>
        </track>
        <track>
            <musicBrainzTrackID></musicBrainzTrackID>
            <title>Waterloo</title>
            <position>19</position>
            <duration>02:42</duration>
        </track>
        <releasetype>album</releasetype>
    </album>
{{collapse bottom}}

Revision as of 02:06, 27 February 2018