Import of movie names from custom directory layout
#1
TL;DR

I have a custom directory layout and naming scheme for my movie collection:

Code:
CATEGORY/LANGUAGE/SET/SOURCE_TYPE/[SOURCE_ID] SOURCE_TITLE (YEAR)/PART_ID/CONTENT
  • CATEGORY: e.g. fictional, non-fictional, show, music video
  • LANGUAGE: (main) language
  • SET: (optional) name of a set that groups several movies logically
  • SOURCE_TYPE: e.g. DVD, BD, TV, YouTube
  • SOURCE_ID: ID of the original source (e.g. publisher + catalog id, TV channel + date, YouTube ID)
  • SOURCE_TITLE: title of the original source (e.g. movie or box set)
  • YEAR: (optional) year of the release of the original source
  • PART_ID: ID or name of one part, which may be one single movie, several movies (TV series) or part of a movie (spanning multiple discs)
  • CONTENT: the actual data, either as directory (DVD, BD, SVCD), single file or multiple files
Unfortunately, this layout seems to be too complicated for use with Kodi because only the name of a file or its parent directory is used to identify a movie.

How can I best import my data into Kodi without renaming or moving files?

Currently, I have the following ideas:
  1. Create a feature request to support the full file path for movie- & folderstacking
  2. Write a script that generates NFO files from the directory layout
  3. Write a scraper

Comments? Ideas? What is the "Kodi" way to solve this problem?


The full story

I try to keep every file in its original format and to avoid format conversion wherever possible. I chose the above directory scheme to support this. It may look quite complicated, but it's universal enough to cover everything that I own, e.g. rips of physical discs, TV recordings, downloads and self-made videos. See down for some examples.

For TV series with multiple episodes per disc, I created a second directory hierarchy with 1 symbolic directory link per episode, e.g.
TV Series/Fictional/German/Columbo/Season 1/Episode 5 is a symbolic link to Movies/Fictional/German/Columbo/DVD/[Universal - 823 041 9] Die komplette erste Staffel (2005)/DVD 1.

OK, now I have this universal but proprietary directory layout. I've been using MediaPortal in the past, and it was possible to import my data using some plugins, scrapers and a little bit of manual work. I didn't find a way to achieve this in Kodi yet.

I activated Settings / File lists / Combine split video items and tried Movies are in separate folders that match the movie title. I've browsed through the forum, read about Naming video files, Moviestacking and Folderstacking and tried some regular expressions. If I understand it right, Kodi uses either the name of a file or its parent directory to identify a movie. Unfortunately this is not enough for my use case, I need at least a regular expression on the complete file path. I'm not sure if this would be enough for all cases (see example "Der Herr der Ringe" below) but I hope these exotic cases could be handled by a NFO file.

Examples

