Databases/MyMusic: Difference between revisions
(Create Page) |
(Updated for v18) |
||
Line 10: | Line 10: | ||
The current stable release of {{kodi}} is using the following version of the database: | The current stable release of {{kodi}} is using the following version of the database: | ||
;Kodi | ;Kodi v18 - MyMusic72.db | ||
Line 37: | Line 37: | ||
|- | |- | ||
|strArtist || varchar(256) || Artist name | |strArtist || varchar(256) || Artist name | ||
|- | |||
|strSortName || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] | |||
|- | |- | ||
|strMusicBrainzArtistID || text || Musicbrainz artist ID | |strMusicBrainzArtistID || text || Musicbrainz artist ID | ||
Line 55: | Line 57: | ||
|- | |- | ||
|strMusicBrainzAlbumID || text || MusicBrainz album ID | |strMusicBrainzAlbumID || text || MusicBrainz album ID | ||
|- | |||
|strReleaseGroupMBID || text || The ID that groups variations of the same release | |||
|- | |- | ||
|strArtists || text || Album artist(s) description (not always a concatenation of names) | |strArtists || text || Album artist(s) description (not always a concatenation of names) | ||
|- | |||
|strArtistSort || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] | |||
|- | |- | ||
|strGenres || text || Album genres (denormalised concatenation of values in genre table) | |strGenres || text || Album genres (denormalised concatenation of values in genre table) | ||
Line 83: | Line 89: | ||
|- | |- | ||
|bCompilation || integer || Compilation flag | |bCompilation || integer || Compilation flag | ||
|- | |||
|bScrapedMBID || integer || Indicates if mbid(s) have been fetched by scraping or from tags | |||
|- | |||
|lastScraped || varchar(20) || Date & time of last scrape | |||
|- | |- | ||
|iTimesPlayed || integer ||Average of number of times songs on album are played | |iTimesPlayed || integer ||Average of number of times songs on album are played | ||
Line 103: | Line 113: | ||
|- | |- | ||
|strArtist || varchar(256) || Artist name | |strArtist || varchar(256) || Artist name | ||
|- | |||
|strSortName || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] | |||
|- | |- | ||
|strMusicBrainzArtistID || text || Musicbrainz artist ID | |strMusicBrainzArtistID || text || Musicbrainz artist ID | ||
|- | |||
|strType || text || Type of performer | |||
|- | |||
|strGender || text || Male or Female artist | |||
|- | |||
|strDisambiguation || text || See: [https://musicbrainz.org/doc/Disambiguation_Comment Disambiguation Comment] | |||
|- | |- | ||
|strBorn || text || Artist birthday (and place) | |strBorn || text || Artist birthday (and place) | ||
Line 129: | Line 147: | ||
|- | |- | ||
|strFanart || text || URLs of available artist fanart | |strFanart || text || URLs of available artist fanart | ||
|- | |||
|bScrapedMBID || integer || Indicates if mbid(s) have been fetched by scraping or from tags | |||
|- | |||
|lastScraped || varchar(20) || Date & time of last scrape | |||
|- | |- | ||
|dateAdded || text || Music file timestamp of newest song by artist | |dateAdded || text || Music file timestamp of newest song by artist | ||
Line 149: | Line 171: | ||
|- | |- | ||
|strArtist || varchar(256) || Artist name | |strArtist || varchar(256) || Artist name | ||
|- | |||
|strSortName || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] | |||
|- | |- | ||
|strMusicBrainzArtistID || text || Musicbrainz artist ID Hash | |strMusicBrainzArtistID || text || Musicbrainz artist ID Hash | ||
Line 165: | Line 189: | ||
|- | |- | ||
|strArtists || text || Song artist(s) description (not always a concatenation of names) | |strArtists || text || Song artist(s) description (not always a concatenation of names) | ||
|- | |||
|strArtistSort || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] | |||
|- | |- | ||
|strGenres || text || Song Genres (denormalised concatenation of values in genre table) | |strGenres || text || Song Genres (denormalised concatenation of values in genre table) | ||
Line 188: | Line 214: | ||
|lastplayed || varchar(20) || Date & time last played | |lastplayed || varchar(20) || Date & time last played | ||
|- | |- | ||
|rating || | |rating || float || Song rating | ||
|- | |- | ||
|userrating || integer || Song rated by user (out of 10) | |userrating || integer || Song rated by user (out of 10) | ||
Line 205: | Line 231: | ||
|- | |- | ||
|strAlbumArtists || text || Album artist(s) description (not always a concatenation of names) | |strAlbumArtists || text || Album artist(s) description (not always a concatenation of names) | ||
|- | |||
|strAlbumArtistSort || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] | |||
|- | |- | ||
|strAlbumReleaseType || text || Internal type - "album" or "single" | |strAlbumReleaseType || text || Internal type - "album" or "single" | ||
Line 211: | Line 239: | ||
|- | |- | ||
|dateAdded || text || Music file timestamp | |dateAdded || text || Music file timestamp | ||
|- | |||
|strReplayGain || text || Contains ''album gain, album peak, track gain, track peak '' data in one string | |||
|} | |} | ||
Line 231: | Line 261: | ||
|strMusicBrainzAlbumID || text || MusicBrainz album ID |||| MUSICBRAINZ_ALBUMID || <musicBrainzAlbumID></musicBrainzAlbumID> | |strMusicBrainzAlbumID || text || MusicBrainz album ID |||| MUSICBRAINZ_ALBUMID || <musicBrainzAlbumID></musicBrainzAlbumID> | ||
|- | |- | ||
| | |strReleaseGroupMBID || text || The ID that groups variations of the same release |||| MusicBrainz Release Group Id || <musicbrainzreleasegroupid></musicbrainzreleasegroupid> | ||
|- | |||
|strArtistDisp || text || Album artist(s) description (not always a concatenation of names) |||| ALBUMARTIST, <br /> | |||
ALBUMARTISTS, <br /> | ALBUMARTISTS, <br /> | ||
|| <artistdesc></artistdesc> | || <artistdesc></artistdesc> | ||
|- | |||
|strArtistSort || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] |||| ARTISTSORT | |||
|- | |- | ||
|strGenres || text || Album genres (denormalised concatenation of values in genre table) |||| GENRE || <genre></genre> ^^ | |strGenres || text || Album genres (denormalised concatenation of values in genre table) |||| GENRE || <genre></genre> ^^ | ||
|- | |- | ||
|iYear || integer || Album release year |||| YEAR or DATE || <year></year> | |iYear || integer || Album release year |||| YEAR or DATE || <year></year> | ||
|- | |- | ||
|bCompilation || integer || Compilation flag |||| COMPILATION || <compilation></compilation> | |bCompilation || integer || Compilation flag |||| COMPILATION || <compilation></compilation> | ||
Line 259: | Line 290: | ||
|- | |- | ||
|fRating || float || Album rating |||| || <rating max="10"></rating> | |fRating || float || Album rating |||| || <rating max="10"></rating> | ||
|- | |||
|iVotes || integer || Votes (for album rating) |||| || <votes></votes> | |||
|- | |- | ||
|iUserrating || integer || Album user rating (out of 10) |||| || <userrating max="10"></userrating> | |iUserrating || integer || Album user rating (out of 10) |||| || <userrating max="10"></userrating> | ||
|- | |- | ||
|lastScraped || text || Date/time data scraped from online sources or NFO files |||| | |lastScraped || text || Date/time data scraped from online sources or NFO files |||| | ||
|- | |||
|bScrapedMBID || integer || Indicates if mbid(s) have been fetched by scraping or from tags |||| || | |||
|- | |- | ||
|strReleaseType || text || Internal type - "album" or "single" |||| || <releasetype></releasetype> | |strReleaseType || text || Internal type - "album" or "single" |||| || <releasetype></releasetype> | ||
|- | |- | ||
| | |idInfoSetting || integer || Indicates which scraper setting was used for that item. 0 = default scraper. <br>Linked to [[Databases/MyMusic#infosetting|infosetting table]] |||| || | ||
|} | |} | ||
Line 280: | Line 315: | ||
== album_artist == | == album_artist == | ||
This table links | This table links albums to the Source folder | ||
{|class="prettytable" | {|class="prettytable" | ||
! Column Name || Data Type || Description | ! Column Name || Data Type || Description | ||
|- | |- | ||
|idArtist || integer || Foreign key to [[Databases#artist|artist table]] | |idArtist || integer || Foreign key to [[Databases/MyMusic#artist|artist table]] | ||
|- | |- | ||
|idAlbum || integer || Foreign key to [[Databases#album|album table]] | |idAlbum || integer || Foreign key to [[Databases/MyMusic#album|album table]] | ||
|- | |- | ||
|iOrder || integer || Order of artist names for credits | |iOrder || integer || Order of artist names for credits | ||
Line 295: | Line 330: | ||
== | == album_source == | ||
This links albums | This table links artists and albums | ||
{|class="prettytable" | {|class="prettytable" | ||
! Column Name || Data Type || Description | ! Column Name || Data Type || Description | ||
|- | |- | ||
| | |idArtist || integer || Foreign key to [[Databases/MyMusic#source|source table]] | ||
|- | |- | ||
|idAlbum || integer || Foreign key to [[Databases#album|album table]] | |idAlbum || integer || Foreign key to [[Databases/MyMusic#album|album table]] | ||
|} | |} | ||
Line 345: | Line 350: | ||
|art_id || integer || Primary Key |||| | |art_id || integer || Primary Key |||| | ||
|- | |- | ||
|media_id || integer || Foreign key to [[Databases#album|album]] or [[Databases#artist|artist table]] |||| | |media_id || integer || Foreign key to [[Databases/MyMusic#album|album]] or [[Databases/MyMusic#artist|artist table]] |||| | ||
|- | |- | ||
|media_type || text || "album" or "artist" |||| | |media_type || text || Used in combination with ''media_id''- "album" or "artist" |||| | ||
|- | |- | ||
|type || text || art type e.g. "thumb", "fanart" etc. |||| | |type || text || art type e.g. "thumb", "fanart" etc. |||| | ||
Line 355: | Line 360: | ||
|- | |- | ||
|url || text || URL of image (can be remote, local or music file with art embedded) |||| | |url || text || URL of image (can be remote, local or music file with art embedded) |||| | ||
< | <thumb aspect="poster" preview=""></thumb> | ||
<fanart> | |||
<thumb preview=""></thumb> | |||
</fanart> | |||
|} | |} | ||
Line 373: | Line 380: | ||
|strArtist || varchar(256) || Artist name |||| ARTIST, ARTISTS, <br /> ALBUMARTIST and <br /> | |strArtist || varchar(256) || Artist name |||| ARTIST, ARTISTS, <br /> ALBUMARTIST and <br /> | ||
ALBUMARTISTS | ALBUMARTISTS | ||
|| <name></name> | || <name></name> | ||
|- | |- | ||
|strMusicBrainzArtistID || text || Musicbrainz artist ID |||| MUSICBRAINZ_ARTISTID || <musicBrainzArtistID></musicBrainzArtistID> | |strMusicBrainzArtistID || text || Musicbrainz artist ID |||| MUSICBRAINZ_ARTISTID || <musicBrainzArtistID></musicBrainzArtistID> | ||
|- | |||
|strSortName || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] |||| ALBUMARTISTSORT | |||
|- | |||
|strType || text || Type of performer |||| || <type></type> | |||
|- | |||
|strGender || text || Male or Female artist |||| || <gender></gender> | |||
|- | |||
|strDisambiguation || text || See: [https://musicbrainz.org/doc/Disambiguation_Comment Disambiguation Comment] |||| || <disambiguation></disambiguation> | |||
|- | |- | ||
|strBorn || text || Artist birthday (and place) |||| || <born></born> | |strBorn || text || Artist birthday (and place) |||| || <born></born> | ||
Line 402: | Line 416: | ||
|strFanart || text || URLs of available artist fanart |||| || <fanart><thumb preview=""></thumb></fanart> ^^ | |strFanart || text || URLs of available artist fanart |||| || <fanart><thumb preview=""></thumb></fanart> ^^ | ||
|- | |- | ||
|lastScraped || varchar(20) || Date last scraped metadata | |lastScraped || varchar(20) || Date last scraped metadata |||| || | ||
|- | |||
|bScrapedMBID || integer || Indicates if mbid(s) have been fetched by scraping or from tags |||| || | |||
|- | |||
|idInfoSetting || integer || Indicates which scraper setting was used for that item. 0 = default scraper. <br>Linked to [[Databases/MyMusic#infosetting|infosetting table]] |||| || | |||
|} | |} | ||
Line 415: | Line 433: | ||
== | == audiobook == | ||
For use with [[Audiobooks]]. Holds Resume Point information only. | |||
{|class="prettytable" | {|class="prettytable" | ||
! Column Name || Data Type || Description | ! Column Name || Data Type || Description | ||
|- | |- | ||
| | |idBook || integer || Id of Resume Point | ||
|- | |- | ||
| | |strBook || varchar(256) || Title link to [[Databases/MyMusic#album|album table]] | ||
|- | |- | ||
| | |strAuthor || text || Author link to [[Databases/MyMusic#artist|artist table]] | ||
| | |||
|- | |- | ||
| | |bookmark || integer || Resume Point (millisec) | ||
|- | |- | ||
| | |file || text || Path to audiobook | ||
|- | |- | ||
| | |dateAdded || varchar(20) || Date & Time bookmark created | ||
|} | |} | ||
Line 452: | Line 459: | ||
! Column Name || Data Type || Description |||| NFO (xml) Tag | ! Column Name || Data Type || Description |||| NFO (xml) Tag | ||
|- | |- | ||
|idArtist || integer || Foreign key to [[Databases#artist|artist table]] |||| | |idArtist || integer || Foreign key to [[Databases/MyMusic#artist|artist table]] |||| | ||
|- | |- | ||
|strAlbum || text || Album title |||| | |strAlbum || text || Album title |||| | ||
Line 467: | Line 474: | ||
== genre | == genre == | ||
A music genre. This is a lookup table that enumerates the song genre values read from the genre tags embedded in music files e.g. "Progressive Rock", "Baroque" etc. But could contain anything that has been given as a "genre", and is not strictly limited to music genres. | A music genre. This is a lookup table that enumerates the song genre values read from the genre tags embedded in music files e.g. "Progressive Rock", "Baroque" etc. But could contain anything that has been given as a "genre", and is not strictly limited to music genres. | ||
Line 488: | Line 495: | ||
== path | == infosetting == | ||
As scrapers and scraper settings can be changed per individual Album and Artist, this table details the settings of additional scrapers used. If only the default scraper for Album and Artist are used, there are no entries here. | |||
{|class="prettytable" | |||
! Column Name || Data Type || Description | |||
|- | |||
|idSetting || integer || Primary Key | |||
|- | |||
|strScraperPath || text || Scraper details | |||
|- | |||
|strSettings || text || Scraper settings | |||
|} | |||
== path == | |||
The path of a folder containing music that has been scanned into the music library. This holds hash values of name, size, and timestamp for each folder and sub folder that is used to determine if the conents have changed and thererfore the music files need rescanning as part of library update. | The path of a folder containing music that has been scanned into the music library. This holds hash values of name, size, and timestamp for each folder and sub folder that is used to determine if the conents have changed and thererfore the music files need rescanning as part of library update. | ||
Line 531: | Line 552: | ||
{|class="prettytable" | {|class="prettytable" | ||
! Column Name || Data Type || Description |||| [[Music_tagging#Data_Kodi_Scrapes|MusicFileTag]] ** | ! Column Name || Data Type || Description |||| [[Music_tagging#Data_Kodi_Scrapes|MusicFileTag]] ** || XML Tags | ||
|- | |||
|idSong || integer || ID from song table |||| || | |||
|- | |||
|idAlbum || integer || ID from album table |||| || | |||
|- | |- | ||
| | |idPath || integer || Foreign key to [[Databases/MyMusic#path|path table]] |||| || | ||
|- | |- | ||
| | |strArtistDisp || text || Album artist(s) description (not always a concatenation of names) |||| ALBUMARTIST, <br /> | ||
ALBUMARTISTS, <br /> | |||
|| <artistdesc></artistdesc> | |||
|- | |- | ||
| | |strArtistSort || text || See: [https://musicbrainz.org/doc/Style/Artist/Sort_Name Sort Name] |||| ALBUMARTISTSORT || | ||
|- | |- | ||
|strArtists || text || Song artist(s) description (not always a concatenation of names) |||| ARTIST and ARTISTS | |strArtists || text || Song artist(s) description (not always a concatenation of names) |||| ARTIST and ARTISTS || | ||
|- | |- | ||
|strGenres || text || Song Genres (denormalised concatenation of values in genre table) |||| GENRE | |strGenres || text || Song Genres (denormalised concatenation of values in genre table) |||| GENRE || | ||
|- | |- | ||
|strTitle || varchar(512) || Song title |||| TITLE | |strTitle || varchar(512) || Song title |||| TITLE || | ||
|- | |- | ||
|iTrack || integer || Song disc (upper 4 bytes) and track number (lower 4 bytes)|||| TRACKNUMBER and <br /> DISCNUMBER | |iTrack || integer || Song disc (upper 4 bytes) and track number (lower 4 bytes)|||| TRACKNUMBER and <br /> DISCNUMBER || | ||
|- | |- | ||
|iDuration || integer || Song duration in seconds |||| | |iDuration || integer || Song duration in seconds |||| || | ||
|- | |- | ||
|iYear || integer || Songs release year |||| YEAR or DATE | |iYear || integer || Songs release year |||| YEAR or DATE || | ||
|- | |- | ||
| | |strFileName || text || Name of music file |||| || | ||
|- | |- | ||
| | |strMusicBrainzTrackID || text || Musicbrainz track ID |||| MUSICBRAINZ_TRACKID || | ||
|- | |- | ||
| | |iTimesPlayed || integer || Play count |||| || | ||
|- | |- | ||
| | |iStartOffset || integer || Start position (in seconds) when song from cuesheet |||| || | ||
|- | |- | ||
| | |iEndOffset || integer || End position (in seconds) when song from cuesheet |||| || | ||
|- | |- | ||
| | |lastplayed || varchar(20) || Date & time last played |||| || | ||
|- | |- | ||
| | |rating || float || Song rating |||| || | ||
|- | |- | ||
| | |votes || integer || Votes for song rating |||| || | ||
|- | |- | ||
| | |userrating || integer || Song rated by user (out of 10) |||| RATING || | ||
|- | |- | ||
| | |comment || text || Song description or comment |||| COMMENT || | ||
|- | |- | ||
| | |mood || text || Song mood |||| MOOD || | ||
|- | |- | ||
| | |strReplayGain || text || Contains ''album gain, album peak, track gain, track peak '' data in one string || |||| | ||
|- | |- | ||
|dateAdded || text || Music file timestamp |||| | |dateAdded || text || Music file timestamp |||| | ||
|} | |} | ||
Line 593: | Line 618: | ||
! Column Name || Data Type || Description | ! Column Name || Data Type || Description | ||
|- | |- | ||
|idArtist || integer || Foreign key to [[Databases#artist|artist table]] | |idArtist || integer || Foreign key to [[Databases/MyMusic#artist|artist table]] | ||
|- | |- | ||
|idSong || integer || Foreign key to [[Databases#song|song table]] | |idSong || integer || Foreign key to [[Databases/MyMusic#song|song table]] | ||
|- | |- | ||
|idRole || integer || Foreign key to [[Databases#role|role table]] | |idRole || integer || Foreign key to [[Databases/MyMusic#role|role table]] | ||
|- | |- | ||
|iOrder || integer || Order in artist credits | |iOrder || integer || Order in artist credits | ||
Line 611: | Line 636: | ||
! Column Name || Data Type || Description | ! Column Name || Data Type || Description | ||
|- | |- | ||
|idGenre || integer || Foreign key to [[Databases#genre | |idGenre || integer || Foreign key to [[Databases/MyMusic#genre|genre table]] | ||
|- | |- | ||
|idSong || integer || Foreign key to [[Databases#song|song table]] | |idSong || integer || Foreign key to [[Databases/MyMusic#song|song table]] | ||
|- | |- | ||
|iOrder || integer || Genre order when concatenating to single string | |iOrder || integer || Genre order when concatenating to single string | ||
Line 620: | Line 645: | ||
== | == source == | ||
List of Sources | |||
{|class="prettytable" | |||
! Column Name || Data Type || Description | |||
|- | |||
|idSource || integer || Primary Key | |||
|- | |||
|strName || text || Folder name | |||
|- | |||
|strMultipath || text || Path or multipath:// of source folder(s) | |||
|} | |||
== source_path == | |||
A source can be multi-path (made as a collection of separate folders). The source_path table holds the separate paths per individual source | |||
{|class="prettytable" | |||
! Column Name || Data Type || Description | |||
|- | |||
|idSource || integer | |||
| rowspan="2" style="text-align: left;" | Primary Key and Foreign key to [[Databases/MyMusic#source|source table]] | |||
|- | |||
|idPath || integer || | |||
|- | |||
|strPath || varchar(512) || Path to source folder | |||
|} | |||
== version == | |||
Database version | |||
{|class="prettytable" | {|class="prettytable" | ||
! Column Name || Data Type || Description | ! Column Name || Data Type || Description | ||
Line 627: | Line 684: | ||
|- | |- | ||
|iCompressCount || integer || Number of times database has been compressed | |iCompressCount || integer || Number of times database has been compressed | ||
|} | |||
== versiontagscan == | |||
Used to hold minimal scanning process related data | |||
{|class="prettytable" | |||
! Column Name || Data Type || Description | |||
|- | |||
|idVersion || integer || Keeps track of what version of db ''tag processing'' was used to populate the db | |||
|- | |||
|iNeedsScan || integer || Is set per Kodi release to indicate the minimum db version needed before a ''forced'' rescan on tags is necessary. Used when newer versions have related tag scanning changes | |||
|- | |||
|lastscanned || varchar(20) || Date & Time last scan was run. Useful because when rescanning the ids change and add-ons can check if their own data is still valid or a resync is required. | |||
|} | |} | ||
Line 633: | Line 705: | ||
{{updated| | {{updated|18}} | ||
[[Category:Index]] | [[Category:Index]] | ||
[[Category:Manual]] | [[Category:Manual]] |
Revision as of 05:27, 23 April 2019
Kodi Databases
See also: |
---|
Development Userdata |
Databases | MyMusic |
The Music Library
This database contains all information concerning music files that has been added to the Music Library. It is used in the Music portion of Kodi.
The current stable release of Kodi is using the following version of the database:
- Kodi v18 - MyMusic72.db
Warning: The databases are critical components of Kodi. We strongly urge that you do not interfere with them, unless you have knowledge and experience with database designs.
Views
Views are standard queries, often long or complicated queries saved in the database for convenience. The views below allow you to easily access all the information about songs and albums in the Music Library, across all the linking tables.
albumartistview
This table combines album with each album artist.
Column Name | Data Type | Description |
---|---|---|
idAlbum | integer | ID from album table |
idArtist | integer | ID from artist table |
idrole | integer | = 0 (fake role ID field) |
strRole | text | = "AlbumArtist" (fake role desc field) |
strArtist | varchar(256) | Artist name |
strSortName | text | See: Sort Name |
strMusicBrainzArtistID | text | Musicbrainz artist ID |
iOrder | integer | Order artist appears in credits |
albumview
A view of the album table with some additional fields aggregated from the songs of that album.
Column Name | Data Type | Description |
---|---|---|
idAlbum | integer | ID from Album Table |
strAlbum | varchar(256) | Album Name |
strMusicBrainzAlbumID | text | MusicBrainz album ID |
strReleaseGroupMBID | text | The ID that groups variations of the same release |
strArtists | text | Album artist(s) description (not always a concatenation of names) |
strArtistSort | text | See: Sort Name |
strGenres | text | Album genres (denormalised concatenation of values in genre table) |
iYear | integer | Album release year |
strMoods | text | Album moods |
strStyles | text | Album styles |
strThemes | text | Album themes |
strReview | text | Album review |
strLabel | text | Album recording label |
strType | text | Album Type e.g. "Soundtrack / Live" |
strImage | text | URLs for available remote album images |
fRating | float | Album rating |
iUserrating | integer | Album user rating (out of 10) |
iVotes | integer | Votes (for album rating) |
bCompilation | integer | Compilation flag |
bScrapedMBID | integer | Indicates if mbid(s) have been fetched by scraping or from tags |
lastScraped | varchar(20) | Date & time of last scrape |
iTimesPlayed | integer | Average of number of times songs on album are played |
strReleaseType | text | Internal type - "album" or "single" |
dateAdded | text | Music file timestamp of newest song on album |
lastPlayed | text | Last date any song on album was played |
artistview
A view of the artist table with an additional field aggregated from the songs by that artist.
Column Name | Data Type | Description |
---|---|---|
idArtist | integer | ID from artist table |
strArtist | varchar(256) | Artist name |
strSortName | text | See: Sort Name |
strMusicBrainzArtistID | text | Musicbrainz artist ID |
strType | text | Type of performer |
strGender | text | Male or Female artist |
strDisambiguation | text | See: Disambiguation Comment |
strBorn | text | Artist birthday (and place) |
strFormed | text | Band formation information |
strGenres | text | Artist genres (just text, no link to genre table) |
strMoods | text | Artist moods |
strStyles | text | Artist styles |
strInstruments | text | Artist instruments |
strBiography | text | Artist biography |
strDied | text | Date artist died (and place) |
strDisbanded | text | Band disbanded information |
strYearsActive | text | Years artist is active |
strImage | text | URLs of available artist images |
strFanart | text | URLs of available artist fanart |
bScrapedMBID | integer | Indicates if mbid(s) have been fetched by scraping or from tags |
lastScraped | varchar(20) | Date & time of last scrape |
dateAdded | text | Music file timestamp of newest song by artist |
songartistview
A view that joins song to artist and artist role.
Column Name | Data Type | Description |
---|---|---|
idSong | integer | ID from song table |
idArtist | integer | ID from artist table |
idrole | integer | ID from role table |
strRole | text | Description of role |
strArtist | varchar(256) | Artist name |
strSortName | text | See: Sort Name |
strMusicBrainzArtistID | text | Musicbrainz artist ID Hash |
iOrder | integer | Order artist appears in song credits |
songview
A view that joins song to album and path.
Column Name | Data Type | Description |
---|---|---|
idSong | integer | ID from song table |
strArtists | text | Song artist(s) description (not always a concatenation of names) |
strArtistSort | text | See: Sort Name |
strGenres | text | Song Genres (denormalised concatenation of values in genre table) |
strTitle | varchar(512) | Song title |
iTrack | integer | Song track number |
iDuration | integer | Song duration in seconds |
iYear | integer | Songs release year |
strFileName | text | Name of music file |
strMusicBrainzTrackID | text | Musicbrainz track ID |
iTimesPlayed | integer | Play count |
iStartOffset | integer | Start position (in seconds) when song from cuesheet |
iEndOffset | integer | End position (in seconds) when song from cuesheet |
lastplayed | varchar(20) | Date & time last played |
rating | float | Song rating |
userrating | integer | Song rated by user (out of 10) |
votes | integer | Votes for song rating |
comment | text | Song description or comment |
idAlbum | integer | ID from album table |
strAlbum | varchar(256) | Album title |
strPath | varchar(512) | Full path for music file |
bCompilation | integer | Compilation flag (song is on a compilation album) |
strAlbumArtists | text | Album artist(s) description (not always a concatenation of names) |
strAlbumArtistSort | text | See: Sort Name |
strAlbumReleaseType | text | Internal type - "album" or "single" |
mood | text | Song mood |
dateAdded | text | Music file timestamp |
strReplayGain | text | Contains album gain, album peak, track gain, track peak data in one string |
Return to top |
---|
Tables
album
An album. This equates to what Musicbrainz call a "release" and represents the unique release (i.e. issuing) of an item on a specific date with specific release information such as the country, label, etc. Hence album title and artist do not have to be unique as long as we have the release ID (Musicbrainz album ID), Kodi can handle different versions of the same album e.g. original release and then a later remaster (both same title and artist).
Column Name | Data Type | Description | MusicFileTag ** | NFO (xml) Tag | |
---|---|---|---|---|---|
idAlbum | integer | ID from Album Table | |||
strAlbum | varchar(256) | Album Name | ALBUM | <title></title> | |
strMusicBrainzAlbumID | text | MusicBrainz album ID | MUSICBRAINZ_ALBUMID | <musicBrainzAlbumID></musicBrainzAlbumID> | |
strReleaseGroupMBID | text | The ID that groups variations of the same release | MusicBrainz Release Group Id | <musicbrainzreleasegroupid></musicbrainzreleasegroupid> | |
strArtistDisp | text | Album artist(s) description (not always a concatenation of names) | ALBUMARTIST, ALBUMARTISTS, |
<artistdesc></artistdesc> | |
strArtistSort | text | See: Sort Name | ARTISTSORT | ||
strGenres | text | Album genres (denormalised concatenation of values in genre table) | GENRE | <genre></genre> ^^ | |
iYear | integer | Album release year | YEAR or DATE | <year></year> | |
bCompilation | integer | Compilation flag | COMPILATION | <compilation></compilation> | |
strMoods | text | Album moods | <mood></mood> ^^ | ||
strStyles | text | Album styles | <style></style> ^^ | ||
strThemes | text | Album themes | <theme></theme> ^^ | ||
strReview | text | Album review | <review></review> | ||
strImage | text | URLs for available remote album images | <thumb preview="path"></thumb> | ||
strLabel | text | Album recording label | LABEL | <label></label> | |
strType | text | Album Type e.g. "Soundtrack / Live" | RELEASETYPE | <type></type> | |
fRating | float | Album rating | <rating max="10"></rating> | ||
iVotes | integer | Votes (for album rating) | <votes></votes> | ||
iUserrating | integer | Album user rating (out of 10) | <userrating max="10"></userrating> | ||
lastScraped | text | Date/time data scraped from online sources or NFO files | |||
bScrapedMBID | integer | Indicates if mbid(s) have been fetched by scraping or from tags | |||
strReleaseType | text | Internal type - "album" or "single" | <releasetype></releasetype> | ||
idInfoSetting | integer | Indicates which scraper setting was used for that item. 0 = default scraper. Linked to infosetting table |
Notes | |
---|---|
** | MusicFileTag column shows related Vorbis/Flac tags. Click on column heading for other tag types |
^^ | Multiple entries of the XML tag are allowed |
album_artist
This table links albums to the Source folder
Column Name | Data Type | Description |
---|---|---|
idArtist | integer | Foreign key to artist table |
idAlbum | integer | Foreign key to album table |
iOrder | integer | Order of artist names for credits |
strArtist | text | Artist name (denormalised) |
album_source
This table links artists and albums
Column Name | Data Type | Description |
---|---|---|
idArtist | integer | Foreign key to source table |
idAlbum | integer | Foreign key to album table |
art
The current artwork for artists and albums
Column Name | Data Type | Description | NFO (xml) Tag | |
---|---|---|---|---|
art_id | integer | Primary Key | ||
media_id | integer | Foreign key to album or artist table | ||
media_type | text | Used in combination with media_id- "album" or "artist" | ||
type | text | art type e.g. "thumb", "fanart" etc. |
<fanart></fanart> OR <thumb></thumb> | |
url | text | URL of image (can be remote, local or music file with art embedded) |
<thumb aspect="poster" preview=""></thumb> <fanart> <thumb preview=""></thumb> </fanart> |
artist
An artist is generally a musician, group of musicians, or other music professional (like a producer or engineer). E.g. Bob Dylan, Pink Floyd, London Symphony Orchestra, Andrew Collins (producer).
Column Name | Data Type | Description | MusicFileTag ** | NFO (xml) Tag | |
---|---|---|---|---|---|
idArtist | integer | ID from artist table | |||
strArtist | varchar(256) | Artist name | ARTIST, ARTISTS, ALBUMARTIST and ALBUMARTISTS |
<name></name> | |
strMusicBrainzArtistID | text | Musicbrainz artist ID | MUSICBRAINZ_ARTISTID | <musicBrainzArtistID></musicBrainzArtistID> | |
strSortName | text | See: Sort Name | ALBUMARTISTSORT | ||
strType | text | Type of performer | <type></type> | ||
strGender | text | Male or Female artist | <gender></gender> | ||
strDisambiguation | text | See: Disambiguation Comment | <disambiguation></disambiguation> | ||
strBorn | text | Artist birthday (and place) | <born></born> | ||
strFormed | text | Band formation information | <formed></formed> | ||
strGenres | text | Artist genres (just text, no link to genre table) | <genre></genre> ^^ | ||
strMoods | text | Artist moods | <mood></mood> ^^ | ||
strStyles | text | Artist styles | <style></style> ^^ | ||
strInstruments | text | Artist instruments | <instruments></instruments> ^^ | ||
strBiography | text | Artist biography | <biography></biography> | ||
strDied | text | Date artist died (and place) | <died></died> | ||
strDisbanded | text | Band disbanded information | <disbanded></disbanded> | ||
strYearsActive | text | Years artist is active | <yearsactive></yearsactive> ^^ | ||
strImage | text | URLs of available artist images | <thumb preview=" "></thumb> ^^ | ||
strFanart | text | URLs of available artist fanart | <fanart><thumb preview=""></thumb></fanart> ^^ | ||
lastScraped | varchar(20) | Date last scraped metadata | |||
bScrapedMBID | integer | Indicates if mbid(s) have been fetched by scraping or from tags | |||
idInfoSetting | integer | Indicates which scraper setting was used for that item. 0 = default scraper. Linked to infosetting table |
Notes | |
---|---|
** | MusicFileTag column shows Vorbis/Flac tags. Click on column heading for other tag types |
^^ | Multiple entries of the tag are allowed |
audiobook
For use with Audiobooks. Holds Resume Point information only.
Column Name | Data Type | Description |
---|---|---|
idBook | integer | Id of Resume Point |
strBook | varchar(256) | Title link to album table |
strAuthor | text | Author link to artist table |
bookmark | integer | Resume Point (millisec) |
file | text | Path to audiobook |
dateAdded | varchar(20) | Date & Time bookmark created |
discography
The discography of an artist. This is returned when additional information for an artist is scraped from online sources or NFO files. It has no relationship with the albums actually in the user's music collection, it is just details about the artist.
Column Name | Data Type | Description | NFO (xml) Tag | |
---|---|---|---|---|
idArtist | integer | Foreign key to artist table | ||
strAlbum | text | Album title |
<album> <title></title> </album> | |
strYear | text | Year album released |
<album> <year></year> </album> |
genre
A music genre. This is a lookup table that enumerates the song genre values read from the genre tags embedded in music files e.g. "Progressive Rock", "Baroque" etc. But could contain anything that has been given as a "genre", and is not strictly limited to music genres.
Column Name | Data Type | Description | MusicFileTag ** | NFO (xml) Tag | |
---|---|---|---|---|---|
idGenre | integer | Primary Key | |||
strGenre | varchar(256) | Genre Name | GENRE | <genre></genre> ^^ |
Notes | |
---|---|
** | MusicFileTag column shows Vorbis/Flac tags. Click on column heading for other tag types |
^^ | Multiple entries of the tag are allowed |
infosetting
As scrapers and scraper settings can be changed per individual Album and Artist, this table details the settings of additional scrapers used. If only the default scraper for Album and Artist are used, there are no entries here.
Column Name | Data Type | Description |
---|---|---|
idSetting | integer | Primary Key |
strScraperPath | text | Scraper details |
strSettings | text | Scraper settings |
path
The path of a folder containing music that has been scanned into the music library. This holds hash values of name, size, and timestamp for each folder and sub folder that is used to determine if the conents have changed and thererfore the music files need rescanning as part of library update.
Column Name | Data Type | Description |
---|---|---|
idPath | integer | Primary Key |
strPath | varchar(512) | Media path |
strHash | text | Hash value |
role
An artist role, a way that an artist has contributed to or been involved with a song. This could be by being in the song artist credits ("artist"), as a musician ("Guitar", "Orchestra" or "vocals" etc.), as composer, conductor, lyricist etc. or involved in some other way as music professional e.g. producer, engineer, mixer etc. This is a lookup table that enumerates the various roles that have been read from tags embedded in music files.
Column Name | Data Type | Description | MusicFileTag ** | |
---|---|---|---|---|
idrole | integer | Primary Key | ||
strRole | text | Description of role |
ARTIST, ARRANGER, COMPOSER, CONDUCTOR, |
Notes | |
---|---|
** | MusicFileTag column shows Vorbis/Flac tags. Click on column heading for other tag types |
song
A song. It is the way that the individual track(s) from a music file are held in the music library. Generally a music file contains just one song, however it may contain more and have an associated cuesheet (separately or embedded) that identifies the individual tracks. A song may be from an album (the release of several tracks as one product so includes EPs etc. ), or a single. Singles from an artist (no album title given in the embedded tags) are internally linked with a fake album in the album table.
The music library can contain songs with the same title, artist credits, track number and album as long as they come from separate music files. Unexpectedly Musicbrainz Track ID is not unique on an album, recordings are sometimes repeated e.g. "[silence]" or on a disc set.
Column Name | Data Type | Description | MusicFileTag ** | XML Tags | |
---|---|---|---|---|---|
idSong | integer | ID from song table | |||
idAlbum | integer | ID from album table | |||
idPath | integer | Foreign key to path table | |||
strArtistDisp | text | Album artist(s) description (not always a concatenation of names) | ALBUMARTIST, ALBUMARTISTS, |
<artistdesc></artistdesc> | |
strArtistSort | text | See: Sort Name | ALBUMARTISTSORT | ||
strArtists | text | Song artist(s) description (not always a concatenation of names) | ARTIST and ARTISTS | ||
strGenres | text | Song Genres (denormalised concatenation of values in genre table) | GENRE | ||
strTitle | varchar(512) | Song title | TITLE | ||
iTrack | integer | Song disc (upper 4 bytes) and track number (lower 4 bytes) | TRACKNUMBER and DISCNUMBER |
||
iDuration | integer | Song duration in seconds | |||
iYear | integer | Songs release year | YEAR or DATE | ||
strFileName | text | Name of music file | |||
strMusicBrainzTrackID | text | Musicbrainz track ID | MUSICBRAINZ_TRACKID | ||
iTimesPlayed | integer | Play count | |||
iStartOffset | integer | Start position (in seconds) when song from cuesheet | |||
iEndOffset | integer | End position (in seconds) when song from cuesheet | |||
lastplayed | varchar(20) | Date & time last played | |||
rating | float | Song rating | |||
votes | integer | Votes for song rating | |||
userrating | integer | Song rated by user (out of 10) | RATING | ||
comment | text | Song description or comment | COMMENT | ||
mood | text | Song mood | MOOD | ||
strReplayGain | text | Contains album gain, album peak, track gain, track peak data in one string | |||
dateAdded | text | Music file timestamp |
Notes | |
---|---|
** | MusicFileTag column shows Vorbis/Flac tags. Click on column heading for other tag types |
song_artist
This table links songs to artists and the roles they contributed.
Column Name | Data Type | Description |
---|---|---|
idArtist | integer | Foreign key to artist table |
idSong | integer | Foreign key to song table |
idRole | integer | Foreign key to role table |
iOrder | integer | Order in artist credits |
strArtist | text | Name of artist (denormalised) |
song_genre
This table links the songs with their genres.
Column Name | Data Type | Description |
---|---|---|
idGenre | integer | Foreign key to genre table |
idSong | integer | Foreign key to song table |
iOrder | integer | Genre order when concatenating to single string |
source
List of Sources
Column Name | Data Type | Description |
---|---|---|
idSource | integer | Primary Key |
strName | text | Folder name |
strMultipath | text | Path or multipath:// of source folder(s) |
source_path
A source can be multi-path (made as a collection of separate folders). The source_path table holds the separate paths per individual source
Column Name | Data Type | Description |
---|---|---|
idSource | integer | Primary Key and Foreign key to source table |
idPath | integer | |
strPath | varchar(512) | Path to source folder |
version
Database version
Column Name | Data Type | Description |
---|---|---|
idVersion | integer | Version of the music database |
iCompressCount | integer | Number of times database has been compressed |
versiontagscan
Used to hold minimal scanning process related data
Column Name | Data Type | Description |
---|---|---|
idVersion | integer | Keeps track of what version of db tag processing was used to populate the db |
iNeedsScan | integer | Is set per Kodi release to indicate the minimum db version needed before a forced rescan on tags is necessary. Used when newer versions have related tag scanning changes |
lastscanned | varchar(20) | Date & Time last scan was run. Useful because when rescanning the ids change and add-ons can check if their own data is still valid or a resync is required. |
Return to top |
---|