Friday, May 6, 2011


To move this blog away from being total useless, here one of my tools, may it be useful to you !

I wrote it to got full control on the movie scraping process of XBMC. Several movies, when searched on IMDB or OFDB, often end in multiple results. So the scraper has two possibilities, either ask the user, which is very annoying when scanning a large movie collection, or just choose the best fit. Both ways are not what I really like, so I've searched for workarounds.
I found some nice tools, including Ember Media Manager, which do a really nice job, writing all movie related information to an .nfo file, which is namely bound to the respective movie file. The scraper from XMBC recognizes this file, and loads information from this file, instead from any internet source.

After a while using it, I've detected two flaws of it:
  • The data is completely stored on my hard drive. Updating information or switching to another media information source is not as easy this way. In addition, including fan-art, cover image and .nfo, I have at least 3 additional files per movie. Not very disk space consuming, but annoying when browsing the folder.
  • Adding new movies (when done in groups of many entries) is boring. After each selection, the user must select fan-art and cover, plus wait for all movie related downloads, which can be 10 seconds or more, even on my fast internet connection.
Another possibility was to just store the IMDB-ID in this .nfo file. The XBMC-scraper than has an exact identification of the movie, but without the drawbacks above:
  • The scraper can do always fresh updates using this ID, from any source that has some form of IMDB binding. All without loosing the movie identification and without user interaction !
  • The information in question is just a short ID, which is known at the moment the movie is identified and stored in really no time.
  • One additional benefit is the fact that the Moving Pictures plugin of Media Portal can use this information as well, so using the movie collection when switching to this nice media framework does not require additional work, just let the software scan.
To create the .nfo files with the IMDB-ID, I wrote XbmcMovieHelper, coded in C# and one of my first experiments with Windows Presentation Foundation (WPF) / XAML. Images are often more expressive than words, so here's a screenshot:

The first thing to do is to open the options dialog and configure the only two options:
  • Choose the right site: IMDB has sites for most languages, i.e. for German.
  • Verify movie extensions: Check if your preferred movie format(s) are part of the list of file extensions, otherwise extend it.
Using it is quit simple. The first task is to select a movie root, this is the directory where movie files are stored.
All recognized movies inside this directory are than listed in the lower window pane. If .nfo files are already present, the IMDB-ID is scanned from it (if possible) and listed in front of the respective movie. These movies can now be tagged with their IMDB-ID.

Selecting a movie will result in one of two scenarios:
  • If an IMDB-ID is already available, the movie information site on IMDB is shown in the browser area above. Pressing the 'Re-Search Movie' button allows the modification of an already present ID.
  • Otherwise an IMDB-search is started, showing the results in the browser pane. The user has than the possibility to navigate inside the browser to the correct movie. If the movie is identified, a click on 'Use IMDB ID' will store the ID of the current visible movie to the currently selected in the lower pane. This will silently override an already existing .nfo file !
VoilĂ , thats it. This allows a really fast handling of large movie collections ! The 'Play Movie'-button is very self explanatory, isn't it ?
The reason of 'Toggle Search Lock' can be best read in the forum, were I first post this tool:

XbmcMovieHelper is licensed under GPLv3.
The binary can be downloaded from here: Windows Binary
The source code here: Source Code

1 comment:

  1. I love this small bit of software :-) One often needs to create a nfo for xbmc and this will do it with a simple but well working approach. I do thoug have a few requests as well ;-) Sorting mode on date would be a nice addition. So i do not have to scroll down the entire list to find the new movies. Also a small notification setting if the release finds a nfo but there is no usuable imdb info in there. And the last thing i would like would be the possibility to append/change imdb link in existing nfo's instead of overwriting them. Best Regards