Difference between revisions of "Import-export library/Music"

From Official Kodi Wiki
Jump to: navigation, search
(4 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
{{mininav|[[Music_library|Music Library]] | [[Import-export_library|Import Export Library]]}}
 
{{mininav|[[Music_library|Music Library]] | [[Import-export_library|Import Export Library]]}}
{{see also|NFO files|Artwork|HOW-TO:Backup the video library}}
+
{{see also|NFO files|Artwork|Backup}}
  
  
Line 26: Line 26:
 
:{{main|Artist information folder}}
 
:{{main|Artist information folder}}
 
{{#lst:Artist_information_folder|intro}}
 
{{#lst:Artist_information_folder|intro}}
 +
 +
{{#lst:Artist_information_folder|intro1}}
  
  
Line 55: Line 57:
 
*Exports a single ''.xml'' file saved to a destination folder specified by the user.
 
*Exports a single ''.xml'' file saved to a destination folder specified by the user.
 
*Each export is a full export. There are no incremental exports.
 
*Each export is a full export. There are no incremental exports.
*The only method to export user rating, play counts, last played and scraped ratings and votes
+
*The only method to export user rating, play counts, last played and scraped ratings and votes. Requires v18.2 or later <ref name="PR15864" />
 
*No artwork is exported.
 
*No artwork is exported.
 
*Each file is named ''kodi_musicdbyyyymmdd_hhmmss''. The date is appended to all export files, and the time is only appended to subsequent exports on the same day. <ref>https://forum.kodi.tv/showthread.php?tid=319284&pid=2644557#pid2644557</ref>
 
*Each file is named ''kodi_musicdbyyyymmdd_hhmmss''. The date is appended to all export files, and the time is only appended to subsequent exports on the same day. <ref>https://forum.kodi.tv/showthread.php?tid=319284&pid=2644557#pid2644557</ref>
Line 71: Line 73:
  
 
:;Songs
 
:;Songs
::Will export song rating and history information. This includes:
+
::Will export song rating and history information. Requires v18.2 or later <ref name="PR15864">https://github.com/xbmc/xbmc/pull/15864</ref>. This includes:
 
::*User rating  
 
::*User rating  
 
::*Scraped rating and votes
 
::*Scraped rating and votes
Line 124: Line 126:
  
 
;Include art works such as thumbnails and fanart
 
;Include art works such as thumbnails and fanart
:When enabled, will export all cached artwork
+
:When enabled this also exports all the artwork associated with the exported artists and or albums as separate image files
:{{red|If you intend to export artwork from cache, be aware of the modifications that {{kodi}} makes to cached artwork. If you have local artwork, do not export artwork.}}
+
:Note that Kodi exports the images from cache in the resolution that it uses them, and this may be lower than the original images. If you have original local artwork in higher resolutions take great care with this export option. It will overwrite these higher images if you tell it to do so and they will be lost
 +
:'''''See: [[Advancedsettings.xml#Library_artwork|Library Artwork in advancedsettings.xml]]'''''
  
 
;Overwrite existing files
 
;Overwrite existing files
Line 187: Line 190:
 
:If an artist or album has not been scraped from online or other sources, then there is no information available to export.  
 
:If an artist or album has not been scraped from online or other sources, then there is no information available to export.  
 
:Enabling this setting will force an export by creating a blank template style NFO file. This template can be used to easily add information to be refreshed into the library.
 
:Enabling this setting will force an export by creating a blank template style NFO file. This template can be used to easily add information to be refreshed into the library.
:{{red|This option has been incorrectly added to the wrong section and should be in the '''To library folders''' export as Kodi cannot read from this export folder. This will be fixed in a later release.}}
 
  
 
;Include art works such as thumbnails and fanart
 
;Include art works such as thumbnails and fanart
Line 210: Line 212:
 
*Used to add new artist folders when new music is added to your library
 
*Used to add new artist folders when new music is added to your library
 
*Requires setting the [[Artist information folder]]
 
*Requires setting the [[Artist information folder]]
 +
*Introduced in v18.2 <ref>https://github.com/xbmc/xbmc/pull/15821</ref>
  
  
Line 227: Line 230:
  
  
= Import =
+
= Import - Single File =
How you import the exported data will depend on which method you used to export.
+
<gallery mode="packed-overlay" widths="500px" heights="283px">
 
 
 
 
 
 
== Single file ==
 
<gallery mode="packed" widths="500px" heights="283px">
 
File:LibExp01.jpg|Location of options
 
 
File:LibExp06.jpg|Selecting the location of the single file
 
File:LibExp06.jpg|Selecting the location of the single file
 
</gallery>
 
</gallery>
  
 
If you exported your library using the '''Single File''' method, use the Music Library Import option to import the data
 
If you exported your library using the '''Single File''' method, use the Music Library Import option to import the data
*Select '''Import''' from the settings page as shown above
+
*Select '''Import''' from the settings page
 
*Navigate to the folder where you previously saved the single file export
 
*Navigate to the folder where you previously saved the single file export
 
*Select the appropriate ''kodi_musicdbyyyymmdd_hhmmss'' file
 
*Select the appropriate ''kodi_musicdbyyyymmdd_hhmmss'' file
Line 249: Line 246:
  
  
 
+
<!-- Not wanted by @daveblake
 
== To library folders ==
 
== To library folders ==
 
If you exported your library using the '''To library folders''' option, then use the normal scraping process to re-import the data.  
 
If you exported your library using the '''To library folders''' option, then use the normal scraping process to re-import the data.  
Line 261: Line 258:
 
== Separate Files for each items ==
 
== Separate Files for each items ==
 
This is a diagnostic type export which is not created to be imported by {{kodi}}.
 
This is a diagnostic type export which is not created to be imported by {{kodi}}.
 
+
-->
  
  

Revision as of 02:46, 21 February 2020

Import-Export Contents
Home icon grey.png   ▶ Music Library ▶ Import Export Library ▶ Music


1 Introduction

The main data in the music library comes from metadata embedded in the music files, and the export facility does not export this data at all. Likewise import will not populate an empty library as it requires scanning the music file tags into the library first. What is imported and exported is any additional artist and album information that has been previously scraped from NFO files or online sources.

The Import-Export function has been overhauled for v18 and adds more functionality and integrates the new Artist information folder.

Song history and ratings are exported when using the Single File method in v18.2 and later. advancedsettings.xml entries are not required.


2 Artist Information Folder

In v18 the concept of the Artist Information Folder is introduced as a new way to handle providing local artist artwork and information via nfo files. The Artist Information Folder is a user nominated folder that Kodi will look in first for artwork or NFO files for any artist.

This topic is of interest to those users that want to provide local artwork for artists, or capture their current artist art and additional data for transfer to another installation of Kodi

From v18 the Artist Information Folder can be used to resolve many issues with providing local art and additional information for Artists. Local artist art and nfo files can be provided without requiring a specific folder for music files, and artist NFO files can be kept separately from the music rather than jumbled with it.


3 Export

The Export and Import Library options are accessed via the Settings menu as detailed in the first image above.

The Export Library function has a number of options as depicted in the second image above. Each one is explained below.

If you intend to export artwork from cache, be aware of the modifications that Kodi makes to cached artwork. If you have local artwork, do not export artwork.

See: Artwork Cache


3.1 Single File

Summary:

  • Exports a single .xml file saved to a destination folder specified by the user.
  • Each export is a full export. There are no incremental exports.
  • The only method to export user rating, play counts, last played and scraped ratings and votes. Requires v18.2 or later [1]
  • No artwork is exported.
  • Each file is named kodi_musicdbyyyymmdd_hhmmss. The date is appended to all export files, and the time is only appended to subsequent exports on the same day. [2]


Using:

Destination folder
Enter the location where Kodi will save the single xml file.
Items to export
Select what type of information to be exported
Albums
Additional data for albums
Songs
Will export song rating and history information. Requires v18.2 or later [1]. This includes:
  • User rating
  • Scraped rating and votes
  • Last played and play count
Album artists
Will export the artist that released the album, but will not include guest or collaboration artists on the album
Song artists
Will export the guest or collaboration artists that appear on an album
Other artists
Will create folders for the remaining artists that do not fall into Album or Song artist category. This may include those artists (individual people or groups of individuals) with a specific role but not credited with being album or song artists. For example musicians, orchestra, choir, producer, lyricist, composer, DJ mixer, engineer etc.


3.2 To library folders

Note: This option requires the Artist Information Folder to be set.

See: Artist Information Folder Setting


Summary

  • Artists will be exported to the Artist Information Folder.
  • Additional Album metadata will be exported to the album folder containing the song files.
  • Disambiguation of Artists is by appending the first 4 digits of the <musicBrainzArtistID> to the folder name.
  • Disambiguation of Albums is by appending the first 4 digits of the <musicbrainzalbumid> to the folder name. [3]


Using:

Items to export
Select what type of information to be exported
Albums
Additional data for albums
Album artists
Will export the artist that released the album, but will not include guest or collaboration artists on the album
Song artists
Will export the guest or collaboration artists that appear on an album
Other artists
Will create folders for the remaining artists that do not fall into Album or Song artist category. This may include those artists (individual people or groups of individuals) with a specific role but not credited with being album or song artists. For example musicians, orchestra, choir, producer, lyricist, composer, DJ mixer, engineer etc.
Output information to NFO files
When enabled the export will create NFO files containing the metadata
Include art works such as thumbnails and fanart
When enabled this also exports all the artwork associated with the exported artists and or albums as separate image files
Note that Kodi exports the images from cache in the resolution that it uses them, and this may be lower than the original images. If you have original local artwork in higher resolutions take great care with this export option. It will overwrite these higher images if you tell it to do so and they will be lost
See: Library Artwork in advancedsettings.xml
Overwrite existing files
Affects the previous two settings
When disabled, no NFO files (and artwork if enabled) will be exported for albums and artists that already have them. Only those Albums and Artists that do not have them will recieve the export.
When enabled, all existing NFO files (and artwork if enabled) will be overwritten.


Note: When the last three settings are all disabled, the export becomes the Artist folders only type export


3.3 Separate Files for each item


Summary

  • A diagnostic export that can be used to check the status of your library without interfering with your live folders and files
  • Will not export to your existing Artist Information Folder and music sources
  • Exports to a user nominated destination
  • Kodi does not use this export in any way. It can be deleted once you have no further use for it

It will export the selected items to the user nominated Destination folder as follows:

  • Artist folder name is derived from artist name as scanned into the library
  • For each Artist, a folder will be created containing the NFO File and Artwork, if these options were enabled.
  • Album Artists will contain sub-folders for each album. The album NFO file is exported to these album sub-folders.
  • The album folder name is taken from the music folder containing the music files if there is a unique one, otherwise from the album name.
  • Collaboration albums (more than 1 album artist) are placed under the first album artist.
  • Disambiguation of Artists is by appending the first 4 digits of the <musicBrainzArtistID> to the folder name.
  • Disambiguation of Albums is by appending the first 4 digits of the <musicbrainzalbumid> to the folder name. [3]


Using:

Destination folder
Enter the location where Kodi will save the export to.
Items to export
Select what type of information to be exported
Albums
Additional data for albums
Album artists
Will export the artist that released the album, but will not include guest or collaboration artists on the album
Song artists
Will export the guest or collaboration artists that appear on an album
Other artists
Will create folders for the remaining artists that do not fall into Album or Song artist category. This may include those artists (individual people or groups of individuals) with a specific role but not credited with being album or song artists. For example musicians, orchestra, choir, producer, lyricist, composer, DJ mixer, engineer etc.
Output information to NFO files
When enabled the export will create NFO files containing the metadata
Include items that have not been scraped (to create template NFO files)
If an artist or album has not been scraped from online or other sources, then there is no information available to export.
Enabling this setting will force an export by creating a blank template style NFO file. This template can be used to easily add information to be refreshed into the library.
Include art works such as thumbnails and fanart
When enabled, will export all cached artwork
Overwrite existing files
Affects the previous two settings
When disabled, no NFO files (and artwork if enabled) will be exported for albums and artists that already have them. Only those Albums and Artists that do not have them will recieve the export.
When enabled, all existing NFO files (and artwork if enabled) will be overwritten.


3.4 Artist folders only


Summary


Using:

Items to export
Select which artists will have folders created
Album artists
Will create a folder for the artist that released the album.
Song artists
Will create a folder for guest or collaboration artists that appear on an album
Other artists
Will create folders for the remaining artists that do not fall into Album or Song artist category. This may include those artists (individual people or groups of individuals) with a specific role but not credited with being album or song artists. For example musicians, orchestra, choir, producer, lyricist, composer, DJ mixer, engineer etc.


4 Import - Single File

If you exported your library using the Single File method, use the Music Library Import option to import the data

  • Select Import from the settings page
  • Navigate to the folder where you previously saved the single file export
  • Select the appropriate kodi_musicdbyyyymmdd_hhmmss file
  • Select OK and the import process will commence
  • Once complete, your library should be functional again

Be aware:

  • if you have removed Albums or Artists since the export, the metadata for those Albums and Album Artists will be re-imported. To remove the unwanted entries, run the Clean Library option as shown in the above image.



5 References



Return to top