Import-export library/Video

From Official Kodi Wiki
Jump to: navigation, search
Import-Export Contents
Home icon grey.png   ▶ Video Library ▶ Import Export Library ▶ Video


1 Watched, PlayCount, ResumePoints

By default Kodi will export all data in the MyVideosxxx.db.

The Watched Status, Play Counts and Resume Points are not imported by default. By pasting the following code to the advancedsettings.xml file, any or all three items can be imported. Do not duplicate the <advancedsettings> tags if you already have the advancedsettings.xml file.

false = Not imported
true = Imported
See also: Advancedsettings.xml
 <advancedsettings>
    <videolibrary>
       <exportautothumbs>false</exportautothumbs>      <!-- Export auto-generated thumbs. Default = false. Change to true to allow export -->
       <importwatchedstate>false</importwatchedstate>  <!-- Import Last Played and Play Counts. Default = false. Change to true to allow import -->
       <importresumepoint>false</importresumepoint>    <!-- Import Resume Points. Default = false. Change to true to allow import -->
    </videolibrary>
 </advancedsettings>


2 Export

In settings, select Export library as shown in the first image. You will be required to choose the Export method as depicted in the second image.

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


2.1 Separate Files

This option will export the metadata stored in the database and save it as a nfo file. It will be saved to the same directory where that particular Movie/TV Show/Episode/Music Video is located.

  • After selecting Separate, you will then be asked if you would like to Export thumbnails and fanart?. This will export all artwork that has been cached.
    • Choosing Yes will save a copy of the cached artwork into the Movie, TV Show, TV Show Episode and Music Video directory alongside the video file and the nfo file.
    • Choosing No will not export artwork
Note 1: Exported artwork will use the long name format of <videofilename>-<artworktype>.<ext> eg- Lucy (2014)-poster.jpg
Note 2: If you use local artwork, do not export artwork as your original artwork may be overwritten with an inferior copy or duplicated if you use the short name format.
  • If you selected Yes to the previous option you will be asked Export Actors Thumbs?.
    • Choosing Yes will export a copy of the Actors artwork in a directory named .actors
    • Choosing No will not export a copy of the Actors artwork
  • The final option is Overwrite Old Files?.
    • Choosing Yes will overwrite the existing nfo files and artwork (if selected). This is useful if you have modified your metadata such as changed the artwork, created or modified movie sets, etc. Any movies/tv shows/music videos that were not present since the last Export will have the nfo and artwork exported to their directory.
    • Choosing No will add nfo files and artwork to those movies/tv shows/music videos that do not already have them. eg they are new and added after the last export. If you made changes to a movie/tv show/music video that already has an nfo created, these changes will not be exported.
    • If this is the first time this option has been run and/or you have no nfo files and artwork saved in your movie/tv show/music video directories, both choices will have the same result.

The Export will commence immediately once the final option is selected. An onscreen progress bar will indicate progress.


2.2 Single File

Note: Do not use this option if you have changed, or intend to change, the filenames or paths of your video files after running the Export. Doing so will leave you with a dead library. The data will be imported but Kodi will not be able to locate the moved files. Use the Separate files method instead.

This option will export all metadata and all artwork to a single directory, to a location nominated by the user, as follows:

  • The only option available is the save location which you will be prompted and required to enter
  • Kodi will create a directory in your selected location named xbmc_videodb_yyyy-mm-dd
  • Library metadata will be saved into a single videodb.xml file within that directory
  • Artwork will be saved within multiple sub-directories according to type
  • Subsequent exports will not overwrite existing Single File exports
  • Subsequent exports are full exports. They are not incremental exports.

Note: The Single File Export process changes the artwork location URL to the folder location of the export, which causes an issue if you need to refresh the image.


3 Import

Which Import method you use will depend on which Export method was used:


3.1 Separate Files

If you exported your library using the Export to Separate Files option, then you must use the normal scraping process to re-import the data from the NFO Files. eg Update Library option.

See:Adding or Removing Videos


3.2 Single File

If you exported your library using the Export to Single File option, you will need to use this method to import the data as follows


Note: The media Sources must be set before attempting the Import. See: Adding_video_sources

Note: If you have removed media from the library since the export, the media will be imported into the library. You will need to run a Clean Library to remove them.





Return to top