I've got a large collection of hard drives full of HD content I recorded from cable before 5c encryption ruined the fun. I've always wanted a way to keep track of it and watch it from within mythvideo.

I decided to create a solution. This is a script that's launched by udev when a USB drive is attached, scans the mount point for video files, inserts rows into a separate table in the MythTV db, then copies those rows into the videometadata table.

They appear in mythvideo and you can update metadata, download fanart and whatnot. When you remove the drive, the script launches again and copies the updated metadata back into its own table and removes the videometadata rows. That way, MythTv doesn't freak out when it can't find the files.

It tracks files by partition uuid and inode number, so you can rename the files on the drives and the drives can come up on different mount points without confusing it. It also handles new files and deleted files without any problem.

One other benefit is that it keeps a complete list of all the video on your external drives in its table. I'm going to be adding a page to mythweb to browse that eventually.