where your opinions are noted, and then summarily ignored

Development Progress

The following describes development progress for my Media At Home project, as well as notes and musings.

Table of Contents

(unlinked months indicate no updates for that month)


15 July 2012

Development begins.

22 July 2012

I spent the first week researching ways to gather media info from the web, and settled on the following web info "APIs":

  • Movies -
  • TV Series -
  • Music CDs -

To utilize the api provided by, I downloaded a .Net wrapper called WATTMDB, and when I tried to use it, I kept getting "Reference not set to the instance of an object" exceptions. Unfortunately, the assembly doesn't include source code or a PDB file, so I couldn't trace doewn what was going wrong, or fix the problem myself. My only recourse was to use DotPeek (from JetBrains) to reverse engineer the assembly and recreate it from scratch one file at a time. After doing so, I compiled the code and almost immediately found and fixed the problem.

In order to test the various retrieval classes, I created a WinForms app that exercises each "api". At this point, I've established that the WATTMDB assembly is viable (after my reverse-engineering), and data is easily retrieved.

I've created separate applications for the various major components:

  • MediaAtHome - Main application
  • MAHVideoPlayer - plays movies and tv shows
  • MAHMusicPlayer - plays music and optionally, an image/video slide show
  • MAHSetup - Allows for configuration and media management

I created separate libraries for retrieving data, and started working on the database schema.

A couple of years ago, I started working on a WPF application that plays music coupled with an image/video slideshow. I'll be using this code in the MAHMusicPlayer component.

10 August 2012

  • Designed the Movies tab in the setup app, and added a Wizard form that takes the user through the process of importing movie files.

  • I wanted to be able to apply "holiday genres" to movies, and had to implement a Holiday Genre form to allow the user to create their own. This also means I had to come up with a way to establish dates for holidays like Thanksgiving which happen on the Nth day of a specific month. The result was a set of extension methods for the DateTime class.

15 August 2012

MAHSetup / Movie Importer form - This is a wizard form that allows you to configure movie sources and file extensions, scan those sources, and match found movies to info retrieved from the internet. I've completed the main functional code for first wizard page:

Movie Sources wizard page
  • A - This column contains buttons that allow you to add/delete items from the listview. The list always contains one item (to alow us to have a "+" button visible). As an item is added, the Tag property of the cell's content is bound to the ID property with reflects the actual row index of the item in the list. The last item in the list always has an ID of -1, which changes the content and functionality of the button.

  • B - This is the actual data associated with the item.

  • C - This checkbox allows you to enable/disable individual sources and extensions. If an item is disabled (or invalid), the disk scanning will not include that item when finding new movies.

  • D - This column contains the status of the item. OK means it can be used when scanning the disk, and INVALID means it won't be. I'm considering changing these to images to make the screen pop a little.

  • E - This is a splitter bar. Everyone knows what a splitter bar is for.

  • F - These are the wizard buttons. At this time, there is not plan to tie these buttons to the item statuses since the status is shown, so the user has every opportunity to fix any problems that might be presented.

19 August 2012

MAHSetup / Movie Importer Form - Continuing with the wizard form, I implemented most of the 2nd wizard page that allows the user to scan the movie sources, and retrieve possible matches from TheMovieDB.

Scan/Process wizard page

Extra work involved the following:

  • Make the listviews show rows in alternating colors

  • Make the last column in a listview consume the available space in the Possible Matches listview. As I found out at work, doing stuff like this in a ListView really kills the ListView control's performance with regards to resizing. I'm not sure how to address it (or even if I will).

21 August 2012

MAHSetup / Movie Importer Form - Wrapped up work on the 2nd wizard page. I connected the Search Term textbox, Find More button, and the Match button.

  • Search Term TextBox - in the even that no possible matches were found for the movie file (the filename spelled the title incorrectly), this tetbox allows the user to specify a different movie title.

  • Find More Button - Once the user has entered at least three characters in the Search term textbox, this button becomes enabled. When Clicked, a search is performed on TMDB to find the newly specified title. All possible matches found will be shown in the listview.

  • Match Button - This button associates the currently selected possible match to the selected scanned movie file. The scanned movie listview is updated to relect the matched movie's IMDB ID.

22 August 2012

MAHSetup / Movie Importer Form - I decided that I might want to select a specific file to re-process (for whatever reason), so I changed the form to include a button that allows me to to do that:

Scan/Process wizard page

...and a form to impement the feature:

Select specific file

