Skip to content

KODI video library

Markus edited this page Jun 5, 2022 · 24 revisions

Steps to add the VDR recordings to the KODI library

Kodi settings

  • Enable "Show hidden files and directories" in Settings -> Media -> General
  • Enable "Combine split video items" in Settings -> Media -> Videos

Categorize the VDR recordings

Install the vdr plugin https://github.com/MarkusEh/vdr-plugin-tvscraper and scrape the recordings with this plugin. If this is not possible, or you need more options: Read 'Categorize the VDR recordings (advanced)' (see below).
Note: KODI scrapers require all movies in one folder, and all TV shows in another folder. The plugin will take care of this, based on information from vdr-plugin-tvscraper.

Create files required by the KODI scraper

In this KODI plugin, use the context menu (menu entry "Add all recordings to Library") of any folder to create the .strm files. .strm files of all your VDR recordings will be created, regardless of the folder you you are currently in. Locations of the created .strm files:

  • special://userdata/addon_data/plugin.video.vdr.recordings/Movies
  • special://userdata/addon_data/plugin.video.vdr.recordings/TV shows
  • special://userdata/addon_data/plugin.video.vdr.recordings/Music videos

See https://kodi.wiki/view/Special_protocol for default OS mappings. For linux, this is (default mapping):

  • ~user/.kodi/userdata/addon_data/plugin.video.vdr.recordings/Movies
  • ~user/.kodi/userdata/addon_data/plugin.video.vdr.recordings/TV shows
  • ~user/.kodi/userdata/addon_data/plugin.video.vdr.recordings/Music videos

Here, user is the user ID of the user who started KODI. ~user is the home directory of this user.

Add these paths to your video library and scrape

The file names match the movie titles, not the folder names. So keep the default KODI setting during scraping.
For each scraper, go to the scraper settings and select your language (the default is en, not your UI language).
For best results, use the TVDB scraper for TV shows.

That's all. In case of new/changed/deleted VDR recordings, use the context menu (menu entry "Add all recordings to Library") again to update the .strm files and the KODI libraries.

Advanced options:

Categorize the VDR recordings (advanced)

tvscraper support:

Use of https://github.com/MarkusEh/vdr-plugin-tvscraper is recommended. This plugin will use information like text in subtitle, description, ... to find the correct movie / TV show. Automated detection (movie or TV show) is supported, as well as finding the season and episode numbers. Such information is passed to the KODI scraper. As a result, no manual categorization (as described below) is required for movies / TV shows, if you use vdr-plugin-tvscraper.

Music videos:

If you have music videos, make sure to not mix them with other recordings in one folder. Mark all folders containing music videos using the context menu. No automated detection. No detection by vdr-plugin-tvscraper. Manual activity is required.

TV shows:

If you have vdr-plugin-tvscraper, normally no manual activity is required. If you don't have vdr-plugin-tvscraper, or the vdr-plugin-tvscraper data are wrong:

If you have TV shows, make sure to not mix them with other recordings in one folder. The plugin will automatically add SxxExx to the title of each TV show. If this is missing, mark the folder using the context menu. The SxxExx values are automatically created based on the recording time, starting with S01E01 for the first recording in the folder. If this is wrong, you can manually set the season and / or episode number for each recording. SxxExx of subsequent recordings will be updated automatically.

Movies:

This is the default. Except for folders, that only contain recordings with the same title. If this happens for a movie, for example because you recorded the same movie twice, you can change the content type of the folder with the context menu.

Further notes

The manual set information (folder content type, season and episode number) is saved in the VDR directory structure in files named "kodi". For that, you need write authorization in the VDR directory structure. There will be no other changes in the VDR directory structure.

File structures as required by KODI (https://kodi.wiki/view/Naming_video_files) are created. Note: The VDR files will neither be copied nor be moved, just .strm files or symbolic links pointing to the actual video files will be created.