Skip to main content

Media centre management

Early Saturday morning I decided to start cleaning up files on our media centre. Awhile back I took inventory of all the movies on our media centre and entered them into a simple 3 field online database that included: the movie title, format of the movie (DVD/Blu-ray/VHS/Digita/Other), and the date of the movie. Over the past few months I've picked up a lot of movies that didn't make it into the online database. I use that database to make sure I don't already have a movie when I'm out looking for new movies.

The first step was to take inventory of all the filenames of the movies on the system. All movies are stored under the directory /mnt/media/Movies. That directory is further sub-divided into 2 other directories /Movies/DVDs and /Movies/Blu-rays. Those folders contain both files and folders, but all the files and folders are archives of our DVDs and Blu-ray discs.

In both folders I have a directory called 111. When I rip movies with MakeMKV they go into the appropriate 111 folder. For Blu-ray discs this would be /Movies/Blu-rays/111 and for DVDs it would be /Movies/DVDs/111. MakeMKV generates large files. I use the command-line version of Handbrake, handbrake-cli to compress those large files in the 111 folder. I use a short script that compresses every file in the folder, so I don't have to compress files individually, I just run the script and leave it until all the files are compressed. This process can take a long time, even with an i7-2600 CPU doing all the processing, and particularly when compressing a few months worth of Blu-ray pick-ups.

To list all the files in the Movies folder I changed into that folder and ran a variation of:

ls -R1 -I "*.jpg" -I "*.srt" > ~/Movies-$(date-%F).txt

This ls command recursively lists all the files and directories in a 1 (single) column without all the extra data. The -I "*.jpg" ignores all the files that end in the .jpg extension. The -I switch comes in handy because you can exclude images and subtitles (*.srt). The last part of the command > redirects the output to a file called Movies-08-12-2019.txt (where the August 12th date shown here is the current date). I then downloaded that file from our media centre to my workstation using Filezilla. At first I opened the file on another system using the mousepad text editor, and I started printing the list. I found that when you open the list with a text editor and print it many of the file names get cut off the bottom of each page (likely due to the text editor looking for a legal rather than letter size). When opened and printed with LibreOffice Writer the list printed fine.

The next issue I ran into was the pagination of my online list. My online list shows 100 movies at a time, it gets difficult to find particular movies since some would have a slightly different way of listing in the movie list compared to the file name. I'm using Drupal on the site I'm using for the list, so it was a simple matter of copying the "view" I was using and creating a new "view" that eliminated the pager. With this long list I was able to select all the movies and movie data, then paste that list into a LibreOffice Calc spreadsheet. Why not Microsoft Office? Lately I've found MS Office a real pain to do simple tasks that LibreOffice just does as you'd expect. That and the whole software freedom argument are strong points for LibreOffice.

With the online list in LibreOffice calc I sorted the data by the second field (the format) and then started highlighting the files in my printed list that do not appear in the spreadsheet.

It's tedious manual labour and the process reminded me it's important that I get the newly purchased titles into the online database before I make a video about the titles. This leaves me with the decision, do I put them into the online database before I rip/archive them, or after. The advantage of putting them in the list immediately is that I won't forget. The disadvantage of putting them in the list first is that if a movie doesn't rip I now have to remove the movie from the list. (Will I remember?)

I have a small stack of movies that haven't ripped, due to flaws in the disc, or simply being dirty. There are a couple of movies in my collection (one of which is the 1st Guardians of the Galaxy) that no matter how much I scrub the disc with Isopropyl simply won't rip correctly. Another thing to look into.

I've heard of people using apps to scan and catalog movies. This might be a future stage.

The next step after getting all the movies into the online database is to figure out why approximately 8-10 movies are not scraping correctly in KODI (usually a naming issue).


Comments

Popular posts from this blog

Converting an 82 year old to Xubuntu GNU/Linux

A few weeks ago Irvin (not his real name) came into our computer recycling project. Irvin is 82 years old. He walks with a walker and somehow managed to lug a fairly big desktop Lenovo Thinkcentre down to our recycling project. Irvin had been to several computer stores over the past few months trying to get help with his computer. Unfortunately it seems that he wasn't able to get the help he needed despite paying repeatedly for help. Irvin doesn't speak and didn't appear to understand much English, his native language is Russian. Initially one of our volunteers spent a couple of hours over two weeks trying to help Irvin with different issues he was running into. Irvin's computer was old, even by our refurbishing standards - it was running the Lenovo version of Windows XP. Many of the issues Irvin was running into were due to the fact that he was still running Windows XP. Communication was our first issue, but Google Translate seemed to work well enough that we we...

I might be upgrading sooner than expected

It looks like I might be upgrading my home desktop workstation sooner than I wanted to. That system was put together December of 2014 and has: AMD A8-5600K APU Gigabyte  F2A85XM-D3H 16GB GSkill DDR3 1866MHz RAM 2GB NVidia GeForce GTX 650 TI Boost video card (currently a 1GB Radeon HD 6670 for testing) 500GB Samsung 860 SSD (Xubuntu Linux) 1TB WD Blue Drive (Windows 10) Corsair 430 Watt PSU The system has been relatively stable over the years but has recently started to develop a few issues: When recording audio in Xubuntu the audio is stuttering. This may be due to a Pulseaudio update since I don't have the issue in Windows 10 (and I do have the issue with multiple audio sources - web cam, microphone, and in several recording programs: audacity, obs studio). More concerning the system suddenly reboots in the middle of playing Diablo III. I suspect the power supply might be to fault, but if it's not this might mean more expensive purchases. I wanted to hold off to...

CentOS 4.8 in Virtualbox 5.1.x

Years ago I was part of a project that was developed on and ran on CentOS 4.8. The software we developed was only used in-house so we were able to work around any bugs we found. The development cycle was extremely short, 4 months, considering the end result. While we've backed up the source frequently over the years the software really never got a major facelift. I spent a bit of time over the years making some minor changes (I gave the menu a facelift changing it from rotating gifs to CSS, and made some code changes to deal with a tax shift that happened years ago), but what the project really needs is a major overhaul. One of my goals right from the outset was to open source the project, but this didn't happen because I was simply too swamped with other things to completely audit the code. Also I wanted to simplify the project before exposing it to the world. Initially we based the project on an eCommerce suite (OSCommerce). At the time we were using that suite for an...