Listing my video collection
After book list sorting, with the help of a SQLite DB and some adroit Python snake charming by Brian, we moved on to my next batch of entertainment media — my DVDs and Blu-rays. Under Windows, I used the excellent DVD Profiler program. This enabled me to host a simple list of my videos on the Invelos server, rather than faffing around generating it "by hand" and then hosting it on 'molehole'. But the Invelos list has been gathering dust since the inglorious collapse of my Win8.1 Pro SSD in February 2015. At that point I lost the ability to maintain the list.
My quantum leap to a Linux orbital brought many benefits. There's a really nice cross-platform Media PC Home Theatre application called Kodi. This will play / display your video and audio files and photos. And it uses a well-documented SQLite DB to keep track of all sorts of information about your media files, scraped from a variety of online DBs. Naturally, therefore, the idea arose of using a bit of Python to read data from the SQLite DB and generate customised video lists locally to pop on to 'molehole' (much like my book lists).
Close inspection will reveal a few data mis-matches, but that's a problem that needn't be solved just yet.
Kodi's SQLite DB is populated with video data by feeding a set of XML "physical media stubs" to it. You need one XML stub for each DVD or Blu-ray, containing (at a minimum) a DVD title. I also use the same stub to hold the DVD's CaseLogic folder location, the date I bought it, and how much I paid for it. Since stub generation gets more tedious when you have a large collection of material, Brian wrote a "KodiPhy.py" data entry program. You run KodiPhy, type in a film title and the other data, and KodiPhy goes off to ask the online world what it knows about that film. KodiPhy then shows you a list of possible candidates, and a thumbnail of the artwork to help you pinpoint the correct film. Finally, it writes an XML "stub" to specify the film. You can, if necessary, also write an "nfo" file to assist in any disambiguation.
Then it's just a matter of running Kodi, choosing "Update Library" (under "Movies") and it reads in all the stubs and nfo files that have been written since the last time you input a batch of the things. Once Kodi has digested all these stubs — using the data in them to fetch all manner of extra information from the online DBs it knows about — the SQLite DB contains all that's needed for generating a decent set of video lists. That's where "VideoLISTER.py" comes in. It creates the Videos HTML listing in 'molehole'-compliant format (as you can see above).
That's films. Still to be tackled are all the one-off TV shows and series. The fact that a given show ("Northern Exposure", for example) can have over one hundred separate episodes spread across multiple seasons means thinking more carefully about how best to display a list. Work is ongoing...