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

From Official Kodi Wiki
Jump to navigation Jump to search
(v20 changes)
 
Line 15: Line 15:


= Watched, PlayCount, ResumePoints =
= Watched, PlayCount, ResumePoints =
{{warning|From v20 Nexus the <importwatchedstate> and <importresumepoint> settings have been reversed. It is no longer necessary to add these tags to allow import of that data. That data will be imported by default. The tags are only required to exclude the importing of that particular data.<ref>https://github.com/xbmc/xbmc/pull/20842</ref> If these tags are already present in your advancedsettings.xml file, there is no issue if they remain.}}
By default {{kodi}} will export all data in the MyVideosxxx.db.
By default {{kodi}} will export all data in the MyVideosxxx.db.


Line 126: Line 128:
</gallery>
</gallery>


= References =
<references />





Latest revision as of 18:50, 15 January 2022

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


1 Watched, PlayCount, ResumePoints

Stop hand.png From v20 Nexus the <importwatchedstate> and <importresumepoint> settings have been reversed. It is no longer necessary to add these tags to allow import of that data. That data will be imported by default. The tags are only required to exclude the importing of that particular data.[1] If these tags are already present in your advancedsettings.xml file, there is no issue if they remain.


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

Stop hand.png This method is not the recommended export method. Do not use this method unless you have a specific need to do so and understand the following limitations:
  • If you rearrange files and folders after the export, the export still contains the original paths which will be imported creating dead library entries
  • Unless you are using Absolute file paths, you cannot build a new library on a different Kodi installation
  • URL's to remote artwork are rewritten to the location of the export folder. You will be unable to change artwork using the "Choose Art" option, and if the export folder is deleted (which contains the exported artwork) the artwork will slowly disappear from the library

Use the Separate Files method detailed in the previous section


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.



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.



4 References



Return to top