Blu-ray:
Code:
Movies/Fictional/German/-/BD/[Brainpool 88843052679] Stromberg Der Film/BD 1/BDMV/STREAM/00000.m2ts
DVD:
Code:
Movies/Fictional/German/-/DVD/[Constantin - 74321 89686 9] The Score (2002)/DVD 1/VIDEO_TS/VIDEO_TS.IFO
DVD-Box:
Code:
Movies/Fictional/German/-/DVD/[Columbia - 70103] Montys EnzykloPythonia (2003)/DVD 1 - Das Leben des Brian/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/-/DVD/[Columbia - 70103] Montys EnzykloPythonia (2003)/DVD 2 - Ritter der Kokosnuss/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/-/DVD/[Columbia - 70103] Montys EnzykloPythonia (2003)/DVD 3 - Ritter der Kokosnuss (Bonus Disc)/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/-/DVD/[Columbia - 70103] Montys EnzykloPythonia (2003)/DVD 4 - Der Sinn des Lebens/VIDEO_TS/VTS_01_0.IFO
DVD-Box with disc spanning:
Code:
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15527] Der Herr der Ringe - Die Gefährten (2001)/DVD 1 Seite A/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15527] Der Herr der Ringe - Die Gefährten (2001)/DVD 1 Seite B/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15527] Der Herr der Ringe - Die Gefährten (2001)/DVD 2/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15528] Der Herr der Ringe - Die zwei Türme (2002)/DVD 1 Seite A/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15528] Der Herr der Ringe - Die zwei Türme (2002)/DVD 1 Seite B/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15528] Der Herr der Ringe - Die zwei Türme (2002)/DVD 2/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15529] Der Herr der Ringe - Die Rückkehr des Königs (2003)/DVD 1 Seite A/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15529] Der Herr der Ringe - Die Rückkehr des Königs (2003)/DVD 1 Seite B/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Der Herr der Ringe/DVD/[Warner - Z5 Y15529] Der Herr der Ringe - Die Rückkehr des Königs (2003)/DVD 2/VIDEO_TS/VIDEO_TS.IFO
TV:
Code:
Movies/Fictional/German/-/TV/[2011-11-27 ProSieben] Das Experiment/FILE/Das Experiment.ts
Movies/Fictional/German/-/TV/[2002-01-12 ProSieben] Event Horizon/SVCD 1/MPEG2/AVSEQ01.MPG
TV series:
Code:
Movies/Fictional/German/Columbo/DVD/[Universal - 823 041 9] Die komplette erste Staffel (2005)/DVD 2/VIDEO_TS/VIDEO_TS.IFO
Movies/Fictional/German/Columbo/TV/[ORF1] Alter schützt vor Torheit nicht/FILE/S2E4_Part1 Alter schützt vor Torheit nicht.mpg
Movies/Fictional/German/Columbo/TV/[ORF1] Alter schützt vor Torheit nicht/FILE/S2E4_Part2 Alter schützt vor Torheit nicht.mpg
Movies/Fictional/German/Es war einmal... das Leben/YouTube/[o8xpXlZ-COg] Die Zelle/FILE/S01E01 Die Zelle.mp4
Movies/Fictional/German/Mega Man/VHS/[ProSieben Entertainment - 70007-3] Aller Anfang ist schwer/FILE/[S1E01] Aller Anfang ist schwer.mpg
Movies/Fictional/German/Mega Man/VHS/[ProSieben Entertainment - 70007-3] Aller Anfang ist schwer/FILE/[S2E09] Die Robouniversität.mpg
Movies/Fictional/German/The Powerpuff Girls/TV/[SUPERRTL] The Powerpuff Girls/DVD 1/VIDEO_TS/VIDEO_TS.IFO
Shows:
Code:
Movies/Shows/German/Helge Schneider/TV/[2004-04-29 WDR] Prix Pantheon 2004 - Helge Schneider Solo/DVD 1/VIDEO_TS/VIDEO_TS.IFO
Movies/Non-Fictional/German/SAT.1 News & Stories/TV/[2003-11-30 SAT.1] Einstürzende Doppelsterne/FILE/Einstürzende Doppelsterne.mpg
Personal:
Code:
Movies/Personal/German/School/Camera/[2000-01] Theater Performance/DVD 1/VIDEO_TS/VIDEO_TS.IFO
Movies/Personal/German/Family/Camera/[2010-01-01] Marriage/BD 1 - Ceremony/BDMV/STREAM/00000.m2ts
Reply
#2
Very detailed hierarchy set-up, and if you're looking for the perfect fit one stop solution, I don't have it. But looking a bit deeper and I think you'll find Kodi fits, at least gives you access and a bit more. Firstly Kodi plays just about anything you can throw at it, without codec packages and a lot of tweaks. There's a lot of different approaches from a professional level to hobbyist, but keeping an open mind to what is possible will help. You have to ask the questions, what am I using now, what do I want from a library manager. the time, effort and devotion for personal or professional usage.

Looking at your first segment 'CATEGORY': These can be resolved with stand alone sources or smart playlists or a combination. Sets are already a function of Kodi. I have 34 sources, mostly IMdb genre's, but few off the wall like Black&White, Clips, Shorts etc. An entire drive devoted to sets, some within Kodi sets, and some sub sets. But never underestimate the functions inside of Kodi to list according to date, genre, actor, and the rest. Basically I'm letting Kodi do the organization and I'm not trying to outwit the scrapers. It's a time issue for me.

Kodi doesn't require that names to be a specific format...Naming video files/Movies (wiki) it's the scraper that needs to line up with the meta-data base, if you want to auto-populate the .nfo and the truth is most require 'title (date)' and be inside their database to start with. Some have taken to reg edits in their advanced settings http://kodi.wiki/view/advancedsettings.xml#cleanstrings to get odd-ball naming into the Kodi structure. I don't recommend this approach but if you want to put the effort out, Kodi can become anything you want it to be.

Unless you're willing to make your own scraper, you'll have to follow the conventional nomenclature. Of curse you can build your own .nfo files and in that case one of the third party managers would defiantly be worthy of consideration, and it looks like you might be prepared to do just that

From an outside perspective: I would look at Kodi file view 'the video button', it has most of the features of library mode and shows the meta-data if there is any, and will show every file within a source/path regardless of name. Picking the right skin will go a long way here. Some skins allow access to material/folders outside of the Kodi hierarchy, which means file view works for heaps of videos and sub folders. There are add-ons like Add-on:Super Favourites that are pretty much tailored to your expectations, but alas the author is on hiatus and I'm reluctant to recommend it, as some functionality is lost in the latest iteration of Kodi.

So in short the road you travel here is a question of destination. Suggestion: Nothing stays the same, adapt and Kodi road map offers rewards above and beyond.
Reply
#3
Use filebot to create symlinks with a layout as kodi expects. Scrape the symlinks.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
Thank you very much for your replies.

I think that symlinks really could help. As I wrote, I already created symlinks for TV series and it works good.

I didn't know about filebot, will have a look into it.
Reply

Logout Mark Read Team Forum Stats Members Help
Import of movie names from custom directory layout0