Skip to content

Tools1000/drkodi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dr.Kodi

Build Latest Release Release Date License

Maintainability Rating Security Rating Vulnerabilities Lines of Code

Minimalistic Media Library Tool

Dr.Kodi helps you to inspect and partly correct a Kodi media library.

Kodi media player expects the library set up to be as follows (taken from Kodi Wiki):

  • Each movie is saved in its own folder within the Source. All files and folders should be simply named with the name of the movie and the year in brackets. The name should match the name shown at the scraper site.
  • Each movie file is placed into its own folder which is then added to your Source.
  • Placing movies in their own folder allows saving of local artwork and NFO files alongside the movie file.
  • Using this method will provide the safest and most accurate scrape of your media collection.
  • Most library related add-ons will only work correctly with this method.

Since Dr.Kodi does look up all information by itself or reads it from an existing NFO file, folder naming can be less strict.

Checks

The following checks are performed. For most, an automatic fix is offered.

  1. The path should be a directory and not a file (see Flat Folder (https://kodi.wiki/view/Naming_video_files/Movies). Dr.Kodi offers a quick fix to wrap the media file into a directory of the same name.
  2. The directory should not be empty and should contain at least one media file.
  3. The media file (or multiple files, see Split Video Files (https://kodi.wiki/view/Naming_video_files/Movies)) needs to have the same name as the folder.
  4. The directory should not have subdirectories (e.g., a Subs folder containing subtitles is not supported).

Those basic checks can be performed offline and without the presence of an NFO file (see https://kodi.wiki/view/NFO_files). For the following checks, information from an NFO file is considered as well.

  1. The folder name should match the normalized NFO's movie title.
  2. The NFO's movie year (release year) should match the folder's movie year (folder naming pattern: The Matrix (1998), see Naming (https://kodi.wiki/view/Naming_video_files/Movies))

Example Walk-through for a Movies Library

We start with a very small library that contains one movie. The 'library' is just the parent folder, in this case Movies.

Screenshot 2023-01-08 at 10 03 26

We Drag & Drop it into the Main View. After selecting 'die hard.mkv', details are shown on the right.

Screenshot 2023-01-08 at 10 07 51

Not a directory warning is shown and a quick-fix is offered. Applying the fix will wrap the media file in a directory of the same name.

Screenshot 2023-01-08 at 11 01 26

After applying the fix the normalized movie title is used to query themoviedb to complete movie meta data. Search results are shown below the information that is already present. If Dr.Kodi detects a non-default locale, every search result is presented in the default locale (en) and as well in the current locale. In this case, an additional, localized search result is presented.

en locale de locale
Screenshot 2023-01-08 at 11 25 07 Screenshot 2023-01-08 at 11 24 39

After taking over a search result, the movie meta data is stored as an NFO file inside the directory.

Screenshot 2023-01-08 at 11 26 18

Folder year does not match warning is shown and a quick-fix is offered. Applying the fix will rename the directory after the movie title plus year (folder naming pattern: Die Hard (1988), see Naming (https://kodi.wiki/view/Naming_video_files/Movies)).

Screenshot 2023-01-08 at 13 20 08

Screenshot 2023-01-08 at 13 20 53

Screenshot 2023-01-08 at 13 23 58

Title Normalization

Normalization Examples

  • Screenshot 2023-01-08 at 13 11 34

'Input' string, i.e., the 'unnormalized' query string is Der.Schatzplanet.2002.German.DL.1080p.BluRay.x264-ENCOUNTERS. The normalized string, that is used to query themoviedb is Der Schatzplanet.

  • Screenshot 2023-01-08 at 13 14 18

'Input' string, i.e., the 'unnormalized' query string is Coming.Home.for.Christmas.Eine.Familie.zur.Bescherung.German.2013.AC3.DVDRiP.x264-SAViOUR. The normalized string, that is used to query themoviedb is Coming Home for Christmas Eine Familie zur Bescherung.

themoviedb Lookup

If data is incomplete, the normalized movie title is used to query theMovieDB. Found results are displayed and the user might choose any of those suggestions to take over the according information. Localized titles are suggested depending on your [locale setting](link to locale).