Import-export library: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Sho
(→‎Video File nfo as an XML file: Stacking clarification)
m (Updated for v20)
 
(177 intermediate revisions by 37 users not shown)
Line 1: Line 1:
XBMC offers the capability to import and export data manually into/from the  [[Library|Media Library]].
{|class="infobox" style="width:200px"
! Import-Export Contents
|-
|
* '''[[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_XBMC_Database|database]] to an XML file.
;Import Video Library
:Imports an 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.


*'''Note:''' 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:'''<br>
= Introduction =
;Export Music Library
<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:
:Exports the Library [[The_XBMC_Database|database]] to XML files.
*Perform database backup and recovery
;Import Music / Video Library
*Reorganization of data or eliminate database fragmentation {{resize|0.8em|(export, clean/remove database, re-import)}}
:Imports a XML file into the Library database. If the entry does not exist it is skipped.
*Move data between Kodi databases on different platforms {{resize|0.8em|(eg Widows to Linux)}}<section end="intro" />
:If it exists:
#It removes all current info for that entry from the database.
#Inserts the info for that entry from the XML file.


==Video nfo Files==
Nfo files can be used to provide data for a video file in XBMC or influence the search behavior of scrapers. In particular they are helpful if a search for the video file does not return the correct one, 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 XBMC will load the *.nfo file and attempt to either get the metadata directly from the file (in the case of it containing XML data) or will parse it for a direct URL to the scraper info page.  This allows XBMC to skip it's normal lookup and/or search procedures, useful if a file's information is not available on any of the scraper sites, or if the filematching criteria fails for the particular file.


===The Different nfo Options:===
= Music Library =
This page details how to Import and Export the Music Library.


====Video File nfo as an XML file====
'''''See: [[Import-export_library/Music| Import-Export Music lIbrary]]'''''
1.  The *.nfo file is an XML file containing the data directly.


'''Movie Example:'''<br>
The *.nfo must be named exactly the same as the video file it is representing (ei. '''moviename.avi''' and '''moviename.nfo'''), allowing multiple video and *.nfo files within the same folder. In the case of multi-part (stacked) video [[stacking]], name the file either '''moviename.nfo''' or '''moviename-CD1.nfo''' where the first filename is '''moviename-CD1.avi'''.


<xml>
    <movie>
        <title>Who knows</title>
        <rating>6.100000</rating>
        <year>2006</year>
        <top250>0</top250>
        <votes>50</votes>
        <outline>A look at the role of the Buckeye State in the 2004 Presidential Election.</outline>
        <plot>A look at the role of the Buckeye State in the 2004 Presidential Election.</plot>
        <tagline></tagline>
        <runtime>90 min</runtime>
        <thumb>http://ia.ec.imdb.com/media/imdb/01/I/25/65/31/10f.jpg</thumb>
        <mpaa>Not available</mpaa>
        <watched>false</watched>
        <imdbnumber>tt0432337</imdbnumber>
        <filenameandpath>c:\Dummy_Movie_Files\Movies\...So Goes The Nation.avi</filenameandpath>
        <genre></genre>
        <credits></credits>
        <director>Adam Del Deo</director>
        <actor>
            <name>Paul Begala</name>
            <role>Himself</role>
        </actor>
        <actor>
            <name>George W. Bush</name>
            <role>Himself</role>
        </actor>
        <actor>
            <name>Mary Beth Cahill</name>
            <role>Herself</role>
        </actor>
        <actor>
            <name>Ed Gillespie</name>
            <role>Himself</role>
        </actor>
        <actor>
            <name>John Kerry</name>
            <role>Himself</role>
        </actor>
    </movie>
</xml>


'''TV Show Example:'''<br>
= Video Library =
The filename of the NFO should be TVShow.nfo and it should be in the root folder of the TV show episodes.
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


<xml>
'''''See: [[Import-export_library/Video| Import-Export Video lIbrary]]'''''
    <tvshow>
        <title>MyTV Show</title>
        <rating>9.900</rating>
        <year>2000</year>
        <top250>0</top250>
        <episode>24</episode>
        <votes></votes>
        <outline></outline>
        <plot>The best TV show in the world<plot>
        <tagline></tagline>
        <runtime></runtime>
        <genre>Action and Adventure / Drama</genre>
        <credits></credits>
        <director></director>
        <premiered>2000-01-01</premiered>
        <status></status>
        <code></code>
        <aired></aired>
        <studio></studio>
        <album></album>
        <trailer></trailer>
        <actor>
            <name>Big John</name>
            <role>Jack of all trades</role>
            <thumb></thumb>
        </actor>
    </tvshow>
</xml>


'''TV Episode Example:'''<br>
The *.nfo must be named exactly as the episode filename (i.e. '''episodename.avi''' and '''episodename.nfo''') and in the same folder, allowing multiple episode and *.nfo files within the same folder.


<xml>
'''Note:''' You cannot selectively Import or Export parts of the database.
    <episodedetails>
        <title>My TV Episode</title>
        <rating>10.000000</rating>
        <season>2</season>
        <episode>1</episode>
        <plot>he best episode in the world<plot>
        <actor>
            <name>Little Suzie</name>
            <role>Pole jumper/dancer</role>
        </actor>
    </episodedetails>
</xml>


'''Music Video Example:'''<br>
The filename of the NFO should be the same as the music video file, only replacing the original extension with .nfo.<br>
i.e. '''Bestartistintheworld - Bestsongintheworld.avi''' should have the corresponding nfo filename '''Bestartistintheworld - Bestsongintheworld.nfo'''.


<xml>
    <musicvideo>
        <title>Bestsongintheworld</title>
        <artist>Bestartistintheworld</artist>
        <album>Me</album>
        <genre>Pop</genre>
        <runtime>3:20</runtime>
        <plot>Scantly clad women hoing about</plot>
        <year>2000</year>
        <director>and I</director>
        <studio>Ego prod.</studio>
    </musicvideo>
</xml>


====Nfo containing an URL====
= A Note on Artwork =
2.  The *.nfo file contains a URL of the information page to scrape.
The file can include other information (i.e. scene info), XBMC will scan through it and use a relevant URL if a match is found.


The scraper tries to match url's to all scrapers of the content type a dir is set to. E.g. if you set the content type to movies all movie scrapers check nfo files for a matching url. This means that nfo's override the scraper setting. I.e. a directory is set to use the imdb scraper but you have a german movie in it. Simply create a nfo for that movie with the ofdb link in it and you are sorted!
Cached artwork is an optimized version of the original image and this is what {{kodi}} exports, rather than the original full-quality image, so it is best to avoid exporting artwork if at all possible.


'''Movie Example:'''<br>
To download original artwork to save locally use one of the following addons...
Moviename.nfo where Moviename is the name of the movie file that points to a movie on [[IMDb (Video Library)|IMDb]].
* '''[https://forum.kodi.tv/showthread.php?tid=360078 Artwork Dump]'''- for v19 and later
<nowiki>http://www.imdb.com/title/tt0333766</nowiki>
* '''[https://forum.kodi.tv/showthread.php?tid=258886 Artwork Beef]'''- for v18 and earlier


'''TV Show Example:'''<br>
An 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].
TVShow.nfo in the root folder of the TV Show that points to a show on [[TheTVDB.com (Video Library)|TVDB.com]].
<nowiki>http://thetvdb.com/index.php?tab=series&id=73545</nowiki>


'''TV Episode Example:'''<br>
Episodename.nfo where Episodename is the name of the episode file.<br>
'''Not currently supported!'''
<nowiki>http://thetvdb.com/?tab=episode&seriesid=73545&seasonid=5950&id=117847&lid=7</nowiki>


'''Music Video Example:'''
<nowiki>http://www.mtv.com/overdrive/?artist=983&vid=222165</nowiki>


==Music nfo Files==
To be addressed


[[category:Incomplete]]
{{top}}
[[category:Scraper]]
{{updated|20}}
 
[[Category:Karellen]]
[[Category:Music library]]
[[Category:Video library]]

Latest revision as of 21:58, 7 February 2023

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

Cached artwork is an optimized version of the original image and this is what Kodi exports, rather than the original full-quality image, so it is best to avoid exporting artwork if at all possible.

To download original artwork to save locally use one of the following addons...

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



Return to top