Perl Deleting Shows

From MythTV Official Wiki
Jump to: navigation, search

Deleting Shows using Perl

MythTV has bindings for perl that allow you to delete a show based on its filename. The following code can be used in a perl script:

use MythTV;

$Myth = new MythTV();

$file = $Myth->new_recording($ARGV[0]);

$Myth->backend_command(['FORCE_DELETE_RECORDING', $file->to_string()], '0');

Using a command line of:

./deleteshow.pl 1001_20081015112300.mpg

Would result in the show being deleted.