16 December, 2007

MP TV series

One of my favorite features in mediaportal is the tv-series support. Enjoying the tv-series you like, all you want, when you want, is absolutely great. But MediaPortal just adds a little user's joy to the excercise. The developers found out that somewhere on the internet, there's a community of tv enthusiasts collecting heaps of banners, episode guides and what not for every imaginable tv series. The community can be found at http://www.thetvdb.com/ and there is some beautiful stuff from dedicated fans out there. All of which is now neatly displayed through the MediaPortal TV Series plugin. The banners, episode guides and screenshots make picking the right episode a breeze. And MediaPortal remembers what episode you watched. It even hides episode guides of unwatched episode to prevent "spoilers".


Now, under MediaPortal 0.2.3 RC 3 there were some issues with the database and I never took the time to fix that, so I reinstalled the plugin when I had the final 0.2.3 release installed.

I downloaded the plugin v1.2.9 build 34660. It comes as a RAR and requires unzipping in the MediaPortal program folder. In the MediaPortal configuration tool an icon appears under plugins. After enabling the plugin, you can enter its configuration.

First you enter the location of the tv-series files. But then comes the tricky part. The filenames have to be parsed into the data base according to parsing rules. These rules extract properties like series and episode number from the filenames on the hard disk. This requires some level of organization in the tv series on your hard disk. The pre-programmed parsing rules work on most naming conventions, but not all on my harddisk. So, the choice was to do a lot of renaming, or edit the parsing rules.

The parsing rules come in two shapes: simple and regular expression. The simple expression proved too simple for my chaoticly named series collection. I basically had to make a rule for each series and each season and there were too many expressions to uniquely parse the filenames. So, I had to get familiar with regular expressions.

The overview and the tester on regexlib.com proved very helpful here, as well as wikipedia and this page. Eventually I found out that this parsing rule works best for me:


Apart from the parsing rule I also used string replacements, so that the characters _, [ and ] are removed from the filenames. When the parsing test shows your files are parsed correctly, it's time to hit "Start Import". The actual downloads may take a while. In the details tab you can check the data that's currently in the database. After closing the configuration and starting MediaPortal, the same data will be displayed through the My TV Series screen.

One more screenshot below to prove my point: The MP TV Series plugin looks neat!

Installing MediaPortal

Since the final, stable MediaPortal 0.2.3 release is out, I decided to do a fresh install and blog a couple of tips and tricks.

Installing or updating is pretty straightforward. I always check the instructions on the wiki, I noticed these change every now and then. I renamed the mediaportal folder and uninstalled MediaPortal with Control Panel -> Add/remove Programs.
Running the Setup exe-file, the installer first requires agreement to the GNU license under which MediaPortal is distributed. Then it asks to install the bundled MPEG-2 decoder filters, DScaler and Gabest MPA/MPV. I do, even though I installed these on previous installs as well. The next screens are to identify the installation folder and the start menu folder. Once that's complete, the actual install takes well under a minute. Finally, the closing screen has a checkbox for entering the Configuration tool. I unchecked this, because I first want to copy the old database files to the new installation.

Per the wiki instructions, I copied the following files to the new installation:
- The thumbs-folder. Although I deleted the folder with tv-series banners.
- The input-device mappings folder. Because I made some tweaks in how MediaPortal responds to the remote.
- The database-folder. Here I also deleted the TVSeries database.
- All XML-files in the main folder, except for a couple that I thought were used only with older plugins.

Skipping any configuration, I started MediaPortal. Somehow the configuration of the tv-card was lost, so in the configuration I re-added it and assigned all tv channels to it again. Yes, I still use the built-in tv stuff, I haven't tried the separate tv server yet. I also had to run the WebEPG grabber configuration again, as described in the previous post.

That's it, ready to rock and roll!