The reson I created this form is because I needed the System.IO.FileInfo object that you get from a call to Directory.GetFiles().

  • Source Folder ComboBox - presents a list of valid and enabled source folders (previously specified). Once a folder has been selected, the Scan button is enabled.

  • Scan Button - Scans the selected source folder for files that have one of the previously specified file extensions.

24 August 2012

MAHSetup / Movie Importer Form - Got poster downloading working for the third tab that will let me modify movie data and selec the desired poster.

26 August 2012

MAHSetup / Movie Importer Form - Got the third wizard page partially functioning. I'm tryng to come up a viable way to allw genre manipulation. My brain hurts.

Movie Details wizard page

28 October 2012 - REBOOT!

Decided to start all over again, using Visual Studio 2012 and .Net 4.5. Why? Because I realized that I should have started with the model and viewmodel before moving on to the actual use of those things, plus I was procrastinating on the database stuff. Since I was startng all over again anyway, I figured I'd update to the newest tools. I created a new solution and added the following projects:

  • MAHCommon - holds everything that doesn't have a more reasonable place to be. Mostly comprised of static classes or stuff that might need to be accessed from any other assembly.

  • MAHModel - Contains all objects that contain data retrieved from the database.

  • MAHPlayer - Plays the specified video media. Music and pictures willhave their own players as well.

  • MAHRetrievalAPIs - Contains all of the various media description retrieval api's, such as TMDB, IMDB, etc.

  • MAHSetup - The configuration app, allows the user to manage all aspects of media available to the application suite.

  • MAHViewModel - This is the wraper around the model, and makes all model objects available to the UI

  • MediaAtHome2 - this is the UI used to access lists of media and select them for playback.

Actual progess was limited to creating the solution/projects, and adding the desired tabs to the MAHSetup main window, and copying over some of the code from the old version of MAHCommon.

I also played around a little with getting the LibVLCthing working, and in a WPF window, performance quite frankly sucks. This is not the fault of the LibVLC code, but is because of WPF's inability to deal with video playback. In a WinForms app, playback is fine, but I can't use a WinForms app because then I lose the visual stuff like pop-up media controls. This means I have to host a WinForms window in the WPFPlayer app. And the hits just keep coming...

04 November 2012

  • Model - MediaSources

  • Database - added tables and stored procedures MediaSources

  • ViewModel - created viewmodel objects for MediaSources

  • UI (MAHSetup) - Established a shared appconfig file, and added the ability to specify the database connectuion string on the General tab. If the connection string is valid, a green dot shows up nextto the text field, oitherwsie, the dot is red.

11 November 2012

  • Model - Holidays

  • Database - added tables and stored procedures for Holidays

  • ViewModel - created viewmodel objects for the Holidays

  • UI (MAHSetup) - added code to the Holidays tab. There are several pre-specified holidays, and the user can add more or remove existing ones.

18 November 2012

  • Model - Holidays, Genres, and Genre Categories (comedy, drama, documentary). I hate it when Media Portal shows movies under both comedy AND drama, so I break genres into categories (comedy, drama, documentary), and then genres under those categories.

  • Database - added tables and stored procedures for Holidays and Genres/Genre Categories.

  • ViewModel - created viewmodel objects for the Holidays and Genres/genre Categories.

  • UI (MAHSetup) - added code to the Holidays tab. There are several pre-specified holidays, and the user can add more or remove existing ones.

After doing all of that, I started looking at transferring all of the prior Movies tab (and movie scan/import code) into the new solution, and had a thought - the Media Sources had to ALWAYS be a shared network resource, and I was allowing the user to specify local disk drives as a media source. The reason for this thought was that the database would bae available to all machines, and therefore all media had to reside on a shared disk somewhere on the LAN. The requirements changed to the following:

  • The application should determine the available network shares, and not rely on the user to know what these shares are. These shares could only be activated or inactivated by the user, but not deleted.

  • The user should still be able to specify local media sources for each machine. Of course, this means that all media on the local resources would only be available from that machine, but that's okay.

  • I had to find/write code that a) scanned the network for all available machines, and then b) scanned each machine for a non-default shared disk (my network has printers and scanners on it as well).

  • The ability to add local disks could NOT include the ability to add mapped drives (because they were available via their UNC path anyway).

Of course, the interface for adding a resource needs to change, and I have to add a "IsLocal" column to the database table to indicate a local (non-shared) media source. I think all I have to do is change the form where the user adds/edits a media source, and add a column to the listview in the Media Sources tab.

If you're wondering why I'm concerned about all of this, it's because I want the main app (where media selection is made) to visually indicate a media item whose shared media source is not currently available (the machine is offline or the disk is somehow defective).