[mythtv-users] mythrename.pl renames my .avi to .nuv
Brad DerManouelian
myth at dermanouelian.com
Mon Jan 15 15:30:07 UTC 2007
On Jan 15, 2007, at 6:16 AM, Christophe Zwecker wrote:
> Hi,
>
> i made a script/userjob to convert mpeg recordings to xvid, I run
> mythrename after but it renames the file to .nuv . Where do I need to
> change the script so it will leave the avi suffix alone ?
> Sorry i dont know perl..
>
> Best regards,
>
> Christophe
Line 385 says:
my $suffix = ($out =~ /mpe?g/i) ? '.mpg' : '.nuv';
This means if the file contains mpeg or mpg it will add .mpg and in
all other situations it will use .nuv.
That regex is even a little wonky since it will change files named
somethimpegelse.nuv to somethimpegelse.mpg
It should really be:
my $suffix = ($out =~ /mpe?g$/i) ? '.mpg' : '.nuv';
Not the most efficient way, but certainly the easiest to keep avi
extensions would be to add this line after 385:
$suffix = ".avi" if ( $out =~ /\.avi$/i );
More information about the mythtv-users
mailing list