Mythfindfile

Mythfindfile


Mythfindfile allows for listing or renaming recording files in a more human-readable format.

Download Mythfindfile



NAME

mythfindfile


SYNOPSIS

 # list all recordings/filenames
 mythfindfile.pl -l
 
 # list all recordings matching case-insensitive SEARCH_STRING
 mythfindfile.pl -l SEARCH_STRING
 
 #  rename all filenames
 mythfindfile.pl -r
 
 # rename all recordings matching case-insensitive SEARCH_STRING
 mythfindfile.pl -r SEARCH_STRING


DESCRIPTION

MythTV stores files in fairly cryptic filenames, at least to humans. This script allows for searching recordings by title/subtitle to list their filenames. It also allows for renaming them based on santized title/subtitle, and altering the database to match.

I wrote this because I frequently work with the recorded files directly from another machine, and it quickly became tedious to login to mysql to find the file I wanted. This script is really only useful if you routinely delve into the filesystem.

The rename works by concatenating title and subtitle, sanitizing it, chopping it down to 32 characters, and sticking it in front of the existing filename separated by underscore. End result, all renamed video filenames grow by 33 characters. It moves the file on the filesystem, and then updates the recording's basename in the 'recorded' table.


SETUP

Change the variables at the top of the script to match your setup.


CAVEATS

It is probably best to run this on a 'quiet' system. I have never tested what happens when renaming a file that is being transcoded for instance. I attempt to rule out recordings in progress with the select statement. I assume that renames of recordings in these or similar states would be really bad.


CHANGES

mythfindfile 1.01 (20120423)

- Public domain.

- Integrated perldoc.

mythfindfile 1.00 (20060708)

- First release.