Import-export library: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
(29 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{mininav|[[General topics]]|[[Video library|Videos]]{{l2|[[Music/Audio]]}}|[[Video library/Management|Management]]<br />&nbsp;}}
{|class="infobox" style="width:200px"
{{see also|NFO files|HOW-TO:Backup the library}}
! Import-Export Contents
<section begin="intro" />Kodi offers the capability to import and export data manually into/from the [[Library|Media Library]], as well as importing media info automatically from [[NFO files|.nfo files]].<section end="intro" />
|-
|
* '''[[Import-export_library|Import-Export]]'''
** '''[[Import-export_library/Music|Music Library]]'''
** '''[[Import-export_library/Video|Video Library]]'''
* '''[[HOW-TO:Create_Music_Library|Return to Music Guide]]'''
* '''[[HOW-TO:Create_Video_Library|Return to Video Guide]]'''
|}


== Import / Export options ==
{{mininav|[[Video_library|Video Library]]{{l2|[[Music_library|Music Library]]}}}}
The Import / Export options can be found in Relevant [[Music Settings|Music]] / [[Videos Settings|Videos]] Settings.
{{see also|NFO files|Artwork|Backup}}


'''Video Library:'''<br />
=== Export Video Library ===
:Exports the Library [[The Kodi Database|database]] to either one, or multiple XML files. When you initiate an export, Kodi will ask if you want to export to separate or a single file.


==== Exporting to one single file ====
When '''exporting to a single file''' Kodi will bring up a browser dialog where you select where you want it exported. Kodi will then create a subdirectory with the resulting xml file plus all [[thumbnails]] and [[fanart]], watched status will be exported to the xml file.
{{note|Exporting to a single file is discouraged in Frodo and higher, as there is a big issue with artwork. It changes the artwork location URL to the folder location of the export, which causes problems when you want to redownload the information.}}


==== Exporting to separate files ====
= Introduction =
If you choose to '''export to separate files''' you will also be asked if you want to export [[thumbnails]] and [[fanart]] as well.
<section begin="intro" />Kodi has the option to Export and Import the library databases. These options may be used for a number of reasons including the following more popular ones:
::The resulting XML .nfo file and associated image files will then be exported to the location of the corresponding video files.
*Perform database backup and recovery
They will be automatically used when scraping for information, you do not need to import anything from this menu.
*Reorganization of data or eliminate database fragmentation {{resize|0.8em|(export, clean/remove database, re-import)}}
::{{tip|For more info see '''[[NFO files]]'''}}
*Move data between Kodi databases on different platforms {{resize|0.8em|(eg Widows to Linux)}}<section end="intro" />


=== Import Video Library ===
:Imports an exported single XML file into the Library database. If the entry does not exist it is appended.
:If it exists:
# It removes all current info for that entry from the database.
# Inserts the info for that entry from the XML file.


If you wish to import a movie, TV show, music video or episode into the library, use the corresponding format in the exported xml file and enclose it with the <videodb></videodb> tags. Examples can be seen below, as .nfo files.}}


=== Music Library: ===
= Music Library =
==== Export Music Library ====
This page details how to Import and Export the Music Library.
:Exports the Library [[The Kodi Database|database]] to either one, or multiple XML files. When you initiate an export, Kodi will ask if you want to export to separate or a single file.
:If you choose to export to separate files you will also be asked if you want to export [[thumbnails]] and [[fanart]] as well.
:The resulting XML .nfo files and associated image files will then be exported to the location of the corresponding music files.


==== Import Music / Video Library ====
'''''See: [[Import-export_library/Music| Import-Export Music lIbrary]]'''''
:Imports a XML file into the Library database. If the entry does not exist it is skipped.
:If it exists:
# It removes all current info for that entry from the database.
# Inserts the info for that entry from the XML file.


{{note|To import an exported music library you must scrape your music source prior to importing the library.  The music library import will populate the extended meta-data such as artist or album info which is not contained in the music tags.}}


== Video and music .nfo Files ==
{{Main|NFO files}}
Nfo files can be used to provide data for a video file in Kodi or influence the search behaviour of scrapers. In particular they are helpful if the information fetched from a web site does not match the video file, or data for that particular file does not exist.


By default at the time of scanning, if the media folder contains a correctly named *.nfo file, then Kodi will load the *.nfo file and attempt to either, in the case of it containing XML data get the meta-data directly from the .nfo file or will parse it for a direct URL to the scraper info page. This allows Kodi to skip its normal lookup and/or search procedures; this is useful if a file's information is not available on any of the scraper sites or if the file-matching criteria fail for the particular file.
= Video Library =
This page details how to Import and Export the Video Library which consists of:
*'''Movies'''- Metadata and artwork
*'''TV Shows'''- Metadata and artwork
*'''Music Videos'''- Metadata and artwork


{{tip|See '''[[NFO files|Creating NFO files]]'''}}
'''''See: [[Import-export_library/Video| Import-Export Video lIbrary]]'''''


== Importing library information from "My Movies" media management software ==
[http://www.mymovies.dk/ My Movies (www.mymovies.name)] is an online database for profiling DVD-Video movies. [http://www.mymovies.dk/ My Movies] saves an XML file and a poster cover image which with this patch will get scanned by Kodi in the same way as Kodi's own XML formatted NFO files are scanned/scraped.


Kodi has the ability to get the import movie library information from "[http://www.mymovies.dk/ My Movies]" via the mymovies.xml files that it generates, these mymovies.xml are checked after the movie.nfo file.
'''Note:''' You cannot selectively Import or Export parts of the database.


== Additional information ==
Additional information on how to add format-tags for text and labels (Eg. '''Bold''', ''Italic'') can be found under [[Label Formatting]]


== Watched status ==
Too keep your watched status when importing the library, add this to your [[advancedsettings.xml]] file in the [[userdata folder]]:


<pre>
= A Note on Artwork =
<advancedsettings>
    <videolibrary>
          <importwatchedstate>true</importwatchedstate>
    </videolibrary>
</advancedsettings>
</pre>


The optimized image from {{Kodi}}'s [[Artwork/Cache]] is exported, rather than the original full-quality image, so it is best to avoid exporting artwork if at all possible.


{{Helix updated}}
An easily understandable explanation of the effects of these optimizations can be located in the [https://forum.kodi.tv/showthread.php?tid=315806&pid=2599318#pid2599318 forum here].


[[Category:Scraper]]
 
 
 
{{top}}
{{updated|19}}
 
[[Category:Karellen]]
[[Category:Music library]]
[[Category:Video library]]
[[Category:Video library]]
[[Category:Music library]]
[[Category:Manual]]
[[Category:Advanced topics]]

Revision as of 09:21, 20 July 2021

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


Introduction

Kodi has the option to Export and Import the library databases. These options may be used for a number of reasons including the following more popular ones:

  • Perform database backup and recovery
  • Reorganization of data or eliminate database fragmentation (export, clean/remove database, re-import)
  • Move data between Kodi databases on different platforms (eg Widows to Linux)


Music Library

This page details how to Import and Export the Music Library.

See: Import-Export Music lIbrary


Video Library

This page details how to Import and Export the Video Library which consists of:

  • Movies- Metadata and artwork
  • TV Shows- Metadata and artwork
  • Music Videos- Metadata and artwork

See: Import-Export Video lIbrary


Note: You cannot selectively Import or Export parts of the database.


A Note on Artwork

The optimized image from Kodi's Artwork/Cache is exported, rather than the original full-quality image, so it is best to avoid exporting artwork if at all possible.

An easily understandable explanation of the effects of these optimizations can be located in the forum here.



Return to top